1 /* 2 * This library is free software; you can redistribute it and/or 3 * modify it under the terms of the GNU Lesser General Public 4 * License as published by the Free Software Foundation; either 5 * version 2 of the License, or (at your option) any later version. 6 * 7 * This library is distributed in the hope that it will be useful, 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 10 * Lesser General Public License for more details. 11 * 12 * You should have received a copy of the GNU General Public License 13 * along with this program; if not, write to the Free Software 14 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 15 * 16 * Copyright (C) 2000 - 2005 Liam Girdwood 17 */ 18 19 #ifndef _LN_TRANSFORM_H 20 #define _LN_TRANSFORM_H 21 22 #include <libnova/ln_types.h> 23 24 #ifdef __cplusplus 25 extern "C" { 26 #endif 27 28 /*! \defgroup transform Transformation of Coordinates 29 * 30 * Transformations from one coordinate system to another. 31 */ 32 33 /*! \fn void ln_get_hrz_from_equ (struct ln_equ_posn * object, struct ln_lnlat_posn * observer, double JD, struct ln_hrz_posn *position); 34 * \brief Calculate horizontal coordinates from equatorial coordinates 35 * \ingroup transform 36 */ 37 /* Use get_mean_sidereal_time, get_hrz_from_equ_siderealtime */ 38 void LIBNOVA_EXPORT ln_get_hrz_from_equ (struct ln_equ_posn * object, struct ln_lnlat_posn * observer, double JD, struct ln_hrz_posn *position); 39 40 /*! \fn void ln_get_hrz_from_equ_sidereal_time (struct ln_equ_posn * object, struct ln_lnlat_posn * observer, double sidereal_time, struct ln_hrz_posn *position); 41 * \brief Calculate horizontal coordinates from equatorial coordinates, 42 * using mean sidereal time. 43 * \ingroup transform 44 */ 45 /* Equ 12.5,12.6 pg 88 */ 46 void LIBNOVA_EXPORT ln_get_hrz_from_equ_sidereal_time (struct ln_equ_posn * object, struct ln_lnlat_posn * observer, double sidereal, struct ln_hrz_posn *position); 47 48 /*! \fn void ln_get_equ_from_ecl (struct ln_lnlat_posn * object, double JD, struct ln_equ_posn * position); 49 * \brief Calculate equatorial coordinates from ecliptical coordinates 50 * \ingroup transform 51 */ 52 /* Equ 12.3, 12.4 pg 89 */ 53 void LIBNOVA_EXPORT ln_get_equ_from_ecl (struct ln_lnlat_posn * object, double JD, struct ln_equ_posn * position); 54 55 /*! \fn void ln_get_ecl_from_equ (struct ln_equ_posn * object, double JD, struct ln_lnlat_posn * position); 56 * \brief Calculate ecliptical coordinates from equatorial coordinates 57 * \ingroup transform 58 */ 59 /* Equ 12.1, 12.2 Pg 88 */ 60 void LIBNOVA_EXPORT ln_get_ecl_from_equ (struct ln_equ_posn * object, double JD, struct ln_lnlat_posn * position); 61 62 /*! \fn void ln_get_equ_from_hrz (struct ln_hrz_posn *object, struct ln_lnlat_posn * observer, double JD, struct ln_equ_posn * position); 63 * \brief Calculate equatorial coordinates from horizontal coordinates 64 * \ingroup transform 65 */ 66 /* Pg 89 */ 67 void LIBNOVA_EXPORT ln_get_equ_from_hrz (struct ln_hrz_posn *object, struct ln_lnlat_posn * observer, double JD, struct ln_equ_posn * position); 68 69 /*! \fn void ln_get_rect_from_helio (struct ln_helio_posn *object, struct ln_rect_posn * position); 70 * \brief Calculate geocentric coordinates from heliocentric coordinates 71 * \ingroup transform 72 */ 73 /* Pg ?? */ 74 void LIBNOVA_EXPORT ln_get_rect_from_helio (struct ln_helio_posn *object, struct ln_rect_posn * position); 75 76 /*! \fn void ln_get_ecl_from_rect (struct ln_rect_posn * rect, struct ln_lnlat_posn * posn) 77 * \ingroup transform 78 * \brief Transform an objects rectangular coordinates into ecliptical coordinates. 79 */ 80 /* Equ 33.2 81 */ 82 void LIBNOVA_EXPORT ln_get_ecl_from_rect (struct ln_rect_posn * rect, struct ln_lnlat_posn * posn); 83 84 /*! \fn void ln_get_equ_from_gal (struct ln_gal_posn *gal, struct ln_equ_posn *equ) 85 * \ingroup transform 86 * \brief Transform an object galactic coordinates into equatorial coordinates. 87 */ 88 /* Pg 94 */ 89 void LIBNOVA_EXPORT ln_get_equ_from_gal (struct ln_gal_posn *gal, struct ln_equ_posn *equ); 90 91 /*! \fn void ln_get_equ2000_from_gal (struct ln_gal_posn *gal, struct ln_equ_posn *equ) 92 * \ingroup transform 93 * \brief Transform an object galactic coordinate into J2000 equatorial coordinates. 94 */ 95 void LIBNOVA_EXPORT ln_get_equ2000_from_gal (struct ln_gal_posn *gal, struct ln_equ_posn *equ); 96 97 /*! \fn void ln_get_gal_from_equ (struct ln_equ_posn *equ, struct ln_gal_posn *gal) 98 * \ingroup transform 99 * \brief Transform an object equatorial coordinates into galactic coordinates. 100 */ 101 /* Pg 94 */ 102 void LIBNOVA_EXPORT ln_get_gal_from_equ (struct ln_equ_posn *equ, struct ln_gal_posn *gal); 103 104 /*! \fn void ln_get_gal_from_equ2000 (struct ln_equ_posn *equ, struct ln_gal_posn *gal) 105 * \ingroup transform 106 * \brief Transform an object J2000 equatorial coordinates into galactic coordinates. 107 */ 108 void LIBNOVA_EXPORT ln_get_gal_from_equ2000 (struct ln_equ_posn *equ, struct ln_gal_posn *gal); 109 110 #ifdef __cplusplus 111 }; 112 #endif 113 114 #endif 115