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

Functions

int novas_orbit_posvel (double jd_tdb, const novas_orbital *restrict orbit, enum novas_accuracy accuracy, double *restrict pos, double *restrict vel)
 
int novas_set_orbsys_pole (enum novas_reference_system type, double ra, double dec, novas_orbital_system *restrict sys)
 

Detailed Description

Date
Created on Mar 6, 2025
Author
Attila Kovacs

Function relating to the use of orbital elements

Function Documentation

◆ novas_orbit_posvel()

int novas_orbit_posvel ( double  jd_tdb,
const novas_orbital *restrict  orbit,
enum novas_accuracy  accuracy,
double *restrict  pos,
double *restrict  vel 
)

Calculates a rectangular equatorial position and velocity vector for the given orbital elements for the specified time of observation.

REFERENCES:

  1. https://ssd.jpl.nasa.gov/planets/approx_pos.html
  2. https://en.wikipedia.org/wiki/Orbital_elements
  3. https://orbitalofficial.com/
  4. https://downloads.rene-schwarz.com/download/M001-Keplerian_Orbit_Elements_to_Cartesian_State_Vectors.pdf
Parameters
jd_tdb[day] Barycentric Dynamic Time (TDB) based Julian date
orbitOrbital parameters
accuracyNOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1).
[out]pos[AU] Output ICRS equatorial position vector, or NULL if not required
[out]vel[AU/day] Output ICRS equatorial velocity vector, or NULL if not required
Returns
0 if successful, or else -1 if the orbital parameters are NULL or if the position and velocity output vectors are the same or the orbital system is ill defined (errno set to EINVAL), or if the calculation did not converge (errno set to ECANCELED), or
See also
ephemeris()
novas_geom_posvel()
place()
make_orbital_object()
Author
Attila Kovacs
Since
1.2

References novas_inv_max_iter, and TWOPI.

◆ novas_set_orbsys_pole()

int novas_set_orbsys_pole ( enum novas_reference_system  type,
double  ra,
double  dec,
novas_orbital_system *restrict  sys 
)

Sets the orientation of an orbital system using the RA and DEC coordinates of the pole of the Laplace (or else equatorial) plane relative to which the orbital elements are defined. Orbital parameters of planetary satellites normally include the R.A. and declination of the pole of the local Laplace plane in which the Keplerian orbital elements are referenced.

The system will become referenced to the equatorial plane, the relative obliquity is set to (90° - dec), while the argument of the ascending node ('Omega') is set to (90° + ra).

NOTES:

  1. You should not expect much precision from the long-range orbital approximations for planetary satellites. For applications that require precision at any level, you should rely on appropriate ephemerides, or else on up-to-date short-term orbital elements.
Parameters
typeCoordinate reference system in which ra and dec are defined (e.g. NOVAS_GCRS).
ra[h] the R.A. of the pole of the oribtal reference plane.
dec[deg] the declination of the pole of the oribtal reference plane.
[out]sysOrbital system
Returns
0 if successful, or else -1 (errno will be set to EINVAL) if the output sys pointer is NULL.
Author
Attila Kovacs
Since
1.2
See also
make_orbital_object()

References NOVAS_EQUATORIAL_PLANE.