SuperNOVAS v1.2
The NOVAS C library, made better
Loading...
Searching...
No Matches
novas-cspice.h File Reference

Functions

int cspice_add_kernel (const char *filename)
 
int cspice_remove_kernel (const char *filename)
 
int novas_use_cspice ()
 
int novas_use_cspice_ephem ()
 
int novas_use_cspice_planets ()
 

Detailed Description

Date
Created on Nov 12, 2024
Author
Attila Kovacs

SuperNOVAS functions interfacing with the NAIF CSPICE Toolkit

Function Documentation

◆ cspice_add_kernel()

int cspice_add_kernel ( const char *  filename)

Adds a SPICE kernel to the currently managed open kernels. Subsequent ephemeris lookups through CSPICE will use the added kernel. It's simply a wrapper around the CSPICE furnsh_c() routine, with graceful error handling. You can of course add kernels using furnsh_c() directly to the same effect.

REFERENCES:

  1. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/furnsh_c.html
Parameters
filenameThe fully qualified path to the ephemeris kernel data (e.g. "/data/ephem/de440s.bsp")
Returns
0 if successful, or else -1 if there was an error (errno will be set to EINVAL).
See also
cspice_remove_kernel()
novas_use_cspice()
Author
Attila Kovacs
Since
1.2

◆ cspice_remove_kernel()

int cspice_remove_kernel ( const char *  filename)

Removes a SPICE kernel from the currently managed open kernels. Subsequent ephemeris lookups through CSPICE will not use the removed kernel data. It's simply a wrapper around the CSPICE unload_c() routine, with graceful error handling. You can of course remove kernels using unload_c() directly to the same effect.

REFERENCES:

  1. https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unload_c.html
Parameters
filenameThe fully qualified path to the ephemeris kernel data (e.g. "/data/ephem/de440s.bsp")
Returns
0 if successful, or else -1 if there was an error (errno will be set to EINVAL).
See also
cspice_add_kernel()
Author
Attila Kovacs
Since
1.2

◆ novas_use_cspice()

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

CSPICE is configured to suppress error messages and to not exit on errors, since we will check errors and handle them ourselves. You can adjust the behavior after this call with the CSPICE errprt_c() and erract_c() functions, respectively.

Returns
0
See also
novas_use_cspice_planets()
novas_use_cspice_ephem()
cspice_add_kernel()
Author
Attila Kovacs
Since
1.2

References novas_use_cspice_ephem(), and novas_use_cspice_planets().

◆ novas_use_cspice_ephem()

int novas_use_cspice_ephem ( )

Sets a ephemeris provider for NOVAS_EPHEM_OBJECT types using the NAIF CSPICE library.

CSPICE is configured to suppress error messages and to not exit on errors, since we will check errors and handle them ourselves. You can adjust the behavior after this call with the CSPICE errprt_c() and erract_c() functions, respectively.

Returns
0
See also
novas_use_cspice_planets()
novas_use_cspice()
cspice_add_kernel()
set_ephem_provider()
Author
Attila Kovacs
Since
1.2

References set_ephem_provider().

◆ novas_use_cspice_planets()

int novas_use_cspice_planets ( )

Sets CSPICE as the ephemeris provider for the major planets (and Sun, Moon, and SSB) using the NAIF CSPICE library.

CSPICE is configured to suppress error messages and to not exit on errors, since we will check errors and handle them ourselves. You can adjust the behavior after this call with the CSPICE errprt_c() and erract_c() functions, respectively.

Returns
0
See also
novas_use_cspice_ephem()
novas_use_cspice()
cspice_add_kernel()
set_planet_provider()
set_planet_provider_hp()
Author
Attila Kovacs
Since
1.2

References set_planet_provider(), and set_planet_provider_hp().