![]() |
SuperNOVAS v1.5
The NOVAS C library, made better
|
Solar-system ephemeris lookup via the NAIF CSPICE library. More...
Functions | |
int | cspice_add_kernel (const char *filename) |
Adds a SPICE kernel to the currently managed open kernels. | |
int | cspice_remove_kernel (const char *filename) |
Removes a SPICE kernel from the currently managed open kernels. | |
int | novas_use_cspice () |
Sets CSPICE as the default ephemeris provider for all types of Solar-system objects (both NOVAS_PLANET and NOVAS_EPHEM_OBJECT types). | |
int | novas_use_cspice_ephem () |
Sets a ephemeris provider for NOVAS_EPHEM_OBJECT types using the NAIF CSPICE library. | |
int | novas_use_cspice_planets () |
Sets CSPICE as the ephemeris provider for the major planets (and Sun, Moon, SSB...) using the NAIF CSPICE library. | |
Solar-system ephemeris lookup via the NAIF CSPICE library.
This is an optional component of SuperNOVAS, which interfaces to the NAIF CSPICE Toolkit. As such, you may need the CSPICE runtime libraries in an accessible location (such as in /usr/lib
), and you will need development files (C headers under a cspice/
sub-folder, such as in /usr/include/cspice/
; and unversioned libraries) to build. Thus, this module is compiled only if CSPICE_SUPPORT
is set to 1 prior to the build.
Before building SuperNOVAS against CSPICE, you might want to check out the Smithsonian/cspice-sharedlib
repository on Github to facilitate the building of CSPICE as a shared library instead of the static library built by the uptream distribution.
To use, simply include novas-cspice.h
in your application source, load the requisite SPICE kernels (ephemeris data and more) using cspice_add_kernel()
, and then activate them with novas_use_cspice()
. E.g.,
The CSPICE plugin will use the ID numbers stored in the object structure. For planets, it will automatically translate NOVAS planet IDs to NAIF IDs, while for other Solar-system bodies, you should set the NAIF ID when defining the object via make_ephem_object()
. If the ID is set to -1, then name-based lookup will be used instead.
REFERENCES: