Loading...
Searching...
No Matches
solsys-calceph.c File Reference

Solar-system ephemeris lookup via the CALCEPH C library. More...

## Functions

int | novas_calceph_is_thread_safe ()
| Checks if the CALCEPH plugin is thread safe.
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...).

## Variables

int | serialized_calceph_queries = 1
| Whether to force serialized (non-parallel CALCEPH queries).

## Detailed Description

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.:

#include <novas.h>
#include <novas-calceph.h>
// You can open a set of JPL/INPOP ephemeris files with CALCEPH...
t_calcephbin *eph = calceph_open_array(...);
// Then use them as your generic SuperNOVAS ephemeris provider
int status = novas_use_calceph(eph);
if(status < 0) {
// Oops something went wrong...
}
novas_use_calceph
int novas_use_calceph(t_calcephbin *eph)
Sets a ephemeris provider for Solar-system objects using the CALCEPH C library and the specified set ...
Definition solsys-calceph.c:409
novas-calceph.h
SuperNOVAS functions interfacing with the CALCEPH C library.
novas.h
SuperNOVAS types, definitions, and function prototypes.

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

t_calcephbin *pleph = calceph_open(...);
status = novas_use_calceph_planets(pleph);
if(status < 0) {
// Oops something went wrong...
}
novas_use_calceph_planets
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 p...
Definition solsys-calceph.c:452

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's ID 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:

1. CALCEPH is at https://calceph.imcce.fr
2. CALCEPH source code is at https://gitlab.obspm.fr/imcce_calceph/calceph

Author
  Attila Kovacs

Since
  1.2

See also
  solsys-cspice.c, ephemeris.c, orbital.c

## Variable Documentation

## serialized_calceph_queries

int serialized_calceph_queries = 1

Whether to force serialized (non-parallel CALCEPH queries).