Loading...
Searching...
No Matches
supernovas::Orbital Class Reference
Astronomical object of interest

Keplerian orbital elements, for example, for a comet using parameters published by the IAU Minor Planet Center. More...

`#include <supernovas.h>`

Inheritance diagram for supernovas::Orbital:

## Public Member Functions

| Orbital (const OrbitalSystem &system, const Time &ref_time, const Coordinate &semi_major, const Angle &mean_anomaly, const Interval &period)
| Instantiates a new Keplerian orbital in the specified orbital system and the basic circular orbital parameters.
| Orbital (const OrbitalSystem &system, double jd_tdb, double semi_major_m, double mean_anomaly_rad, double period_s)
| Instantiates a new Keplerian orbital in the specified orbital system and the basic circular orbital parameters.
const novas_orbital * | _novas_orbital () const
| (for internal use) Returns the underlying NOVAS C data structure containing the orbital parameters.
Interval | apsis_period () const
| Returns the rotation period of the apsis location in the orbital system, in which the orbital was defined (positive for counter-clockwise rotation, or negative for clockwise rotation, when viewed from the orbital system's pole.).
Orbital & | apsis_period (const Interval &period)
| Sets the apsis rotation period (positive for counter-clockwise rotation when viewed from the orbital system's pole).
Orbital & | apsis_period (double seconds)
| Sets the apsis rotation period (positive for counter-clockwise rotation when viewed from the orbital system's pole).
double | apsis_rate () const
| Returns the angular rate at which the apsis rotates in the orbital system (positive for counter-clockwise rotation, or negative for clockwise rotation, when viewed from the orbital system's pole.).
Orbital & | apsis_rate (double rad_per_sec)
| Sets the apsis rotation rate (positive for counter-clockwise rotation when viewed from the orbital system's pole).
Angle | ascending_node () const
| Returns the longitude of the ascending node of this orbit in the orbital system, in which the orbital was defined.
double | eccentricity () const
| Returns the eccentricity of this orbital.
Orbital & | eccentricity (double e, const Angle &periapsis_angle)
| Sets parameters for an elliptical orbit.
Orbital & | eccentricity (double e, double periapsis_rad)
| Sets parameters for an elliptical orbit.
bool | equals (const Orbital &other) const
| Checks if this Keplerian orbital matches another within typical tolerances.
Angle | inclination () const
| Returns the inclination angle of this orbit, relative to the orbital system's plane.
Orbital & | inclination (const Angle &angle, const Angle &ascending_node_angle)
| Sets parameters for an orbit that is inclined relative to the orbital system's native plane.
Orbital & | inclination (double angle_rad, double ascending_node_rad)
| Sets parameters for an orbit that is inclined relative to the orbital system's native plane.
double | mean_motion () const
| Returns the mean motion (circular angular velocity) of the object in this orbit.
Interval | node_period () const
| Returns the rotation period (due to precession) of the orbit's ascending node in the orbital system, in which the orbital was defined (positive for counter-clockwise rotation, or negative for clockwise rotation, when viewed from the orbital system's pole.).
Orbital & | node_period (const Interval &period)
| Sets the node precession period (positive for counter-clockwise rotation when viewed from the orbital system's pole).
Orbital & | node_period (double seconds)
| Sets the node precession period (positive for counter-clockwise rotation when viewed from the orbital system's pole).
double | node_rate () const
| Returns the angular rate at which the ascending node of the orbit rotates in the orbital system (positive for counter-clockwise rotation, or negative for clockwise rotation, when viewed from the orbital system's pole.).
Orbital & | node_rate (double rad_per_sec)
| Sets the node precession rate (positive for counter-clockwise rotation when viewed from the orbital system's pole).
bool | operator!= (const Orbital &other) const
| Checks if this Keplerian orbital differs from another given typical tolerances.
bool | operator== (const Orbital &other) const
| Checks if this Keplerian orbital matches another within typical tolerances.
Angle | periapsis () const
| Returns the periapsis angle of this orbit, in the orbital system, in which the orbit was defined.
Interval | period () const
| Returns the period of the object on this orbit.
Spherical | pole () const
| Returns the spherical coordinates of the orbit's pole in the orbital system, in which the orbital was defined.
Orbital & | pole (const Angle &longitude, const Angle &latitude)
| Sets the orbit's pole, in the orbital system in which the orbit is defined.
Orbital & | pole (const Spherical &coords)
| Sets the orbit's pole, in the orbital system in which the orbit is defined.
Orbital & | pole (double longitude_rad, double latitude_rad)
| Sets the orbit's pole, in the orbital system in which the orbit is defined.
Position | position (const Time &time, enum novas_accuracy accuracy=NOVAS_FULL_ACCURACY) const
| Calculates a rectangular equatorial position vector for this Keplerian orbital for the specified time of observation.
double | reference_jd_tdb () const
| Returns the reference time, as a Barycentric Dynamical Time (TDB) based Julian date.
Angle | reference_mean_anomaly () const
| Returns the mean anomaly (or longitude for circular orbits) of the object at the reference time, in the orbital system in which the orbit was defined.
Coordinate | semi_major_axis () const
| Returns the semi-major axis (that is the radius for circular orbits) of this orbital.
OrbitalSystem | system () const
| Returns a new instance of the orbital system in which this orbit is defined.
OrbitalSource | to_source (const std::string &name) const
| Returns a new orbital source from this orbital and with the specified name and number designations.
std::string | to_string () const
| Returns a basic human-readable description of this orbital, with just the major parameters.
Velocity | velocity (const Time &time, enum novas_accuracy accuracy=NOVAS_FULL_ACCURACY) const
| Calculates a rectangular equatorial velocity vector for this Keplerian orbital for the specified time of observation.
Public Member Functions inherited from supernovas::Validating
bool | is_valid () const
| Returns the previously set 'valid' state of the implementing instance.
| operator bool () const
| Objects that implement Validating can be used in conditionals directly, without explicitly calling is_valid().

## Static Public Member Functions

static Orbital | from_mean_motion (const OrbitalSystem &system, const Time &ref_time, const Coordinate &semi_major, const Angle &mean_anomaly, double rad_per_s)
| Return a new instance of a new Keplerian orbital in the specified orbital system and the basic circular orbital parameters, with mean motion used instead of a orbital period.
static Orbital | from_mean_motion (const OrbitalSystem &system, double jd_tdb, double semi_majpr_m, double mean_anomaly_rad, double rad_per_s)
| Return a new instance of a new Keplerian orbital in the specified orbital system and the basic circular orbital parameters, with mean motion used instead of a orbital period.
static Orbital | from_novas_orbit (const novas_orbital *orbit)
| (for internal use) Returns a new instance of a Keplerian orbital, using a copy of a NOVAS C orbital data structure.
static Orbital | moon_mean_orbit_at (const Time &time)
| Returns the mean Keplerian orbital for the Moon relative to the geocenter for the specified epoch of observation.
static Orbital | moon_orbit_at (const Time &time)
| Returns an approximation of the current Keplerian orbital of the Moon relative to the geocenter for the specified epoch of observation.

## Additional Inherited Members

Protected Member Functions inherited from supernovas::Validating
| Validating ()
| dummy constructor;
Protected Attributes inherited from supernovas::Validating
bool | _valid = false
| the state variable.

## Detailed Description

Keplerian orbital elements, for example, for a comet using parameters published by the IAU Minor Planet Center.

While Keplerian orbitals cannot provide accurate positions or velocities for Solar-system bodies over the long term (for that you need ephemeris data), they can be sufficiently accurate in the short term. And, in case of recently discovered objects, such as Near-Earth Objects (NEOs), orbital elements may be the only source of up-to-date positional data.

NOTES:

1. This class uses a builder pattern to populate the orbital parameters, bit-by-bit, as needed. As such, the best practice is to build the orbital first, before using an immutable const copy of it in parallel threads.

Since
  1.6

See also
  EphemerisSource, Planet::orbit()

## Constructor & Destructor Documentation

## Orbital() [1/2]

supernovas::Orbital::Orbital | ( | const OrbitalSystem & | system,
|  | double | jd_tdb,
|  | double | semi_major_m,
|  | double | mean_anomaly_rad,
|  | double | period_s )

Instantiates a new Keplerian orbital in the specified orbital system and the basic circular orbital parameters.

You can further specify the parameters for elliptical orbits using a builder pattern after instantiation.

Parameters

  system | the orbital system in which the orbit is defined.
  jd_tdb | [day] reference date of the orbital parameters as a Barycentric Dynamical Time (TDB) based Julian date
  semi_major_m | [m] semi-major axis (circular radius) of the orbit
  mean_anomaly_rad | [rad] Mean anomaly (circular longitude) of the object at the reference time, in the orbital system.
  period_s | [s] orbital period.

Since
  1.6

See also
  OribtalSystem::orbit()
  from_mean_motion(), eccentricity(), inclination(), pole(), node_period(), node_rate() apsis_period(), apsis_rate()

References supernovas::Unit::au, supernovas::Unit::day, supernovas::Unit::deg, and system().

## Orbital() [2/2]

supernovas::Orbital::Orbital | ( | const OrbitalSystem & | system,
|  | const Time & | ref_time,
|  | const Coordinate & | semi_major,
|  | const Angle & | mean_anomaly,
|  | const Interval & | period )

Instantiates a new Keplerian orbital in the specified orbital system and the basic circular orbital parameters.

You can further specify the parameters for elliptical orbits using a builder pattern after instantiation.

Parameters

  system | the orbital system in which the orbit is defined.
  ref_time | reference time of the orbital parameters.
  semi_major | semi-major axis (circular radius) of the orbit
  mean_anomaly | Mean anomaly (circular longitude) of the object at the reference time, in the orbital system.
  period | orbital period.

Since
  1.6

See also
  OrbotalSystem::orbit()
  from_mean_motion(), eccentricity(), inclination(), pole(), node_period(), node_rate() apsis_period(), apsis_rate()

References NOVAS_TDB, period(), and system().

## Member Function Documentation

## _novas_orbital()

const novas_orbital * supernovas::Orbital::_novas_orbital | ( |  | ) | const

(for internal use) Returns the underlying NOVAS C data structure containing the orbital parameters.

Returns
  pointer to the NOVAS C data structure that stores the orbital parameters internally.

Since
  1.6

Referenced by supernovas::OrbitalSource::OrbitalSource().

## apsis_period() [1/3]

Interval supernovas::Orbital::apsis_period | ( |  | ) | const

Returns the rotation period of the apsis location in the orbital system, in which the orbital was defined (positive for counter-clockwise rotation, or negative for clockwise rotation, when viewed from the orbital system's pole.).

Returns
  the time it takes for the apsis to make a full counter-clockwise rotation in the orbital system, viewed from the orbital system's pole. It may be negative for retrograde (clockwise) motion.

Since
  1.6

See also
  apsis_rate(), eccentricity(), node_period()

References supernovas::Unit::day, and supernovas::Validating::is_valid().

Referenced by apsis_period(), apsis_rate(), and apsis_rate().

## apsis_period() [2/3]

Orbital & supernovas::Orbital::apsis_period | ( | const Interval & | period | ) |

Sets the apsis rotation period (positive for counter-clockwise rotation when viewed from the orbital system's pole).

Parameters

  period | time it takes for a full rotation of the apsis in the orbital system. It may be negative for clockwise (retrograde) rotation seen from the orbital system's pole.

Returns
  itself

Since
  1.6

See also
  apsis_rate(), periapsis(), eccentricity()

References apsis_period(), and period().

## apsis_period() [3/3]

Orbital & supernovas::Orbital::apsis_period | ( | double | seconds | ) |

Sets the apsis rotation period (positive for counter-clockwise rotation when viewed from the orbital system's pole).

Parameters

  seconds | [s] counter-clockwise rotation period of the apsis. It may be negative for clockwise (retrograde) rotation seen from the orbital system's pole.

Returns
  itself

Since
  1.6

See also
  apsis_rate(), periapsis(), eccentricity()

References supernovas::Validating::_valid, and supernovas::Unit::day.

## apsis_rate() [1/2]

double supernovas::Orbital::apsis_rate | ( |  | ) | const

Returns the angular rate at which the apsis rotates in the orbital system (positive for counter-clockwise rotation, or negative for clockwise rotation, when viewed from the orbital system's pole.).

Returns
  [rad/s] the angular velocity of the apsis' rotation in the orbital system, viewed from the orbital system's pole. It may be negative for retrograde motion.

Since
  1.6

See also
  apsis_period(), node_rate()

References apsis_period(), and supernovas::Constant::two_pi.

## apsis_rate() [2/2]

Orbital & supernovas::Orbital::apsis_rate | ( | double | rad_per_sec | ) |

Sets the apsis rotation rate (positive for counter-clockwise rotation when viewed from the orbital system's pole).

Parameters

  rad_per_sec | [rad/s] counter-clockwise rotation rate of the apsis. It may be negative for clockwise (retrograde) rotation seen from the orbital system's pole.

Returns
  itself

Since
  1.6

See also
  apsis_rate(), periapsis(), eccentricity()

References apsis_period(), and supernovas::Constant::two_pi.

## ascending_node()

Angle supernovas::Orbital::ascending_node | ( |  | ) | const

Returns the longitude of the ascending node of this orbit in the orbital system, in which the orbital was defined.

Returns
  the longitude of the ascending node in the orbital system.

Since
  1.6

See also
  inclination(), pole()

References supernovas::Unit::deg, and supernovas::Validating::is_valid().

## eccentricity() [1/3]

double supernovas::Orbital::eccentricity | ( |  | ) | const

Returns the eccentricity of this orbital.

Returns
  the eccentricity of this orbital (dimensionless).

Since
  1.6

See also
  periapsis()

Referenced by eccentricity(), and to_string().

## eccentricity() [2/3]

Orbital & supernovas::Orbital::eccentricity | ( | double | e,
|  | const Angle & | periapsis_angle )

Sets parameters for an elliptical orbit.

Parameters

  e | eccenticity value (dimensionless).
  periapsis_angle | longitude of the apsis (the point at which the elliptial orbit is closest to the center), in the orbital system, in which the orbit is defined.

Returns
  itself.

Since
  1.6

See also
  apsis_period(), apsis_rate()

References eccentricity(), and supernovas::Angle::rad().

## eccentricity() [3/3]

Orbital & supernovas::Orbital::eccentricity | ( | double | e,
|  | double | periapsis_rad )

Sets parameters for an elliptical orbit.

Parameters

  e | eccenticity value (dimensionless).
  periapsis_rad | [rad] longitude of the apsis (the point at which the elliptial orbit is closest to the center), in the orbital system, in which the orbit is defined.

Returns
  itself.

Since
  1.6

See also
  apsis_period(), apsis_rate()

References supernovas::Validating::_valid, and supernovas::Unit::deg.

## equals()

bool supernovas::Orbital::equals | ( | const Orbital & | other | ) | const

Checks if this Keplerian orbital matches another within typical tolerances.

For two orbitals to be considered equal, they must have matching orbital systems, have the same reference dates to within ~10 ms (see novas_time_equals()), and:

- angular parameters must match to within 1 μas.
- semi-major axis must match to within 1 m.
- eccentricity must match to within 10-12 time the geometric mean of the two semi-major axes.
- mean motion must match to within 1 μas / cy.
- apsis and node periods must match to within ~10 ms (see novas_time_equals())

Note, that an orbital may not equal itself if it contains NAN or infinite components.

Parameters

  other | the other orbital

Returns
  true if this orbital and the argument essentially describe the same Keplerian orbital, within the typical tolerances, or else false.

Since
  1.7

See also
  operator==(), operator!=()

References novas_equals_orbital().

Referenced by operator!=(), and operator==().

## from_mean_motion() [1/2]

Orbital supernovas::Orbital::from_mean_motion | ( | const OrbitalSystem & | system,
|  | const Time & | ref_time,
|  | const Coordinate & | semi_major,
|  | const Angle & | mean_anomaly,
|  | double | rad_per_sec )

static

Return a new instance of a new Keplerian orbital in the specified orbital system and the basic circular orbital parameters, with mean motion used instead of a orbital period.

You can further specify the parameters for elliptical orbits using a builder pattern after instantiation.

Parameters

  system | the orbital system in which the orbit is defined.
  ref_time | reference time of the orbital parameters.
  semi_major | semi-major axis (circular radius; a) of the orbit
  mean_anomaly | Mean anomaly (circular longitude; M0) of the object at the reference time, in the orbital system.
  rad_per_sec | [rad/s] mean motion (circular angular velocity) on orbit.

Since
  1.6

See also
  Orbital(), eccentricity(), inclination(), pole(), node_period(), node_rate() apsis_period(), apsis_rate()

References from_mean_motion(), supernovas::Time::jd(), supernovas::Coordinate::m(), NOVAS_TDB, supernovas::Angle::rad(), and system().

## from_mean_motion() [2/2]

Orbital supernovas::Orbital::from_mean_motion | ( | const OrbitalSystem & | system,
|  | double | jd_tdb,
|  | double | semi_major_m,
|  | double | mean_anomaly_rad,
|  | double | rad_per_sec )

static

Return a new instance of a new Keplerian orbital in the specified orbital system and the basic circular orbital parameters, with mean motion used instead of a orbital period.

You can further specify the parameters for elliptical orbits using a builder pattern after instantiation.

Parameters

  system | the orbital system in which the orbit is defined.
  jd_tdb | [day] reference date of the orbital parameters as a Barycentric Dynamical Time (TDB) based Julian date
  semi_major_m | [m] semi-major axis (circular radius; a) of the orbit
  mean_anomaly_rad | [rad] Mean anomaly (circular longitude; M0) of the object at the reference time, in the orbital system.
  rad_per_sec | [rad/s] mean motion (circular angular velocity) on orbit.

Since
  1.6

See also
  Orbital(), eccentricity(), inclination(), pole(), node_period(), node_rate() apsis_period(), apsis_rate()

References supernovas::Validating::is_valid(), system(), and supernovas::Constant::two_pi.

Referenced by from_mean_motion().

## from_novas_orbit()

Orbital supernovas::Orbital::from_novas_orbit | ( | const novas_orbital * | orbit | ) |

static

(for internal use) Returns a new instance of a Keplerian orbital, using a copy of a NOVAS C orbital data structure.

The returned orbital may be invalid if the argument is NULL or if the input C orbital is ill-defined. It's best practice to call is_valid() on the returned orbital after this call to check that the supplied parameters do in fact define a valid orbital.

Parameters

  orbit | The NOVAS C orbital data structure (copied)

Returns
  A new Keplerian orbital instance, with the specified parameters.

Since
  1.6

See also
  Orbital(), is_valid()

References supernovas::Validating::is_valid().

Referenced by moon_mean_orbit_at(), moon_orbit_at(), supernovas::Planet::orbit(), and supernovas::OrbitalSource::orbital().

## inclination() [1/3]

Angle supernovas::Orbital::inclination | ( |  | ) | const

Returns the inclination angle of this orbit, relative to the orbital system's plane.

Returns
  the inclination of the orbit relative to the orbital system's plane.

Since
  1.6

See also
  ascending_node(), pole()

References supernovas::Unit::deg, and supernovas::Validating::is_valid().

Referenced by inclination(), and pole().

## inclination() [2/3]

Orbital & supernovas::Orbital::inclination | ( | const Angle & | angle,
|  | const Angle & | ascending_node_angle )

Sets parameters for an orbit that is inclined relative to the orbital system's native plane.

Parameters

  angle | inclination angle
  ascending_node_angle | longitude of the ascending node in the orbital system, in which the orbit is defined.

Returns
  itself.

Since
  1.6

See also
  pole(), node_period(), node_rate()

References inclination(), and supernovas::Angle::rad().

## inclination() [3/3]

Orbital & supernovas::Orbital::inclination | ( | double | angle_rad,
|  | double | ascending_node_rad )

Sets parameters for an orbit that is inclined relative to the orbital system's native plane.

Parameters

  angle_rad | [rad] inclination angle
  ascending_node_rad | [rad] longitude of the ascending node in the orbital system, in which the orbit is defined.

Returns
  itself.

Since
  1.6

See also
  pole(), node_period(), node_rate()

References supernovas::Validating::_valid, and supernovas::Unit::deg.

## mean_motion()

double supernovas::Orbital::mean_motion | ( |  | ) | const

Returns the mean motion (circular angular velocity) of the object in this orbit.

Returns
  [rad/s] the mean motion (circular angular velocity) of the object on this orbit.

Since
  1.6

See also
  period()

References supernovas::Unit::day, and supernovas::Unit::deg.

Referenced by period().

## moon_mean_orbit_at()

Orbital supernovas::Orbital::moon_mean_orbit_at | ( | const Time & | time | ) |

static

Returns the mean Keplerian orbital for the Moon relative to the geocenter for the specified epoch of observation.

It is based on the secular parameters of the ELP2000-85 model, but does not include the harmonic series and the perturbation terms. As such it has accuracy at the few degrees level only, however it is 'valid' for long-term projections (i.e. for years around the orbit's reference epoch) at that coarse level.

For the short-term , Orbital::moon_orbit_at() can provide somewhat more accurate predictions for up to a day or so around the reference epoch of the orbit.

REFERENCES:

1. Chapront, J. et al., 2002, A&A 387, 700–709
2. Chapront-Touze, M, and Chapront, J. 1988, Astronomy and Astrophysics, vol. 190, p. 342-352.
3. Chapront J., Francou G., 2003, A&A, 404, 735
4. Laskar J., 1986, A&A, 157, 59

Parameters

  time | Astrometric time for which to calculate the secular orbital parameters of the moon.

Returns
  the Moon orbital defined with the mean orbital elements of date.

Since
  1.6

See also
  moon_orbit_at()

References from_novas_orbit(), supernovas::Validating::is_valid(), supernovas::Time::jd(), novas_make_moon_mean_orbit(), and NOVAS_TDB.

## moon_orbit_at()

Orbital supernovas::Orbital::moon_orbit_at | ( | const Time & | time | ) |

static

Returns an approximation of the current Keplerian orbital of the Moon relative to the geocenter for the specified epoch of observation.

The orbit includes the most dominant Solar perturbation terms to produce results with an accuracy at the ~10 arcmin level near (+- 0.5 days) the reference time argument of the orbit. The perturbed orbit is based on the ELP/MPP02 model.

While, the ELP/MPP02 model itself can be highly precise, the Moon's orbit is strongly non-Keplerian, and so any attempt to describe it in purely Keplerian terms is inherently flawed, which is the reason for the generally poor accuracy of this model.

REFERENCES:

1. Chapront, J. et al., 2002, A&A 387, 700–709
2. Chapront-Touze, M, and Chapront, J. 1988, Astronomy and Astrophysics, vol. 190, p. 342-352.
3. Chapront J., Francou G., 2003, A&A, 404, 735

Parameters

  time | Astrometric time for which to calculate the secular orbital parameters of the moon.

Returns
  the Moon orbital defined with the mean orbital elements of date.

Since
  1.6

See also
  moon_mean_orbit_at()

References from_novas_orbit(), supernovas::Validating::is_valid(), supernovas::Time::jd(), novas_make_moon_orbit(), and NOVAS_TDB.

## node_period() [1/3]

Interval supernovas::Orbital::node_period | ( |  | ) | const

Returns the rotation period (due to precession) of the orbit's ascending node in the orbital system, in which the orbital was defined (positive for counter-clockwise rotation, or negative for clockwise rotation, when viewed from the orbital system's pole.).

Returns
  the time it takes for the ascending to make a full counter-clockwise rotation in the orbital system, viewed from the orbital system's pole. It may be negative for retrograde (clockwise) motion.

Since
  1.6

See also
  node_rate(), inclination(), apsis_period()

References supernovas::Unit::day, and supernovas::Validating::is_valid().

Referenced by node_period(), node_rate(), and node_rate().

## node_period() [2/3]

Orbital & supernovas::Orbital::node_period | ( | const Interval & | period | ) |

Sets the node precession period (positive for counter-clockwise rotation when viewed from the orbital system's pole).

Parameters

  period | counter-clockwise precession period of the node. It may be negative for clockwise (retrograde) rotation seen from the orbital system's pole.

Returns
  itself

Since
  1.6

See also
  node_rate(), ascending_node(), inclination(), pole()

References node_period(), and period().

## node_period() [3/3]

Orbital & supernovas::Orbital::node_period | ( | double | seconds | ) |

Sets the node precession period (positive for counter-clockwise rotation when viewed from the orbital system's pole).

Parameters

  seconds | [s] counter-clockwise precession period of the node. It may be negative for clockwise (retrograde) rotation seen from the orbital system's pole.

Returns
  itself

Since
  1.6

See also
  node_rate(), ascending_node(), inclination(), pole()

References supernovas::Validating::_valid, and supernovas::Unit::day.

## node_rate() [1/2]

double supernovas::Orbital::node_rate | ( |  | ) | const

Returns the angular rate at which the ascending node of the orbit rotates in the orbital system (positive for counter-clockwise rotation, or negative for clockwise rotation, when viewed from the orbital system's pole.).

Returns
  [rad/s] the angular velocity of the ascending node rotation (precession) in the orbital system, viewed from the orbital system's pole. It may be negative for retrograde motion.

Since
  1.6

See also
  node_period(), apsis_rate()

References node_period(), and supernovas::Constant::two_pi.

## node_rate() [2/2]

Orbital & supernovas::Orbital::node_rate | ( | double | rad_per_sec | ) |

Sets the node precession rate (positive for counter-clockwise rotation when viewed from the orbital system's pole).

Parameters

  rad_per_sec | [rad/sec] counter-clockwise precession rate of the node. It may be negative for clockwise (retrograde) rotation seen from the orbital system's pole.

Returns
  itself

Since
  1.6

See also
  node_period(), ascending_node(), inclination(), pole()

References node_period(), and supernovas::Constant::two_pi.

## operator!=()

bool supernovas::Orbital::operator!= | ( | const Orbital & | other | ) | const

Checks if this Keplerian orbital differs from another given typical tolerances.

Same as !equals(). See equals() for details.

Parameters

  other | the other orbital

Returns
  true if this orbital and the argument describe distinct Keplerian orbitals, given the typical tolerances, or else false.

Since
  1.7

See also
  equals(), operator!=()

References equals().

## operator==()

bool supernovas::Orbital::operator== | ( | const Orbital & | other | ) | const

Checks if this Keplerian orbital matches another within typical tolerances.

Same as equals(). See equals() for details.

Parameters

  other | the other orbital

Returns
  true if this orbital and the argument essentially describe the same Keplerian orbital, within the typical tolerances, or else false.

Since
  1.7

See also
  equals(), operator!=()

References equals().

## periapsis()

Angle supernovas::Orbital::periapsis | ( |  | ) | const

Returns the periapsis angle of this orbit, in the orbital system, in which the orbit was defined.

Returns
  the longitude (in the orbital system) at which point the object is closest to the orbital center (on an elliptical orbit).

Since
  1.6

See also
  eccentricity()

References supernovas::Unit::deg, and supernovas::Validating::is_valid().

## period()

Interval supernovas::Orbital::period | ( |  | ) | const

Returns the period of the object on this orbit.

Returns
  the time it takes for the object to complete a full orbit.

Since
  1.6

See also
  mean_motion()

References supernovas::Validating::is_valid(), mean_motion(), and supernovas::Constant::two_pi.

Referenced by Orbital(), apsis_period(), node_period(), and to_string().

## pole() [1/4]

Spherical supernovas::Orbital::pole | ( |  | ) | const

Returns the spherical coordinates of the orbit's pole in the orbital system, in which the orbital was defined.

Returns
  the location of the orbit's pole in the orbital system, in which the orbital is defined.

Since
  1.6

See also
  inclination(), ascending_node()

References supernovas::Unit::deg, supernovas::Constant::half_pi, and supernovas::Validating::is_valid().

Referenced by pole(), and pole().

## pole() [2/4]

Orbital & supernovas::Orbital::pole | ( | const Angle & | longitude,
|  | const Angle & | latitude )

Sets the orbit's pole, in the orbital system in which the orbit is defined.

Parameters

  longitude | longitude of orbit's pole in the orbital system.
  latitude | latitude of the orbit's pole in the orbital system.

Returns
  itself

Since
  1.6

See also
  inclination(), node_pediod(), node_rate()

References pole(), and supernovas::Angle::rad().

## pole() [3/4]

Orbital & supernovas::Orbital::pole | ( | const Spherical & | coords | ) |

Sets the orbit's pole, in the orbital system in which the orbit is defined.

Parameters

  coords | location of the pole in the orbital system.

Returns
  itself

Since
  1.6

See also
  inclination(), node_pediod(), node_rate()

References supernovas::Spherical::latitude(), supernovas::Spherical::longitude(), and pole().

## pole() [4/4]

Orbital & supernovas::Orbital::pole | ( | double | longitude_rad,
|  | double | latitude_rad )

Sets the orbit's pole, in the orbital system in which the orbit is defined.

Parameters

  longitude_rad | [rad] longitude of orbit's pole in the orbital system.
  latitude_rad | [rad] latitude of the orbit's pole in the orbital system.

Returns
  itself

Since
  1.6

See also
  inclination(), node_pediod(), node_rate()

References supernovas::Constant::half_pi, and inclination().

## position()

Position supernovas::Orbital::position | ( | const Time & | time,
|  | enum novas_accuracy | accuracy = NOVAS_FULL_ACCURACY ) const

Calculates a rectangular equatorial position vector for this Keplerian orbital for the specified time of observation.

REFERENCES:

1. E.M. Standish and J.G. Williams 1992.
2. https://ssd.jpl.nasa.gov/planets/approx_pos.html
3. https://en.wikipedia.org/wiki/Orbital_elements
4. https://orbitalofficial.com/
5. https://downloads.rene-schwarz.com/download/M001-Keplerian_Orbit_Elements_to_Cartesian_State_Vectors.pdf

Parameters

  time | Astrometric time of observation
  accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1).

Returns
  The rectangular equatorial position vector of the orbital object, relative to the equinox type of the orbital system.

Since
  1.6

See also
  velocity()

References supernovas::Unit::au, supernovas::Time::jd(), novas_orbit_posvel(), and supernovas::Position::undefined().

## reference_jd_tdb()

double supernovas::Orbital::reference_jd_tdb | ( |  | ) | const

Returns the reference time, as a Barycentric Dynamical Time (TDB) based Julian date.

Returns
  [day] the TDB-based Julian date for which the orbital parameters are defined.

Since
  1.6

## reference_mean_anomaly()

Angle supernovas::Orbital::reference_mean_anomaly | ( |  | ) | const

Returns the mean anomaly (or longitude for circular orbits) of the object at the reference time, in the orbital system in which the orbit was defined.

Returns
  the mean anomaly (circular longitude) of the object in the orbital system at the reference time.

Since
  1.6

See also
  reference_jd_tdb()

References supernovas::Unit::deg, and supernovas::Validating::is_valid().

## semi_major_axis()

Coordinate supernovas::Orbital::semi_major_axis | ( |  | ) | const

Returns the semi-major axis (that is the radius for circular orbits) of this orbital.

Returns
  the semi-major axis (circular) radius of this orbit.

Since
  1.6

References supernovas::Unit::au, and supernovas::Validating::is_valid().

Referenced by to_string().

## system()

OrbitalSystem supernovas::Orbital::system | ( |  | ) | const

Returns a new instance of the orbital system in which this orbit is defined.

Returns
  a new instance of the orbital system, in which the orbit is defined.

Since
  1.6

References supernovas::OrbitalSystem::from_novas_orbital_system(), and supernovas::Validating::is_valid().

Referenced by Orbital(), Orbital(), from_mean_motion(), from_mean_motion(), and to_string().

## to_string()

std::string supernovas::Orbital::to_string | ( |  | ) | const

Returns a basic human-readable description of this orbital, with just the major parameters.

Returns
  a basic string description of this orbital.

Since
  1.6

References eccentricity(), period(), semi_major_axis(), system(), supernovas::Coordinate::to_string(), supernovas::Interval::to_string(), and supernovas::OrbitalSystem::to_string().

## velocity()

Velocity supernovas::Orbital::velocity | ( | const Time & | time,
|  | enum novas_accuracy | accuracy = NOVAS_FULL_ACCURACY ) const

Calculates a rectangular equatorial velocity vector for this Keplerian orbital for the specified time of observation.

REFERENCES:

1. E.M. Standish and J.G. Williams 1992.
2. https://ssd.jpl.nasa.gov/planets/approx_pos.html
3. https://en.wikipedia.org/wiki/Orbital_elements
4. https://orbitalofficial.com/
5. https://downloads.rene-schwarz.com/download/M001-Keplerian_Orbit_Elements_to_Cartesian_State_Vectors.pdf

Parameters

  time | Astrometric time of observation
  accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1).

Returns
  The rectangular equatorial velocity vector of the orbital object, relative to the equinox type of the orbital system.

Since
  1.6

See also
  position()

References supernovas::Unit::AU_per_day, supernovas::Time::jd(), novas_orbit_posvel(), and supernovas::Velocity::undefined().