Skip to content

Commit abe2d58

Browse files
committed
More fixes and tweaks and more testing
1 parent c9d4889 commit abe2d58

33 files changed

+2585
-1215
lines changed

README.md

+107-58
Large diffs are not rendered by default.

examples/example.c

+238-329
Large diffs are not rendered by default.

include/novas.h

+11-24
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
#define NOVAS_AU_SEC ( NOVAS_AU / NOVAS_C )
8787

8888
/// [AU/day] Speed of light in AU/day. Value is 86400 / AU_SEC.
89-
#define NOVAS_C_AU_PER_DAY ( 86400.0 / AU_SEC )
89+
#define NOVAS_C_AU_PER_DAY ( 86400.0 / AU_SEC )
9090

9191
/// [km] Astronomical Unit in kilometers.
9292
#define NOVAS_AU_KM ( 1e-3 * NOVAS_AU )
@@ -205,7 +205,7 @@ enum novas_planet {
205205
*
206206
*/
207207
enum novas_observer_place {
208-
NOVAS_OBSERVER_AT_GEOCENTER = 0, ///< Calculate coordinates as if observing from the geocenter for location and Earth rotation independent coordinates.
208+
NOVAS_OBSERVER_AT_GEOCENTER = 0, ///< Calculate coordinates as if observing from the geocenter for location and Earth rotation independent coordinates.
209209
NOVAS_OBSERVER_ON_EARTH, ///< Observer is at a location that is in the rotating frame of Earth.
210210

211211
/**
@@ -226,10 +226,10 @@ enum novas_observer_place {
226226
* @sa astro_frame
227227
*/
228228
enum novas_reference_system {
229-
NOVAS_GCRS = 0, ///< Geocentric Celestial Reference system. Essentially the same as ICRS, but with velocities referenced to Earth's orbiting frame.
229+
NOVAS_GCRS = 0, ///< Geocentric Celestial Reference system. Essentially the same as ICRS but includes aberration and gravitational deflection.
230230
NOVAS_TOD, ///< True equinox Of Date: dynamical system of the true equator, with its origin at the true equinox (pre IAU 2006 system).
231231
NOVAS_CIRS, ///< Celestial Intermediate Reference System: dynamical system of the true equator, with its origin at the CIO (preferred since IAU 2006)
232-
NOVAS_ICRS ///< International Celestiual Reference system. The equatorial system fixed to the frame of distant quasars.
232+
NOVAS_ICRS ///< International Celestial Reference system. The equatorial system fixed to the frame of distant quasars.
233233
};
234234

235235
/**
@@ -259,8 +259,9 @@ enum novas_accuracy {
259259
* @sa on_surface
260260
*/
261261
enum novas_refraction_model {
262-
NOVAS_STANDARD_ATMOSPHERE = 0, ///< Uses a standard atmospheric model, ignoring all weather values defined for the specific observing location
263-
NOVAS_WEATHER_AT_LOCATION ///< Uses the weather parameters that are specified together with the observing location.
262+
NOVAS_NO_ATMOSPHERE = 0, ///< Do not apply atmospheric refraction correction
263+
NOVAS_STANDARD_ATMOSPHERE, ///< Uses a standard atmospheric model, ignoring all weather values defined for the specific observing location
264+
NOVAS_WEATHER_AT_LOCATION ///< Uses the weather parameters that are specified together with the observing location.
264265
};
265266

266267
/**
@@ -493,19 +494,6 @@ typedef struct {
493494
double ra_cio; ///< [arcsec] right ascension of the CIO with respect to the GCRS (arcseconds)
494495
} ra_of_cio;
495496

496-
/**
497-
* Fully defines the astronomical frame for which coordinates (including velocities) are calculated.
498-
*
499-
* @author Attila Kovacs
500-
* @since 1.0
501-
*/
502-
typedef struct {
503-
enum novas_reference_system basis_system; ///< Coordindate system type.
504-
enum novas_origin origin; ///< Location of origin (if type is NOVAS_ICRS)
505-
observer location; ///< Location of observer (if type is not NOVAS_ICRS)
506-
double jd_tdb; ///< [day] Barycentric Dynamical Time (TDB) based Julian date of observation.
507-
double ut1_to_tt; ///< [s] TT - UT1 time difference (if observer is on the surface of Earth, otherwise ignored.
508-
} astro_frame;
509497

510498
/**
511499
* Macro for converting epoch year to TT-based Julian date
@@ -605,7 +593,7 @@ short equ2ecl_vec(double jd_tt, enum novas_equator_type coord_sys, enum novas_ac
605593
short ecl2equ_vec(double jd_tt, enum novas_equator_type coord_sys, enum novas_accuracy accuracy, const double *pos1, double *pos2);
606594

607595
int equ2hor(double jd_ut1, double ut1_to_tt, enum novas_accuracy accuracy, double xp, double yp, const on_surface *location, double ra,
608-
double dec, short ref_option, double *zd, double *az, double *rar, double *decr);
596+
double dec, enum novas_refraction_model ref_option, double *zd, double *az, double *rar, double *decr);
609597

610598
short gcrs2equ(double jd_tt, enum novas_equator_type coord_sys, enum novas_accuracy accuracy, double rag, double decg, double *ra,
611599
double *dec);
@@ -680,8 +668,6 @@ double get_ut1_to_tt(int leap_seconds, double dut1);
680668

681669
int tdb2tt(double tdb_jd, double *tt_jd, double *secdiff);
682670

683-
double tt2tdb(double jd_tt);
684-
685671
short cio_ra(double jd_tt, enum novas_accuracy accuracy, double *ra_cio);
686672

687673
short cio_location(double jd_tdb, enum novas_accuracy accuracy, double *ra_cio, short *ref_sys);
@@ -731,8 +717,6 @@ int make_in_space(const double *sc_pos, const double *sc_vel, in_space *obs_spac
731717

732718
// Added API in SuperNOVAS
733719

734-
int place_in_frame(const object *source, const astro_frame *frame, enum novas_accuracy accuracy, sky_pos *pos);
735-
736720
int place_star(const cat_entry *star, const observer *obs, double jd_tt, double ut1_to_tt, enum novas_reference_system system,
737721
enum novas_accuracy accuracy, sky_pos *pos);
738722

@@ -744,6 +728,9 @@ int place_cirs(const object *source, double jd_tt, enum novas_accuracy accuracy,
744728

745729
int place_tod(const object *source, double jd_tt, enum novas_accuracy accuracy, sky_pos *pos);
746730

731+
int light_time2(double jd_tdb, const object *ss_object, const double *pos_obs, double tlight0, enum novas_accuracy accuracy, double *pos, double *vel, double *tlight);
732+
733+
double tt2tdb(double jd_tt);
747734

748735
int cio_set_locator_file(const char *filename);
749736

0 commit comments

Comments
 (0)