SuperNOVAS v1.2
The NOVAS C library, made better
Loading...
Searching...
No Matches
naif.c File Reference

Macros

#define __NOVAS_INTERNAL_API__
 Use definitions meant for internal use by SuperNOVAS only.
 

Functions

enum novas_planet naif_to_novas_planet (long id)
 
long novas_to_dexxx_planet (enum novas_planet id)
 
long novas_to_naif_planet (enum novas_planet id)
 

Detailed Description

Date
Created on Nov 6, 2024
Author
Attila Kovacs

Solar system ID mappings between NOVAS and NASA's Navigation and Ancillary Information Facility (NAIF), which is used by the JPL ephemeris systems. The two differ for the numbering convention for major planets, the Sun, Moon, Solar-System Barycenter (SSB) and the Earth-Moon Barycenter (EMB). NOVAS does not have predefined IDs beyond this set (and no defined ID for EMB), thus for all other objects we'll assume and use NOVAS IDs that match NAIF.

Since
1.2
See also
solsys-calceph.c
solsys-cspice.c

Function Documentation

◆ naif_to_novas_planet()

enum novas_planet naif_to_novas_planet ( long  id)

Converts a NAIF ID to a NOVAS major planet ID. It account for the different IDs used for Sun, Moon and SSB. Otherwise NAIF planet barycenters are mapped to the corresponding bodies, except EMB (3), which will return -1. NAIF body centers n99 (e.g. 399 for Earth), are mapped to the corresponding NOVAS planet number n. All other NAIF IDs will return -1, indicating no match to a NOVAS planet ID.

Parameters
idThe NAIF ID of the major planet of interest
Returns
the NOVAS ID for the same object (which may or may not be different from the input), or -1 if the NAIF ID cannot be matched to a NOVAS major planet.
See also
novas_to_naif_planet()
novas_to_dexxx_planet()
Author
Attila Kovacs
Since
1.2

References NOVAS_MERCURY, NOVAS_MOON, NOVAS_PLUTO, NOVAS_SSB, and NOVAS_SUN.

◆ novas_to_dexxx_planet()

long novas_to_dexxx_planet ( enum novas_planet  id)

Converts a NOVAS Solar-system body ID to a NAIF Solar-system body ID for DExxx ephemeris files. The DExxx (e.g. DE440) ephemeris files use NAIF IDs, but for most planets contain barycentric data only rather than that of the planet center. For Earth-based observations, it only really makes a difference whether the 3 is used for the Earth-Moon Barycenter (EMB) or 399 for the geocenter.

Parameters
idThe NOVAS ID of the major planet of interest
Returns
the NAIF ID for the same object (which may or may not be different from the input), as appropriate for use in the DExxx ephemeris files.
See also
novas_to_naif_planet()
naif_to_novas_planet()
Author
Attila Kovacs
Since
1.2

References NOVAS_EARTH, NOVAS_MERCURY, NOVAS_MOON, NOVAS_PLUTO, NOVAS_SSB, and NOVAS_SUN.

◆ novas_to_naif_planet()

long novas_to_naif_planet ( enum novas_planet  id)

Converts a NOVAS Solar-system body ID to a NAIF Solar-system body ID. NOVAS and NAIF use slightly different IDs for major planets, the Moon, and the Solar-system Barycenter (SSB). In NOVAS, major planets are have IDs ranging from 1 through 9, but for NAIF 1–9 are the planetary barycenters and the planet centers have numbers in the hundreds ending with 99 (e.g. the center of Earth is NAIF 399; 3 is the NOVAS ID for Earth and the NAIF ID for the Earth-Moon Barycenter [EMB]). The Sun and Moon also have distinct IDs in NAIF vs NOVAS.

Parameters
idThe NOVAS ID of the major planet of interest
Returns
the NAIF ID for the same object or planet center (which may or may not be different from the input)
See also
naif_to_novas_planet()
Author
Attila Kovacs
Since
1.2

References NOVAS_MERCURY, NOVAS_MOON, NOVAS_PLUTO, NOVAS_SSB, and NOVAS_SUN.