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

Calculate approximate positions and velocities for the major planets, Sun, Moon, Earth-Moon Barycenter (EMB), and the Solar-system Barycenter (SSB), mainly by using Keplerian orbital elements. More...

## Functions

int | novas_approx_heliocentric (enum novas_planet id, double jd_tdb, double *restrict pos, double *restrict vel)
| Returns the approximate geometric heliocentric orbital positions and velocities for the major planets, Sun, or Earth-Moon Barycenter (EMB).
int | novas_approx_sky_pos (enum novas_planet id, const novas_frame *restrict frame, enum novas_reference_system sys, sky_pos *restrict out)
| Calculates an approximate apparent location on sky for a major planet, Sun, Moon, Earth-Moon Barycenter (EMB) – typically to arcmin level accuracy – using Keplerian orbital elements.
int | novas_make_moon_mean_orbit (double jd_tdb, novas_orbital *restrict orbit)
| Gets mean orbital elements for the Moon relative to the geocenter for the specified epoch of observation.
int | novas_make_moon_orbit (double jd_tdb, novas_orbital *restrict orbit)
| Gets an approximation of the current Keplerian orbital elements for the Moon relative to the geocenter for the specified epoch of observation.
int | novas_make_planet_orbit (enum novas_planet id, double jd_tdb, novas_orbital *restrict orbit)
| Get approximate current heliocentric orbital elements for the major planets.
double | novas_moon_phase (double jd_tdb)
| Calculates the Moon's phase at a given time.
double | novas_next_moon_phase (double phase, double jd_tdb)
| Calculates the date / time at which the Moon will reach the specified phase next, after the specified time.
double | planet_lon (double t, enum novas_planet planet)
| Returns the planetary longitude, for Mercury through Neptune, w.r.t.

## Detailed Description

Calculate approximate positions and velocities for the major planets, Sun, Moon, Earth-Moon Barycenter (EMB), and the Solar-system Barycenter (SSB), mainly by using Keplerian orbital elements.

For more precise planet positions, you should use SuperNOVAS with a planetary ephemeris provider, as as the CALCEPH or CSPICE plugin interface modules, or custom ephemeris provider functions.

Date
  Created on Apr 27, 2025

Author
  Attila Kovacs

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

## Function Documentation

## planet_lon()

double planet_lon | ( | double | t,
|  | enum novas_planet | planet )

Returns the planetary longitude, for Mercury through Neptune, w.r.t.

mean dynamical ecliptic and equinox of J2000, with high order terms omitted (Simon et al. 1994, 5.8.1-5.8.8).

REFERENCES:

1. IERS Conventions Chapter 5, Eq. 5.44.

Parameters

  t | [cy] Julian centuries since J2000
  planet | Novas planet id, e.g. NOVAS_MARS.

Returns
  [rad] The approximate longitude of the planet in radians [-π:π], or NAN if the planet id is out of range.

See also
  accum_prec(), nutation_angles(), NOVAS_JD_J2000

Since
  1.0

Author
  Attila Kovacs

References NOVAS_NEPTUNE, and TWOPI.