libnova.h | libnova.h | |||
---|---|---|---|---|
skipping to change at line 55 | skipping to change at line 55 | |||
* - Parabolic Motion of bodies (Comet positional data) | * - Parabolic Motion of bodies (Comet positional data) | |||
* - Orbit velocities and lengths | * - Orbit velocities and lengths | |||
* - Atmospheric refraction | * - Atmospheric refraction | |||
* - Rise, Set and Transit times. | * - Rise, Set and Transit times. | |||
* - Semidiameters of the Sun, Moon, Planets and asteroids. | * - Semidiameters of the Sun, Moon, Planets and asteroids. | |||
* | * | |||
* \section docs Documentation | * \section docs Documentation | |||
* API documentation for libnova is included in the source. It can also be f ound in this website and an offline tarball is available <A href="http://li bnova.sf.net/libnovadocs.tar.gz">here</A>. | * API documentation for libnova is included in the source. It can also be f ound in this website and an offline tarball is available <A href="http://li bnova.sf.net/libnovadocs.tar.gz">here</A>. | |||
* | * | |||
* \section download Download | * \section download Download | |||
* The latest released version of libnova is 0.7.0 and was released on the 2 3rd March 2003. | * The latest released version of libnova is 0.8.0 and was released on the 2 8th July 2003. | |||
* It is available for download <A href="http://sf.net/project/showfiles.php ?group_id=57697">here.</A> | * It is available for download <A href="http://sf.net/project/showfiles.php ?group_id=57697">here.</A> | |||
* | * | |||
* \section cvs CVS | * \section cvs CVS | |||
* The latest CVS version of libnova is available via CVS <A href="http://sf .net/cvs/?group_id=57697">here.</A> | * The latest CVS version of libnova is available via CVS <A href="http://sf .net/cvs/?group_id=57697">here.</A> | |||
* | * | |||
* \section licence Licence | * \section licence Licence | |||
* libnova is released under the <A href="http://www.gnu.org">GNU</A> LGPL. | * libnova is released under the <A href="http://www.gnu.org">GNU</A> LGPL. | |||
* | * | |||
* \section help Help | * \section help Help | |||
* If you are interested in helping in the future development of libnova, th en please get in touch. | * If you are interested in helping in the future development of libnova, th en please get in touch. | |||
skipping to change at line 126 | skipping to change at line 126 | |||
}; | }; | |||
/*! \struct ln_dms | /*! \struct ln_dms | |||
** \brief Degrees, minutes and seconds. | ** \brief Degrees, minutes and seconds. | |||
* | * | |||
* Human readable Angle in degrees, minutes and seconds | * Human readable Angle in degrees, minutes and seconds | |||
*/ | */ | |||
struct ln_dms | struct ln_dms | |||
{ | { | |||
int degrees; /*!< Degrees. All values are valid */ | int sign; /*!< Sign. 0 for positive, anything else is | |||
negative */ | ||||
int degrees; /*!< Degrees. Valid > 0 */ | ||||
int minutes; /*!< Minutes. Valid 0 - 59 */ | int minutes; /*!< Minutes. Valid 0 - 59 */ | |||
double seconds; /*!< Seconds. Valid 0 - 59.9999... */ | double seconds; /*!< Seconds. Valid 0 - 59.9999... */ | |||
}; | }; | |||
/*! \struct ln_hms | /*! \struct ln_hms | |||
** \brief Hours, minutes and seconds. | ** \brief Hours, minutes and seconds. | |||
* | * | |||
* Human readable Angle in hours, minutes and seconds | * Human readable Angle in hours, minutes and seconds | |||
*/ | */ | |||
skipping to change at line 176 | skipping to change at line 177 | |||
}; | }; | |||
/*! \struct lnh_lnlat_posn | /*! \struct lnh_lnlat_posn | |||
** \brief Ecliptical (or celestial) Latitude and Longitude. | ** \brief Ecliptical (or celestial) Latitude and Longitude. | |||
* | * | |||
* Human readable Ecliptical (or celestial) Longitude and Latitude. | * Human readable Ecliptical (or celestial) Longitude and Latitude. | |||
*/ | */ | |||
struct lnh_lnlat_posn | struct lnh_lnlat_posn | |||
{ | { | |||
struct ln_dms lng; /*!< longitude. Object longitude. | struct ln_dms lng; /*!< longitude. Object longitude.<p> | |||
NOTE: IAU changed from positive west to negative west longit | ||||
ude | ||||
in 1982, however we will currently use the older convention of:- | ||||
Negative East of Greenwich, | Negative East of Greenwich, | |||
positive West of Greenwich */ | Positive West of Greenwich */ | |||
struct ln_dms lat; /*!< latitude. Object latitude */ | struct ln_dms lat; /*!< latitude. Object latitude */ | |||
}; | }; | |||
/*! \struct ln_equ_posn | /*! \struct ln_equ_posn | |||
** \brief Equatorial Coordinates. | ** \brief Equatorial Coordinates. | |||
* | * | |||
* The Right Ascension and Declination of an object. | * The Right Ascension and Declination of an object. | |||
* | * | |||
* Angles are expressed in degrees. | * Angles are expressed in degrees. | |||
*/ | */ | |||
skipping to change at line 206 | skipping to change at line 209 | |||
/*! \struct ln_hrz_posn | /*! \struct ln_hrz_posn | |||
** \brief Horizontal Coordinates. | ** \brief Horizontal Coordinates. | |||
* | * | |||
* The Azimuth and Altitude of an object. | * The Azimuth and Altitude of an object. | |||
* | * | |||
* Angles are expressed in degrees. | * Angles are expressed in degrees. | |||
*/ | */ | |||
struct ln_hrz_posn | struct ln_hrz_posn | |||
{ | { | |||
double az; /*!< AZ. Object azimuth. */ | double az; /*!< AZ. Object azimuth. <p> | |||
double alt; /*!< ALT. Object altitude. */ | 0 deg = South, 90 deg = West, 180 deg = Nord, 270 deg = Ea | |||
st */ | ||||
double alt; /*!< ALT. Object altitude. <p> 0 deg = horizon, 90 d | ||||
eg = zenit, -90 deg = nadir */ | ||||
}; | }; | |||
/*! \struct ln_lnlat_posn | /*! \struct ln_lnlat_posn | |||
** \brief Ecliptical (or celestial) Longitude and Latitude. | ** \brief Ecliptical (or celestial) Longitude and Latitude. | |||
* | * | |||
* The Ecliptical (or celestial) Latitude and Longitude of and object. | * The Ecliptical (or celestial) Latitude and Longitude of and object. | |||
* | * | |||
* Angles are expressed in degrees. | * Angles are expressed in degrees. | |||
*/ | */ | |||
struct ln_lnlat_posn | struct ln_lnlat_posn | |||
{ | { | |||
double lng; /*!< longitude. Object longitude. | double lng; /*!< longitude. Object longitude. <p> | |||
Negative East of Greenwinch, | NOTE: IAU changed from positive west to negative west longitude | |||
positive West of Greenwinch */ | in 1982, however we will currently use the older convention of:- | |||
Negative East of Greenwich, | ||||
Positive West of Greenwich */ | ||||
double lat; /*!< latitude. Object latitude */ | double lat; /*!< latitude. Object latitude */ | |||
}; | }; | |||
/*! \struct ln_helio_posn | /*! \struct ln_helio_posn | |||
* \brief Heliocentric position | * \brief Heliocentric position | |||
* | * | |||
* A heliocentric position is an objects position relative to the | * A heliocentric position is an objects position relative to the | |||
* centre of the Sun. | * centre of the Sun. | |||
* | * | |||
* Angles are expressed in degrees. | * Angles are expressed in degrees. | |||
skipping to change at line 351 | skipping to change at line 357 | |||
* \brief Calculate the julian day from date. | * \brief Calculate the julian day from date. | |||
*/ | */ | |||
double get_julian_day (struct ln_date * date); | double get_julian_day (struct ln_date * date); | |||
/*! \fn void get_date (double JD, struct ln_date * date) | /*! \fn void get_date (double JD, struct ln_date * date) | |||
* \ingroup calendar | * \ingroup calendar | |||
* \brief Calculate the date from the julian day. | * \brief Calculate the date from the julian day. | |||
*/ | */ | |||
void get_date (double JD, struct ln_date * date); | void get_date (double JD, struct ln_date * date); | |||
/*! \fn void get_local_date (double JD, struct ln_date * date) | ||||
* \ingroup calender | ||||
* \brief Calculate the local date from the Julian day | ||||
*/ | ||||
void get_local_date (double JD, struct ln_date * date); | ||||
/*! \fn unsigned int get_day_of_week (struct ln_date * date) | /*! \fn unsigned int get_day_of_week (struct ln_date * date) | |||
* \ingroup calendar | * \ingroup calendar | |||
* \brief Calculate day of the week. | * \brief Calculate day of the week. | |||
*/ | */ | |||
unsigned int get_day_of_week (struct ln_date *date); | unsigned int get_day_of_week (struct ln_date *date); | |||
/*! \fn double get_julian_from_sys () | /*! \fn double get_julian_from_sys () | |||
* \brief Calculate julian day from system time. | * \brief Calculate julian day from system time. | |||
* \ingroup calendar | * \ingroup calendar | |||
*/ | */ | |||
skipping to change at line 373 | skipping to change at line 385 | |||
/*! \fn void get_ln_date_from_sys (struct ln_date * date) | /*! \fn void get_ln_date_from_sys (struct ln_date * date) | |||
* \brief Calculate date from system date | * \brief Calculate date from system date | |||
* \ingroup calendar | * \ingroup calendar | |||
*/ | */ | |||
void get_ln_date_from_sys (struct ln_date * date); | void get_ln_date_from_sys (struct ln_date * date); | |||
/*! \fn double get_julian_from_timet (time_t * time) | /*! \fn double get_julian_from_timet (time_t * time) | |||
* \brief Calculate julian day from time_t | * \brief Calculate julian day from time_t | |||
* \ingroup calendar | * \ingroup calendar | |||
*/ | */ | |||
double get_julian_from_timet (time_t * time); | double get_julian_from_timet (time_t * in_time); | |||
/*! \fn void get_timet_from_julian (double JD, time_t * time) | /*! \fn void get_timet_from_julian (double JD, time_t * time) | |||
* \brief Calculate time_t from julian day | * \brief Calculate time_t from julian day | |||
* \ingroup calendar | * \ingroup calendar | |||
*/ | */ | |||
void get_timet_from_julian (double JD, time_t * time); | void get_timet_from_julian (double JD, time_t * in_time); | |||
/*! \fn double get_julian_local_date(struct ln_date* date) | ||||
* \brief Calculate Julian day from local date | ||||
* \ingroup calendar | ||||
*/ | ||||
double get_julian_local_date(struct ln_date* date); | ||||
/*! \defgroup misc Misc Functions | /*! \defgroup misc Misc Functions | |||
*/ | */ | |||
/*! \fn double get_dec_location(char * s) | /*! \fn double get_dec_location(char * s) | |||
* \ingroup misc | * \ingroup misc | |||
* \brief Obtains Latitude, Longitude, RA or Declination from a string. | * \brief Obtains Latitude, Longitude, RA or Declination from a string. | |||
*/ | */ | |||
double get_dec_location(char *s); | double get_dec_location(char *s); | |||
skipping to change at line 533 | skipping to change at line 551 | |||
* \ingroup conversion | * \ingroup conversion | |||
*/ | */ | |||
void hhrz_to_hrz (struct lnh_hrz_posn * hpos, struct ln_hrz_posn * pos); | void hhrz_to_hrz (struct lnh_hrz_posn * hpos, struct ln_hrz_posn * pos); | |||
/*! \fn void hrz_to_hhrz (struct ln_hrz_posn * pos, struct lnh_hrz_posn * h pos) | /*! \fn void hrz_to_hhrz (struct ln_hrz_posn * pos, struct lnh_hrz_posn * h pos) | |||
* \brief double horizontal position to human readable horizontal position | * \brief double horizontal position to human readable horizontal position | |||
* \ingroup conversion | * \ingroup conversion | |||
*/ | */ | |||
void hrz_to_hhrz (struct ln_hrz_posn * pos, struct lnh_hrz_posn * hpos); | void hrz_to_hhrz (struct ln_hrz_posn * pos, struct lnh_hrz_posn * hpos); | |||
/*! \fn const char * hrz_to_nswe (struct ln_hrz_posn * pos); | ||||
* \brief returns direction of given azimut - like N,S,W,E,NSW,... | ||||
* \ingroup conversion | ||||
*/ | ||||
const char * hrz_to_nswe (struct ln_hrz_posn * pos); | ||||
/*! \fn void hlnlat_to_lnlat (struct lnh_lnlat_posn * hpos, struct ln_lnlat _posn * pos) | /*! \fn void hlnlat_to_lnlat (struct lnh_lnlat_posn * hpos, struct ln_lnlat _posn * pos) | |||
* \brief human readable long/lat position to double long/lat position | * \brief human readable long/lat position to double long/lat position | |||
* \ingroup conversion | * \ingroup conversion | |||
*/ | */ | |||
void hlnlat_to_lnlat (struct lnh_lnlat_posn * hpos, struct ln_lnlat_posn * pos); | void hlnlat_to_lnlat (struct lnh_lnlat_posn * hpos, struct ln_lnlat_posn * pos); | |||
/*! \fn void lnlat_to_hlnlat (struct ln_lnlat_posn * pos, struct lnh_lnlat_ posn * hpos) | /*! \fn void lnlat_to_hlnlat (struct ln_lnlat_posn * pos, struct lnh_lnlat_ posn * hpos) | |||
* \brief double long/lat position to human readable long/lat position | * \brief double long/lat position to human readable long/lat position | |||
* \ingroup conversion | * \ingroup conversion | |||
*/ | */ | |||
skipping to change at line 586 | skipping to change at line 610 | |||
/*! \defgroup transform Transformation of Coordinates | /*! \defgroup transform Transformation of Coordinates | |||
* | * | |||
* Transformations from one coordinate system to another. | * Transformations from one coordinate system to another. | |||
*/ | */ | |||
/*! \fn void get_hrz_from_equ (struct ln_equ_posn * object, struct ln_lnlat _posn * observer, double JD, struct ln_hrz_posn *position); | /*! \fn void get_hrz_from_equ (struct ln_equ_posn * object, struct ln_lnlat _posn * observer, double JD, struct ln_hrz_posn *position); | |||
* \brief Calculate horizontal coordinates from equatorial coordinates | * \brief Calculate horizontal coordinates from equatorial coordinates | |||
* \ingroup transform | * \ingroup transform | |||
*/ | */ | |||
/* Equ 12.5,12.6 pg 88 */ | /* Use get_mean_sidereal_time, get_hrz_from_equ_siderealtime */ | |||
void get_hrz_from_equ | void get_hrz_from_equ | |||
(struct ln_equ_posn * object, | (struct ln_equ_posn * object, | |||
struct ln_lnlat_posn * observer, | struct ln_lnlat_posn * observer, | |||
double JD, struct ln_hrz_posn *position); | double JD, struct ln_hrz_posn *position); | |||
/*! \fn void get_hrz_from_equ_sidereal_time (struct ln_equ_posn * object, s | ||||
truct ln_lnlat_posn * observer, double sidereal_time, struct ln_hrz_posn *p | ||||
osition); | ||||
* \brief Calculate horizontal coordinates from equatorial coordinates, | ||||
* using mean sidereal time. | ||||
* \ingroup transform | ||||
*/ | ||||
/* Equ 12.5,12.6 pg 88 */ | ||||
void get_hrz_from_equ_sidereal_time | ||||
(struct ln_equ_posn * object, | ||||
struct ln_lnlat_posn * observer, | ||||
double sidereal, struct ln_hrz_posn *position); | ||||
/*! \fn void get_equ_from_ecl (struct ln_lnlat_posn * object, double JD, st ruct ln_equ_posn * position); | /*! \fn void get_equ_from_ecl (struct ln_lnlat_posn * object, double JD, st ruct ln_equ_posn * position); | |||
* \brief Calculate equatorial coordinates from ecliptical coordinates | * \brief Calculate equatorial coordinates from ecliptical coordinates | |||
* \ingroup transform | * \ingroup transform | |||
*/ | */ | |||
/* Equ 12.3, 12.4 pg 89 */ | /* Equ 12.3, 12.4 pg 89 */ | |||
void get_equ_from_ecl | void get_equ_from_ecl | |||
(struct ln_lnlat_posn * object, | (struct ln_lnlat_posn * object, | |||
double JD, | double JD, | |||
struct ln_equ_posn * position); | struct ln_equ_posn * position); | |||
skipping to change at line 782 | skipping to change at line 817 | |||
struct ln_lnlat_posn * position); | struct ln_lnlat_posn * position); | |||
/*! \defgroup solar Solar. | /*! \defgroup solar Solar. | |||
* | * | |||
* Calculate solar ecliptical/equatorial coordinates for a given julian date . | * Calculate solar ecliptical/equatorial coordinates for a given julian date . | |||
* Accuracy 0.01 arc second error - uses VSOP87 solution. | * Accuracy 0.01 arc second error - uses VSOP87 solution. | |||
* | * | |||
* All angles are expressed in degrees. | * All angles are expressed in degrees. | |||
*/ | */ | |||
#define SOLAR_STANDART_HORIZONT -0.8333 | ||||
#define CIVIL_HORIZONT -6.0 | ||||
#define NAUTIC_HORIZONT -12.0 | ||||
#define ASTRONOMICAL_HORIZONT -18.0 | ||||
/*! \fn double get_solar_rst (double JD, struct ln_lnlat_posn * observer, s | ||||
truct ln_rst_time * rst); | ||||
* \brief Calculate the time of rise, set and transit for the Sun. | ||||
* \ingroup solar | ||||
*/ | ||||
int get_solar_rst_horizont (double JD, struct ln_lnlat_posn * observer, dou | ||||
ble horizont, struct ln_rst_time * rst); | ||||
/*! \fn double get_solar_rst (double JD, struct ln_lnlat_posn * observer, s truct ln_rst_time * rst); | /*! \fn double get_solar_rst (double JD, struct ln_lnlat_posn * observer, s truct ln_rst_time * rst); | |||
* \brief Calculate the time of rise, set and transit for the Sun. | * \brief Calculate the time of rise, set and transit for the Sun. | |||
* \ingroup solar | * \ingroup solar | |||
*/ | */ | |||
int get_solar_rst (double JD, struct ln_lnlat_posn * observer, struct ln_rs t_time * rst); | inline int get_solar_rst (double JD, struct ln_lnlat_posn * observer, struc t ln_rst_time * rst); | |||
/*! \fn void get_geom_solar_coords (double JD, struct ln_helio_posn * posit ion); | /*! \fn void get_geom_solar_coords (double JD, struct ln_helio_posn * posit ion); | |||
* \brief Calculate solar geometric coordinates. | * \brief Calculate solar geometric coordinates. | |||
* \ingroup solar | * \ingroup solar | |||
*/ | */ | |||
void get_geom_solar_coords | void get_geom_solar_coords | |||
(double JD, | (double JD, | |||
struct ln_helio_posn * position); | struct ln_helio_posn * position); | |||
/*! \fn void get_equ_solar_coords (double JD, struct ln_equ_posn * position ); | /*! \fn void get_equ_solar_coords (double JD, struct ln_equ_posn * position ); | |||
skipping to change at line 1539 | skipping to change at line 1585 | |||
/*! \fn double get_lunar_sdiam (double JD) | /*! \fn double get_lunar_sdiam (double JD) | |||
* \brief Calcaluate the semidiameter of the Moon in arc seconds. | * \brief Calcaluate the semidiameter of the Moon in arc seconds. | |||
* \ingroup lunar | * \ingroup lunar | |||
*/ | */ | |||
double get_lunar_sdiam (double JD); | double get_lunar_sdiam (double JD); | |||
/*! \fn double get_lunar_rst (double JD, struct ln_lnlat_posn * observer, s truct ln_rst_time * rst); | /*! \fn double get_lunar_rst (double JD, struct ln_lnlat_posn * observer, s truct ln_rst_time * rst); | |||
* \brief Calculate the time of rise, set and transit for the Moon. | * \brief Calculate the time of rise, set and transit for the Moon. | |||
* \ingroup lunar | * \ingroup lunar | |||
*/ | */ | |||
#define LUNAR_STANDART_HORIZONT 0.125 | ||||
int get_lunar_rst (double JD, struct ln_lnlat_posn * observer, struct ln_rs t_time * rst); | int get_lunar_rst (double JD, struct ln_lnlat_posn * observer, struct ln_rs t_time * rst); | |||
/*! \fn void get_lunar_geo_posn (double JD, struct ln_rect_posn * moon, dou ble precision); | /*! \fn void get_lunar_geo_posn (double JD, struct ln_rect_posn * moon, dou ble precision); | |||
* \brief Calculate the rectangular geocentric lunar cordinates. | * \brief Calculate the rectangular geocentric lunar cordinates. | |||
* \ingroup lunar | * \ingroup lunar | |||
*/ | */ | |||
/* ELP 2000-82B theory */ | /* ELP 2000-82B theory */ | |||
void get_lunar_geo_posn (double JD, struct ln_rect_posn * moon, double prec ision); | void get_lunar_geo_posn (double JD, struct ln_rect_posn * moon, double prec ision); | |||
/*! \fn void get_lunar_equ_coords (double JD, struct ln_equ_posn * position , double precision); | /*! \fn void get_lunar_equ_coords (double JD, struct ln_equ_posn * position , double precision); | |||
skipping to change at line 1893 | skipping to change at line 1942 | |||
*/ | */ | |||
int get_object_rst (double JD, struct ln_lnlat_posn * observer, struct ln_e qu_posn * object, struct ln_rst_time * rst); | int get_object_rst (double JD, struct ln_lnlat_posn * observer, struct ln_e qu_posn * object, struct ln_rst_time * rst); | |||
/*! \fn double get_object_next_rst (double JD, struct ln_lnlat_posn * obser ver, struct ln_equ_posn * object,struct ln_rst_time * rst); | /*! \fn double get_object_next_rst (double JD, struct ln_lnlat_posn * obser ver, struct ln_equ_posn * object,struct ln_rst_time * rst); | |||
* \brief Calculate the time of next rise, set and transit for an object not orbiting the Sun. | * \brief Calculate the time of next rise, set and transit for an object not orbiting the Sun. | |||
* E.g. it's sure, that rise, set and transit will be in <JD, JD+1> range. | * E.g. it's sure, that rise, set and transit will be in <JD, JD+1> range. | |||
* \ingroup rst | * \ingroup rst | |||
*/ | */ | |||
int get_object_next_rst (double JD, struct ln_lnlat_posn * observer, struct ln_equ_posn * object, struct ln_rst_time * rst); | int get_object_next_rst (double JD, struct ln_lnlat_posn * observer, struct ln_equ_posn * object, struct ln_rst_time * rst); | |||
#define STAR_STANDART_HORIZONT -0.5667 | ||||
int get_body_rst_horizont (double JD, struct ln_lnlat_posn * observer, void | ||||
(*get_equ_body_coords) (double, struct ln_equ_posn *), | ||||
double horizont, struct ln_rst_time * rst); | ||||
#ifdef __cplusplus | #ifdef __cplusplus | |||
}; | }; | |||
#endif | #endif | |||
#endif | #endif | |||
End of changes. 16 change blocks. | ||||
13 lines changed or deleted | 76 lines changed or added | |||