![]() |
SuperNOVAS v1.5
The NOVAS C library, made better
|
Solar-system ephemeris lookup via the CALCEPH C library. More...
Functions | |
int | novas_calceph_use_ids (enum novas_id_type idtype) |
Sets the type of Solar-system body IDs to use as object.number with NOVAS_EPHEM_OBJECT types. | |
int | novas_use_calceph (t_calcephbin *eph) |
Sets a ephemeris provider for Solar-system objects using the CALCEPH C library and the specified set of ephemeris files. | |
int | novas_use_calceph_planets (t_calcephbin *eph) |
Sets the CALCEPH C library and the specified ephemeris data as the ephemeris provider for the major planets (and Sun, Moon, SSB...). | |
Solar-system ephemeris lookup via the CALCEPH C library.
This is an optional component of SuperNOVAS, which interfaces to the CALCEPH C library. As such, you may need the CALCEPH runtime libraries in an accessible location (such as in /usr/lib
) to use, and you will need development files (C headers and unversioned libraries) to build. Thus, this module is compiled only if CALCEPH_SUPPORT
is set to 1 prior to the build.
To use, simply include novas-calceph.h
in your application source, configure a t_calcephbin
object with the requisite ephemeris data, and then call novas_use_calceph()
with it to activate. E.g.:
Optionally, you may use a separate ephemeris dataset for major planets (or if planet ephemeris was included in 'eph' above, you don't have to):
By default the CALCEPH plugin will use NAIF ID numbers for the lookup (for planets the NOVAS IDs will be mapped to NAIF IDs automatically). You can enable name-based lookup by setting the object number to -1 (e.g. in make_ephem_object()
), or else switch to using CALCEPH IDs by calling novas_calceph_use_ids(NOVAS_ID_CALCEPH)
.
REFERENCES:
int novas_calceph_use_ids | ( | enum novas_id_type | idtype | ) |
Sets the type of Solar-system body IDs to use as object.number with NOVAS_EPHEM_OBJECT types.
CALCEPH supports the use of both NAIF and its own numbering system to identify Solar-system bodies. So, this function gives you the choice on which numbering system you want to use in object data structures. The choice does not affect major planets (which always use the NOVAS numbering scheme), or catalog objects.
idtype | NOVAS_ID_NAIF to use NAIF IDs (default) or else NOVAS_ID_CALCEPH to use the CALCEPH body numbering convention for object. |
References NOVAS_ID_CALCEPH, and NOVAS_ID_NAIF.
int novas_use_calceph | ( | t_calcephbin * | eph | ) |
Sets a ephemeris provider for Solar-system objects using the CALCEPH C library and the specified set of ephemeris files.
If the supplied ephemeris files contain data for major planets also, they can be used by planet_calceph() / planet_calceph_hp() also, unless a separate CALCEPH ephemeris data is set via novas_use_calceph_planets().
The call also make CALCEPH the default ephemeris provider for all types of Solar-system objects. If you want to use another provider for major planets, you need to call set_planet_provider() / set_planet_provider_hp() afterwards to specify a different provider for the major planets (and Sun, Moon, SSB...).
eph | Pointer to the CALCEPH ephemeris data that have been opened. |
References novas_use_calceph_planets(), and set_ephem_provider().
int novas_use_calceph_planets | ( | t_calcephbin * | eph | ) |
Sets the CALCEPH C library and the specified ephemeris data as the ephemeris provider for the major planets (and Sun, Moon, SSB...).
eph | Pointer to the CALCEPH ephemeris data for the major planets (including Sun, Moon, SSB...) that have been opened. |
References set_planet_provider(), and set_planet_provider_hp().