Skip to content

Commit

Permalink
Super tests, and corresponding fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Feb 18, 2024
1 parent c1c5452 commit 7d99b34
Show file tree
Hide file tree
Showing 8 changed files with 210 additions and 171 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -659,11 +659,11 @@ DE 405), either via the `ephem_manager()` interface of `solsys1.c` or via the `j
#### 2.1. Planets via `eph_manager`
To use the `eph_manager` interface for planet 1997 JPL planet ephemeris, you must either build superNOVAS with
`BUILTIN_SOLSYS1 = 1` in `config.mk`, or else link your application with `solsys1.c` and `ephem_manager.c` from
SuperNOVAS explicitly. If you want `eph_manager` to be your default ephemeris provider (the old way) you might also
want to set `DEFAULT_SOLSYS = 1` in `config.mk`. Otherwise, your application should set `eph_manager` as your
planetary ephemeris provider at runtime via:
To use the `eph_manager` interface for planet 1997 JPL planet ephemeris (DE200 through DE421), you must either build
superNOVAS with `BUILTIN_SOLSYS1 = 1` in `config.mk`, or else link your application with `solsys1.c` and
`ephem_manager.c` from SuperNOVAS explicitly. If you want `eph_manager` to be your default ephemeris provider (the old
way) you might also want to set `DEFAULT_SOLSYS = 1` in `config.mk`. Otherwise, your application should set
`eph_manager` as your planetary ephemeris provider at runtime via:
```c
set_planet_provider(planet_eph_manager);
Expand All @@ -673,7 +673,7 @@ planetary ephemeris provider at runtime via:
Either way, before you can use the ephemeris, you must also open the relevant ephemeris data file with `ephem_open()`:

```c
int de_number; // The DE number, e.g. 405 for DE 405
int de_number; // The DE number, e.g. 405 for DE405
double from_jd, to_jd; // [day] Julian date range of the ephemeris data

ephem_open("path-to/de405.bsp", &from_jd, &to_jd, &de_number);
Expand All @@ -689,8 +689,7 @@ Note, that at any given time `eph_manager()` can have only one ephemeris data fi
retrieve data from multiple ephemeris input files at the same time. (But you can with the CSPICE toolkit, which you
can integrate as discussed further above!)

That's all, except the warning that there is no guarantee that this method will work with newer JPL ephemeris data,
which may be in a different binary format.
That's all, except the warning that this method will not work with newer JPL ephemeris data, beyond DE421.


#### 2.b. Planets via JPL's `pleph` FORTRAN interface
Expand Down
2 changes: 2 additions & 0 deletions include/novas.h
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,8 @@ int place_gcrs(double jd_tt, const object *source, enum novas_accuracy accuracy,

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

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

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);

Expand Down
2 changes: 1 addition & 1 deletion include/nutation.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @param[out] deps [rad] δε Nutation (luni-solar + planetary) in obliquity, in radians.
* @return 0 if successful, or else -1 (errno should be set to indicate the type of error).
*
* @sa nutation()
* @sa nutation_angles()
* @sa iau2000a()
* @sa iau2000b()
* @sa iau2000k()
Expand Down
8 changes: 5 additions & 3 deletions include/solarsystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ typedef int (*novas_ephem_provider)(long id, const char *name, double jd_tdb_hig
* is responsible for calling free() on the returned value when it is no
* longer needed.
*
* @sa novas_ephem_provider()
* @sa novas_ephem_provider
* @sa ephemeris()
* @sa NOVAS_EPHEM_OBJECT
*
Expand Down Expand Up @@ -218,7 +218,8 @@ novas_ephem_provider get_ephem_provider();
* @sa novas_planet
* @sa solarsystem_hp()
* @sa set_planet_provider()
* @sa novas_solarsystem_func
* @sa place()
* @sa ephemeris()
*/
short solarsystem (double jd_tdb, short body, short origin, double *position, double *velocity);

Expand Down Expand Up @@ -257,7 +258,8 @@ short solarsystem (double jd_tdb, short body, short origin, double *position, do
*
* @sa solarsystem()
* @sa set_planet_provider_hp()
* @sa novas_solarsystem_hp_func
* @sa place()
* @sa ephemeris()
*/
short solarsystem_hp(const double jd_tdb[2], short body, short origin, double *position, double *velocity);

Expand Down
Loading

0 comments on commit 7d99b34

Please sign in to comment.