Loading...
Searching...
No Matches
naif.c File Reference

Solar system ID mappings between NOVAS and NASA's Navigation and Ancillary Information Facility (NAIF), which is used by the JPL ephemeris systems. More...

## Functions

enum novas_planet | naif_to_novas_planet (long id)
| Converts a NAIF ID to a NOVAS major planet ID.
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.
long | novas_to_naif_planet (enum novas_planet id)
| Converts a NOVAS Solar-system body ID to a NAIF Solar-system body ID.

## Detailed Description

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.

Date
  Created on Nov 6, 2024

Author
  Attila Kovacs

Since
  1.2

See also
  solsys-calceph.c, solsys-cspice.c, ephemeris.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, SSB, EMB and the Pluto system. Otherwise NAIF planet barycenters are mapped to the corresponding bodies. NAIF body centers n_99 (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

  id | The 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.

Author
  Attila Kovacs

Since
  1.2

See also
  novas_to_naif_planet(), novas_to_dexxx_planet()

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

Referenced by supernovas::Planet::for_naif_id().

## 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

  id | The 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.

Author
  Attila Kovacs

Since
  1.2

See also
  novas_to_naif_planet(), naif_to_novas_planet()

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

Referenced by supernovas::Planet::de_number().

## 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, SSB, EMB, and the Pluto system. 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

  id | The 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)

Author
  Attila Kovacs

Since
  1.2

See also
  naif_to_novas_planet()

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

Referenced by supernovas::Planet::naif_id().