diff --git a/build.mk b/build.mk index 3e7f82c0..fabef555 100644 --- a/build.mk +++ b/build.mk @@ -51,7 +51,7 @@ distclean: distclean-local .PHONY: check check: @echo " [check]" - @cppcheck $(CPPFLAGS) $(CHECKOPTS) src + @cppcheck $(CPPFLAGS) $(CHECKOPTS) $(SRC) # Doxygen documentation (HTML and man pages) under apidocs/ .PHONY: dox diff --git a/config.mk b/config.mk index a051c745..4b7d98e9 100644 --- a/config.mk +++ b/config.mk @@ -21,7 +21,7 @@ CC ?= gcc CPPFLAGS += -I$(INC) # Base compiler options (if not defined externally...) -CFLAGS ?= -Os -Wall +CFLAGS ?= -Os -Wall -std=c99 # Extra warnings (not supported on all compilers) #CFLAGS += -Wextra @@ -97,7 +97,7 @@ DEFAULT_SOLSYS ?= 3 # cppcheck options for 'check' target. You can add additional options by # setting the CHECKEXTRA variable (e.g. in shell) prior to invoking 'make'. CHECKOPTS ?= --enable=performance,warning,portability,style --language=c \ - --error-exitcode=1 $(CHECKEXTRA) + --error-exitcode=1 --std=c99 $(CHECKEXTRA) # Exhaustive checking for newer cppcheck... #CHECKOPTS += --check-level=exhaustive diff --git a/include/novas.h b/include/novas.h index d68c9e6d..58cf2969 100644 --- a/include/novas.h +++ b/include/novas.h @@ -19,11 +19,16 @@ #ifndef _NOVAS_ #define _NOVAS_ -#include // for M_PI +#include // for sin, cos #include // NULL #include #include +/// Definition of π in case it's not defined in math.h +#ifndef M_PI +# define M_PI 3.14159265358979323846 +#endif + // The upstream NOVAS library had a set of include statements that really were not necessary // First, including standard libraries here meant that those libraries were included in the // source code of any application that included 'novas.h', even if that source code did not @@ -770,7 +775,7 @@ typedef struct { * @see novas_change_observer() */ typedef struct { - int64_t state; ///< An internal state for checking validity. + uint64_t state; ///< An internal state for checking validity. enum novas_accuracy accuracy; ///< NOVAS_FULL_ACCURACY or NOVAS_REDUCED_ACCURACY novas_timespec time; ///< The instant of time for which this observing frame is valid observer observer; ///< The observer location, or NULL for barycentric diff --git a/src/eph_manager.c b/src/eph_manager.c index 3f37dbf6..4862c6e8 100644 --- a/src/eph_manager.c +++ b/src/eph_manager.c @@ -268,8 +268,8 @@ short planet_ephemeris(const double tjd[2], enum de_planet target, enum de_plane int do_earth = 0, do_moon = 0; double jed[2]; - double pos_moon[3] = { }, vel_moon[3] = { }, pos_earth[3] = { }, vel_earth[3] = { }; - double target_pos[3] = { }, target_vel[3] = { }, center_pos[3] = { }, center_vel[3] = { }; + double pos_moon[3] = {0}, vel_moon[3] = {0}, pos_earth[3] = {0}, vel_earth[3] = {0}; + double target_pos[3] = {0}, target_vel[3] = {0}, center_pos[3] = {0}, center_vel[3] = {0}; if(!tjd || !position || !velocity) return novas_error(-1, EINVAL, "planet_ephemeris", "NULL parameter: tjd=%p, position=%p, velocity=%p", tjd, position, velocity); diff --git a/src/frames.c b/src/frames.c index ce85515b..c0f7bfb5 100644 --- a/src/frames.c +++ b/src/frames.c @@ -306,9 +306,10 @@ static int is_frame_initialized(const novas_frame *frame) { */ int novas_make_frame(enum novas_accuracy accuracy, const observer *obs, const novas_timespec *time, double dx, double dy, novas_frame *frame) { - static const char *fn = "novas_create_frame"; - static const object earth = { NOVAS_PLANET, NOVAS_EARTH, "Earth" }; - static const object sun = { NOVAS_PLANET, NOVAS_SUN, "Sun" }; + static const char *fn = "novas_make_frame"; + static const cat_entry zero_star = {0}; + static const object earth = { NOVAS_PLANET, NOVAS_EARTH, "Earth", zero_star }; + static const object sun = { NOVAS_PLANET, NOVAS_SUN, "Sun", zero_star }; double tdb2[2]; double mobl, tobl, ee, dpsi, deps; @@ -769,10 +770,10 @@ int novas_app_to_hor(const novas_frame *frame, enum novas_reference_system sys, switch(sys) { case NOVAS_J2000: matrix_transform(pos, &frame->precession, pos); - /* no break */ + /* fallthrough */ case NOVAS_MOD: matrix_transform(pos, &frame->nutation, pos); - /* no break */ + /* fallthrough */ case NOVAS_TOD: spin(15.0 * frame->gst, pos, pos); break; @@ -780,7 +781,7 @@ int novas_app_to_hor(const novas_frame *frame, enum novas_reference_system sys, case NOVAS_ICRS: case NOVAS_GCRS: matrix_transform(pos, &frame->gcrs_to_cirs, pos); - /* no break */ + /* fallthrough */ case NOVAS_CIRS: spin(frame->era, pos, pos); break; @@ -941,15 +942,16 @@ int novas_app_to_geom(const novas_frame *frame, enum novas_reference_system sys, case NOVAS_TOD: matrix_inv_rotate(app_pos, &frame->nutation, app_pos); - /* no break */ + /* fallthrough */ case NOVAS_MOD: matrix_inv_rotate(app_pos, &frame->precession, app_pos); - /* no break */ + /* fallthrough */ case NOVAS_J2000: matrix_inv_rotate(app_pos, &frame->icrs_to_j2000, app_pos); break; default: // nothing to do. + ; } // Undo aberration correction @@ -1044,19 +1046,19 @@ int novas_make_transform(const novas_frame *frame, enum novas_reference_system f cat_transform(transform, &frame->gcrs_to_cirs, -1); if(to_system == NOVAS_GCRS) return 0; - /* no break */ + /* fallthrough */ case NOVAS_GCRS: cat_transform(transform, &frame->icrs_to_j2000, 1); if(to_system == NOVAS_J2000) return 0; - /* no break */ + /* fallthrough */ case NOVAS_J2000: cat_transform(transform, &frame->precession, 1); if(to_system == NOVAS_MOD) return 0; - /* no break */ + /* fallthrough */ case NOVAS_MOD: cat_transform(transform, &frame->nutation, 1); @@ -1064,6 +1066,7 @@ int novas_make_transform(const novas_frame *frame, enum novas_reference_system f default: // nothing to do... + ; } } else { @@ -1072,19 +1075,19 @@ int novas_make_transform(const novas_frame *frame, enum novas_reference_system f cat_transform(transform, &frame->nutation, -1); if(to_system == NOVAS_MOD) return 0; - /* no break */ + /* fallthrough */ case NOVAS_MOD: cat_transform(transform, &frame->precession, -1); if(to_system == NOVAS_J2000) return 0; - /* no break */ + /* fallthrough */ case NOVAS_J2000: cat_transform(transform, &frame->icrs_to_j2000, -1); if(to_system == NOVAS_GCRS) return 0; - /* no break */ + /* fallthrough */ case NOVAS_GCRS: cat_transform(transform, &frame->gcrs_to_cirs, 1); @@ -1092,6 +1095,7 @@ int novas_make_transform(const novas_frame *frame, enum novas_reference_system f default: // nothing to do... + ; } } diff --git a/src/novas.c b/src/novas.c index 35ebb0e0..113951b2 100644 --- a/src/novas.c +++ b/src/novas.c @@ -691,7 +691,7 @@ int set_planet_provider_hp(novas_planet_provider_hp func) { int place_star(double jd_tt, const cat_entry *star, const observer *obs, double ut1_to_tt, enum novas_reference_system system, enum novas_accuracy accuracy, sky_pos *pos) { static const char *fn = "place_star"; - object source = { }; + object source = {0}; if(!star || !pos) return novas_error(-1, EINVAL, fn, "NULL input star=%p or output pos=%p pointer", star, pos); @@ -741,7 +741,7 @@ int place_star(double jd_tt, const cat_entry *star, const observer *obs, double */ int radec_star(double jd_tt, const cat_entry *star, const observer *obs, double ut1_to_tt, enum novas_reference_system sys, enum novas_accuracy accuracy, double *ra, double *dec, double *rv) { - sky_pos output = { }; + sky_pos output = {0}; // Default return values in case of error. if(ra) @@ -804,7 +804,7 @@ int radec_star(double jd_tt, const cat_entry *star, const observer *obs, double int radec_planet(double jd_tt, const object *ss_body, const observer *obs, double ut1_to_tt, enum novas_reference_system sys, enum novas_accuracy accuracy, double *ra, double *dec, double *dis, double *rv) { static const char *fn = "radec_planet"; - sky_pos output = { }; + sky_pos output = {0}; // Default return values in case of error. if(ra) @@ -1105,7 +1105,7 @@ short astro_planet(double jd_tt, const object *ss_body, enum novas_accuracy accu short topo_star(double jd_tt, double ut1_to_tt, const cat_entry *star, const on_surface *position, enum novas_accuracy accuracy, double *ra, double *dec) { static const char *fn = "topo_star"; - observer obs = { }; + observer obs = {0}; prop_error(fn, make_observer(NOVAS_OBSERVER_ON_EARTH, position, NULL, &obs), 0); prop_error(fn, radec_star(jd_tt, star, &obs, ut1_to_tt, NOVAS_TOD, accuracy, ra, dec, NULL), 0); return 0; @@ -1148,7 +1148,7 @@ short topo_star(double jd_tt, double ut1_to_tt, const cat_entry *star, const on_ short local_star(double jd_tt, double ut1_to_tt, const cat_entry *star, const on_surface *position, enum novas_accuracy accuracy, double *ra, double *dec) { static const char *fn = "local_star"; - observer obs = { }; + observer obs = {0}; prop_error(fn, make_observer(NOVAS_OBSERVER_ON_EARTH, position, NULL, &obs), 0); prop_error(fn, radec_star(jd_tt, star, &obs, ut1_to_tt, NOVAS_GCRS, accuracy, ra, dec, NULL), 0); return 0; @@ -1196,7 +1196,7 @@ short local_star(double jd_tt, double ut1_to_tt, const cat_entry *star, const on short topo_planet(double jd_tt, const object *ss_body, double ut1_to_tt, const on_surface *position, enum novas_accuracy accuracy, double *ra, double *dec, double *dis) { static const char *fn = "topo_planet"; - observer obs = { }; + observer obs = {0}; prop_error(fn, make_observer(NOVAS_OBSERVER_ON_EARTH, position, NULL, &obs), 0); prop_error(fn, radec_planet(jd_tt, ss_body, &obs, ut1_to_tt, NOVAS_TOD, accuracy, ra, dec, dis, NULL), 0); return 0; @@ -1238,7 +1238,7 @@ short topo_planet(double jd_tt, const object *ss_body, double ut1_to_tt, const o short local_planet(double jd_tt, const object *ss_body, double ut1_to_tt, const on_surface *position, enum novas_accuracy accuracy, double *ra, double *dec, double *dis) { static const char *fn = "local_planet"; - observer obs = { }; + observer obs = {0}; prop_error(fn, make_observer(NOVAS_OBSERVER_ON_EARTH, position, NULL, &obs), 0); prop_error(fn, radec_planet(jd_tt, ss_body, &obs, ut1_to_tt, NOVAS_GCRS, accuracy, ra, dec, dis, NULL), 0); return 0; @@ -1272,7 +1272,7 @@ short local_planet(double jd_tt, const object *ss_body, double ut1_to_tt, const */ short mean_star(double jd_tt, double tra, double tdec, enum novas_accuracy accuracy, double *ira, double *idec) { static const char *fn = "mean_star"; - cat_entry star = { }; + cat_entry star = {0}; double pos[3]; int iter; @@ -1347,6 +1347,7 @@ short mean_star(double jd_tt, double tra, double tdec, enum novas_accuracy accur int obs_posvel(double jd_tdb, double ut1_to_tt, enum novas_accuracy accuracy, const observer *obs, const double *geo_pos, const double *geo_vel, double *pos, double *vel) { static const char *fn = "get_obs_posvel"; + static const cat_entry zero_star = {0}; if(!obs) return novas_error(-1, EINVAL, fn, "NULL observer parameter"); @@ -1367,7 +1368,7 @@ int obs_posvel(double jd_tdb, double ut1_to_tt, enum novas_accuracy accuracy, co if(!geo_pos || !geo_vel) { const double tdb2[2] = { jd_tdb }; - object earth = { NOVAS_PLANET, NOVAS_EARTH, "Earth" }; + object earth = { NOVAS_PLANET, NOVAS_EARTH, "Earth", zero_star }; double gpos[3], gvel[3]; prop_error(fn, ephemeris(tdb2, &earth, NOVAS_BARYCENTER, accuracy, gpos, gvel), 0); if(pos) @@ -1389,7 +1390,7 @@ int obs_posvel(double jd_tdb, double ut1_to_tt, enum novas_accuracy accuracy, co case NOVAS_OBSERVER_ON_EARTH: case NOVAS_AIRBORNE_OBSERVER: case NOVAS_OBSERVER_IN_EARTH_ORBIT: { - double pog[3] = { }, vog[3] = { }; + double pog[3] = {0}, vog[3] = {0}; int i; // For topocentric place, get geocentric position and velocity vectors @@ -1407,6 +1408,7 @@ int obs_posvel(double jd_tdb, double ut1_to_tt, enum novas_accuracy accuracy, co default: // Nothing to do + ; } return 0; @@ -1492,7 +1494,7 @@ short place(double jd_tt, const object *source, const observer *location, double static THREAD_LOCAL double peb[3], veb[3], psb[3]; observer obs; - novas_planet_bundle planets = {}; + novas_planet_bundle planets = {0}; int pl_mask = (accuracy == NOVAS_FULL_ACCURACY) ? grav_bodies_full_accuracy : grav_bodies_reduced_accuracy; double x, jd_tdb, pob[3], vob[3], pos[3] = { 0 }, vel[3], vpos[3], t_light, d_sb; int i; @@ -1659,6 +1661,7 @@ short place(double jd_tt, const object *source, const observer *location, double default: // Nothing else to do. + ; } // --------------------------------------------------------------------- @@ -3363,6 +3366,7 @@ short geo_posvel(double jd_tt, double ut1_to_tt, enum novas_accuracy accuracy, c static THREAD_LOCAL double t_last = 0; static THREAD_LOCAL enum novas_accuracy acc_last = -1; static THREAD_LOCAL double gast; + static const cat_entry zero_star = {0}; double gmst, eqeq, pos1[3], vel1[3], jd_tdb, jd_ut1; @@ -3437,7 +3441,7 @@ short geo_posvel(double jd_tt, double ut1_to_tt, enum novas_accuracy accuracy, c } case NOVAS_SOLAR_SYSTEM_OBSERVER: { // Observer in Solar orbit - const object earth = { NOVAS_PLANET, NOVAS_EARTH, "Earth" }; + const object earth = { NOVAS_PLANET, NOVAS_EARTH, "Earth", zero_star }; const double tdb[2] = { jd_tdb, 0.0 }; int i; @@ -3514,7 +3518,7 @@ int light_time2(double jd_tdb, const object *body, const double *pos_obs, double static const char *fn = "light_time2"; int iter = 0; - double tol, jd[2] = { }; + double tol, jd[2] = {0}; if(!tlight) return novas_error(-1, EINVAL, fn, "NULL 'tlight' output pointer"); @@ -3893,9 +3897,10 @@ int obs_planets(double jd_tdb, enum novas_accuracy accuracy, const double *pos_o */ short grav_def(double jd_tdb, enum novas_observer_place unused, enum novas_accuracy accuracy, const double *pos_src, const double *pos_obs, double *out) { + (void) unused; static const char *fn = "grav_def"; - novas_planet_bundle planets = {}; + novas_planet_bundle planets = {0}; int pl_mask = (accuracy == NOVAS_FULL_ACCURACY) ? grav_bodies_full_accuracy : grav_bodies_reduced_accuracy; if(!pos_src || !out) @@ -3943,7 +3948,7 @@ short grav_def(double jd_tdb, enum novas_observer_place unused, enum novas_accur */ int grav_vec(const double *pos_src, const double *pos_obs, const double *pos_body, double rmass, double *out) { static const char *fn = "grav_vec"; - double pq[3], pe[3], pmag, emag, qmag, phat[3] = { }, ehat[3], qhat[3]; + double pq[3], pe[3], pmag, emag, qmag, phat[3] = {0}, ehat[3], qhat[3]; int i; if(!pos_src || !out) @@ -4318,7 +4323,7 @@ double rad_vel2(const object *source, const double *pos_emit, const double *vel_ if(source->number > 0 && source->number < NOVAS_PLANETS) rel *= (1.0 + zpl[source->number]); } - /* no break */ + /* fallthrough */ case NOVAS_EPHEM_OBJECT: // Solar potential at source (bodies strictly outside the Sun's volume) @@ -5412,7 +5417,7 @@ short cio_array(double jd_tdb, long n_pts, ra_of_cio *cio) { // Check if it's a new file if(last_file != cio_file) { - char line[80] = {}; + char line[80] = {0}; int version, tokens; last_file = NULL; @@ -5627,7 +5632,7 @@ novas_ephem_provider get_ephem_provider() { short ephemeris(const double *jd_tdb, const object *body, enum novas_origin origin, enum novas_accuracy accuracy, double *pos, double *vel) { static const char *fn = "ephemeris"; - double posvel[6] = { }; + double posvel[6] = {0}; int error = 0; if(!jd_tdb || !body) @@ -5688,7 +5693,7 @@ short ephemeris(const double *jd_tdb, const object *body, enum novas_origin orig // Check and adjust the origins as necessary. if(origin != eph_origin) { - double pos0[3] = { }, vel0[3] = { }; + double pos0[3] = {0}, vel0[3] = {0}; enum novas_planet refnum = (origin == NOVAS_BARYCENTER) ? NOVAS_SSB : NOVAS_SUN; int i; @@ -6475,7 +6480,7 @@ short make_observer(enum novas_observer_place where, const on_surface *loc_surfa return novas_error(-1, EINVAL, fn, "NULL in space location (for velocity)"); memcpy(&obs->near_earth.sc_vel, loc_space->sc_vel, sizeof(loc_space->sc_vel)); - /* no break */ + /* fallthrough */ case NOVAS_OBSERVER_ON_EARTH: if(!loc_surface) diff --git a/src/refract.c b/src/refract.c index 29ccdfae..cd276c55 100644 --- a/src/refract.c +++ b/src/refract.c @@ -81,7 +81,7 @@ double novas_inv_refract(RefractionModel model, double jd_tt, const on_surface * /** * Returns an optical refraction correction for a standard atmosphere. * - * @param jd_tt [day] Terrestrial Time (TT) based Julian data of observation + * @param jd_tt [day] Terrestrial Time (TT) based Julian data of observation (unused in this implementation of RefractionModel) * @param loc Pointer to structure defining the observer's location on earth, and local weather * @param type Whether the input elevation is observed or astrometric: REFRACT_OBSERVED (-1) or * REFRACT_ASTROMETRIC (0). @@ -96,6 +96,7 @@ double novas_inv_refract(RefractionModel model, double jd_tt, const on_surface * * @sa refract_astro() */ double novas_standard_refraction(double jd_tt, const on_surface *loc, enum novas_refraction_type type, double el) { + (void) jd_tt; double dz = novas_refraction(NOVAS_STANDARD_ATMOSPHERE, loc, type, el); if(isnan(dz)) return novas_trace_nan("novas_optical_refraction"); @@ -105,7 +106,7 @@ double novas_standard_refraction(double jd_tt, const on_surface *loc, enum novas /** * Returns an optical refraction correction using the weather parameters defined for the observer location. * - * @param jd_tt [day] Terrestrial Time (TT) based Julian data of observation + * @param jd_tt [day] Terrestrial Time (TT) based Julian data of observation (unused in this implementation of RefractionModel) * @param loc Pointer to structure defining the observer's location on earth, and local weather * @param type Whether the input elevation is observed or astrometric: REFRACT_OBSERVED (-1) or * REFRACT_ASTROMETRIC (0). @@ -120,6 +121,7 @@ double novas_standard_refraction(double jd_tt, const on_surface *loc, enum novas * @sa refract_astro() */ double novas_optical_refraction(double jd_tt, const on_surface *loc, enum novas_refraction_type type, double el) { + (void) jd_tt; double dz = novas_refraction(NOVAS_WEATHER_AT_LOCATION, loc, type, el); if(isnan(dz)) return novas_trace_nan("novas_optical_refraction"); @@ -139,7 +141,7 @@ double novas_optical_refraction(double jd_tt, const on_surface *loc, enum novas_ *
  • Berman, Allan L., and Rockwell, Stephen T. (1976), NASA JPL Technical Report 32-1601
  • * * - * @param jd_tt [day] Terrestrial Time (TT) based Julian data of observation + * @param jd_tt [day] Terrestrial Time (TT) based Julian data of observation (unused in this implementation of RefractionModel) * @param loc Pointer to structure defining the observer's location on earth, and local weather. * Make sure all weather values, including humidity (added in v1.1), are fully * populated. @@ -154,6 +156,7 @@ double novas_optical_refraction(double jd_tt, const on_surface *loc, enum novas_ * @sa on_surface */ double novas_radio_refraction(double jd_tt, const on_surface *loc, enum novas_refraction_type type, double el) { + (void) jd_tt; static const char *fn = "novas_radio_refraction"; // Various coefficients... static const double E[] = { 0.0, 46.625, 45.375, 4.1572, 1.4468, 0.25391, 2.2716, -1.3465, -4.3877, 3.1484, 4.520, -1.8982, 0.8900 }; diff --git a/src/solsys2.c b/src/solsys2.c index 3eea275c..fafa45c5 100644 --- a/src/solsys2.c +++ b/src/solsys2.c @@ -87,7 +87,7 @@ short planet_jplint(double jd_tdb, enum novas_planet body, enum novas_origin ori static const char *fn = "planet_jplint"; long targ, cent, err_flg = 0; - double posvel[6] = { }; + double posvel[6] = {0}; const double jd2[2] = { jd_tdb }; int i; @@ -179,7 +179,7 @@ short planet_jplint_hp(const double jd_tdb[2], enum novas_planet body, enum nova static const char *fn = "planet_jplint_hp"; long targ, cent, err_flg = 0; - double posvel[6] = { }; + double posvel[6] = {0}; int i; if(!jd_tdb) diff --git a/src/super.c b/src/super.c index f42b06a4..4ef504cb 100644 --- a/src/super.c +++ b/src/super.c @@ -872,7 +872,7 @@ int grav_undo_planets(const double *pos_app, const double *pos_obs, const novas_ static const char *fn = "grav_undo_planets"; const double tol = 1e-13; - double pos_def[3] = { }, pos0[3] = { }; + double pos_def[3] = {0}, pos0[3] = {0}; double l; int i; @@ -958,7 +958,7 @@ int grav_undo_planets(const double *pos_app, const double *pos_obs, const novas_ int grav_undef(double jd_tdb, enum novas_accuracy accuracy, const double *pos_app, const double *pos_obs, double *out) { static const char *fn = "grav_undef"; - novas_planet_bundle planets = {}; + novas_planet_bundle planets = {0}; int pl_mask = (accuracy == NOVAS_FULL_ACCURACY) ? grav_bodies_full_accuracy : grav_bodies_reduced_accuracy; if(!pos_app || !out) @@ -1042,7 +1042,7 @@ int make_ephem_object(const char *name, long num, object *body) { * @author Attila Kovacs */ int make_airborne_observer(const on_surface *location, const double *vel, observer *obs) { - in_space motion = { }; + in_space motion = {0}; if(!vel) return novas_error(-1, EINVAL, "make_airborne_observer", "NULL velocity"); diff --git a/tatus b/tatus deleted file mode 100644 index 625879e1..00000000 --- a/tatus +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/README.md b/README.md -index 1e968b7..748d28e 100644 ---- a/README.md -+++ b/README.md -@@ -68,7 +68,7 @@ having to change existing (functional) code you may have written for NOVAS C. - SuperNOVAS is currently based on NOVAS C version 3.1. We plan to rebase SuperNOVAS to the latest upstream release of  - the NOVAS C library, if new releases become available. -  --SuperNOVAS is maintained by [Attila Kovacs](https://github.com/attipaci) at the Center for Astrophysics \| Harvard  -+SuperNOVAS is maintained by [Attila Kovács](https://github.com/attipaci) at the Center for Astrophysics \| Harvard  - & Smithsonian, and it is available through the [Smithsonian/SuperNOVAS](https://github.com/Smithsonian/SuperNOVAS)  - repository on GitHub. -  -diff --git a/include/novas.h b/include/novas.h -index 1881dc5..0ba5bf2 100644 ---- a/include/novas.h -+++ b/include/novas.h -@@ -1269,6 +1269,7 @@ double novas_inv_refract(RefractionModel model, double jd_tt, const on_surface * - #ifdef __NOVAS_INTERNAL_API__ -  - # include  -+# include  -  - #define _CONSTS_ -  -diff --git a/src/novas.c b/src/novas.c -index d6fbb08..544ada2 100644 ---- a/src/novas.c -+++ b/src/novas.c -@@ -114,7 +114,7 @@ static int is_case_sensitive = 0; ///< (boolean) whether object names are case-s - * @param n error code that was received. - * @param offset Offset to add to error code (if <0) to return. - * -- * @sa novas_print_error() -+ * @sa novas_error() - */ - int novas_trace(const char *loc, int n, int offset) { - if(n != 0) { -@@ -133,7 +133,7 @@ int novas_trace(const char *loc, int n, int offset) { - * @param from {string} Function (:location) where error originated - * @param desc {string} Description of error, with information to convey to user. - * -- * @sa novas_print_error() -+ * @sa novas_error() - * @sa novas_debug() - * - * @since 1.0