![]() |
SuperNOVAS C++ API v1.6
High-precision C/C++ astrometry library
|
A major planet (including Pluto), or the Sun and the Moon, the Solar-System Barycenter (SSB), the Earth-Moon Barycenter (EMB), and the Pluto-system barycenter. More...
#include <supernovas.h>
Public Member Functions | |
| Planet (enum novas_planet number) | |
| Instantiates a planet from its NOVAS ID number. | |
| Apparent | approx_apparent_in (const Frame &frame) const |
| Return 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. | |
| Geometric | approx_geometric_in (const Frame &frame) const |
| Returns approximate eometric posiitions and velocities for a major planet, Sun, Moon, Earth-Moon Barycenter (EMB) – typically to arcmin level accuracy – using Keplerian orbital elements. | |
| const Source * | copy () const override |
| Returns a pointer to a newly allocated copy of this planet instance. | |
| int | de_number () const |
| Returns the ID number of for this planet (or planet type body in the SuperNOVAS sense) in the JPL DExxx (e.g. | |
| double | mass () const |
| Returns the mean radius (average of the equatorial and polar radii) of this planet (or planet type body in the SuperNOVAS sense). | |
| Coordinate | mean_radius () const |
| Returns the mean radius (average of the equatorial and polar radii) of this planet (or planet type body in the SuperNOVAS sense). | |
| int | naif_id () const |
| Returns the NAIF ID number for this planet (or planet type body in the SuperNOVAS sense). | |
| enum novas_planet | novas_id () const |
| Returns the (Super)NOVAS ID of this planet (or planet type body in the SuperNOVAS sense). | |
| Orbital | orbit (const Time &ref_time) const |
| Returns the approximate Keplerian orbital parameters for this planet, calculated for the specified time of reference. | |
| std::string | to_string () const override |
| Public Member Functions inherited from supernovas::SolarSystemSource | |
| Geometric | geometric_at (const Time &time, enum novas_accuracy accuracy=NOVAS_FULL_ACCURACY) const |
| Coordinate | helio_distance (const Time &time) const |
| Returns the heliocentric distance of a Solar-system source at the specified time of observation. | |
| ScalarVelocity | helio_rate (const Time &time) const |
| Returns the heliocentric rate of recession of a Solar-system source at the specified time of observation. | |
| double | solar_illumination (const Frame &frame) const |
| Returns the fraction [0.0:1.0] of the Solar-system source that appears illuminated by the Sun when viewed from a given observing frame, assuming that the source has a spheroidal shape. | |
| double | solar_power (const Time &time) const |
| Returns the typical incident Solar power on the illuminated side of this Solar-system object. | |
| Public Member Functions inherited from supernovas::Source | |
| virtual | ~Source () |
| const struct novas_object * | _novas_object () const |
| Returns a pointer to the NOVAS C novas_object data structure that stores data internally. | |
| Angle | angle_to (const Source &source, const Frame &frame) const |
| Returns the angular separation of this source from another source, for the given observer location and time of observation. | |
| Apparent | apparent_in (const Frame &frame) const |
| Returns the apparent position of a source (if possible), or else an invalid position. | |
| EquatorialTrack | equatorial_track (const Frame &frame, const Interval &range) const |
| Returns the short-term equatorial trajectory of this source on the observer's sky, which can be used for extrapolating its apparent position in the near-term to avoid the repeated full-fledged position calculation, which may be expensive. | |
| EquatorialTrack | equatorial_track (const Frame &frame, double range_seconds=Unit::hour) const |
| Returns the short-term equatorial trajectory of this source on the observer's sky, which can be used for extrapolating its apparent position in the near-term to avoid the repeated full-fledged position calculation, which may be expensive. | |
| Geometric | geometric_in (const Frame &frame, enum novas_reference_system system=NOVAS_TOD) const |
| Returns the geometric position of a source (if possible), or else an invalid position. | |
| HorizontalTrack | horizontal_track (const Frame &frame, RefractionModel ref=NULL, const Weather &weather=Weather::standard()) const |
| Returns the short-term horizontal trajectory of this source on the observer's sky, which can be used for extrapolating its apparent position in the near-term to avoid the repeated full-fledged position calculation, which may be expensive. | |
| Angle | moon_angle (const Frame &frame) const |
| Returns the angular separation of this source from the Moon, for the given observer location and time of observation. | |
| std::string | name () const |
| Returns the name given to this source at instantiation. | |
| Time | rises_above (const Angle &el, const Frame &frame, RefractionModel ref=NULL, const Weather &weather=Weather::standard()) const |
| Returns the time when the source rises above the specified elevation next for an observer located on or near Earth's surface, or else std::nullopt if the observer is not near Earth's surface. | |
| Time | sets_below (const Angle &el, const Frame &frame, RefractionModel ref=NULL, const Weather &weather=Weather::standard()) const |
| Returns the time when the source sets below the specified elevation next for an observer located on or near Earth's surface, or else std::nullopt if the observer is not near Earth's surface. | |
| Angle | sun_angle (const Frame &frame) const |
| Returns the angular separation of this source from the Sun, for the given observer location and time of observation. | |
| Time | transits_in (const Frame &frame) const |
| Returns the time when the source transits for an observer located on or near Earth's surface, or else std::nullopt if the observer is not near Earth's surface. | |
| enum novas_object_type | type () const |
| Returns the type of this source. | |
| Public Member Functions inherited from supernovas::Validating | |
| bool | is_valid () const |
| Returns the previously set 'valid' stae 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 const Planet & | earth () |
| Returns the static reference to the planet Earth. | |
| static const Planet & | emb () |
| Returns the static reference to the Earth-Moon Barycenter (EMB) position. | |
| static Planet | for_naif_id (long naif) |
| Returns a new planet corresponding to the specified NAIF ID, if possible, or else an invalid Planet if the NAIF id does not belong to a major planet in the SuperNOVAS definition (which includes the Sun, Moon, SSB, EMB, and Pluto system barycenter also). | |
| static Planet | for_name (const std::string &name) |
| Returns a new planet corresponding to the specified name (case insensitive), if possible, or else an invalid Planet if the name does not correspond to a major planet in the SuperNOVAS definition (which includes the Sun, Moon, SSB, EMB, and Pluto system barycenter also). | |
| static const Planet & | jupiter () |
| Returns the static reference to the planet Jupiter. | |
| static const Planet & | mars () |
| Returns the static reference to the planet Mars. | |
| static const Planet & | mercury () |
| Returns the static reference to the planet Mercury. | |
| static const Planet & | moon () |
| Returns the static reference to the Moon. | |
| static const Planet & | neptune () |
| Returns the static reference to the planet Neptune. | |
| static const Planet & | pluto () |
| Returns the static reference to the planet Pluto. | |
| static const Planet & | pluto_system () |
| Returns the static reference to the Pluto system barycenter position. | |
| static const Planet & | saturn () |
| Returns the static reference to the planet Saturn. | |
| static const Planet & | ssb () |
| Returns the static reference to the Solar-System Barycenter (SSB). | |
| static const Planet & | sun () |
| Returns the static reference to the Sun. | |
| static const Planet & | uranus () |
| Returns the static reference to the planet Uranus. | |
| static const Planet & | venus () |
| Returns the static reference to the planet Venus. | |
| Static Public Member Functions inherited from supernovas::Source | |
| static void | set_case_sensitive (bool value) |
| Enables or disabled case-sensitive treatment of source names. | |
Additional Inherited Members | |
| Protected Member Functions inherited from supernovas::SolarSystemSource | |
| SolarSystemSource () | |
| Protected Member Functions inherited from supernovas::Source | |
| Source () | |
| stored data on source | |
| Protected Member Functions inherited from supernovas::Validating | |
| Validating () | |
| dummy constructor; | |
| Protected Attributes inherited from supernovas::Source | |
| struct novas_object | _object = {} |
| Protected Attributes inherited from supernovas::Validating | |
| bool | _valid = false |
| the state variable. | |
A major planet (including Pluto), or the Sun and the Moon, the Solar-System Barycenter (SSB), the Earth-Moon Barycenter (EMB), and the Pluto-system barycenter.
Planet positions are usually provided by the JPL DE ephemeris files, such as DE440 or DE440s. By default SuperNOVAS calculates approximate position for the Earth and Sun only. Thus to provide ephemeris positions for all planet-type osurces, you will have to configure a Solar-system ephemeris provider, e.g. via novas_use_calceph() or novas_use_cspice().
|
explicit |
Instantiates a planet from its NOVAS ID number.
| number | the NOVAS ID number |
References supernovas::SolarSystemSource::SolarSystemSource(), supernovas::Source::_object, supernovas::Validating::_valid, make_planet(), and NOVAS_PLANET.
|
overridevirtual |
Returns a pointer to a newly allocated copy of this planet instance.
Implements supernovas::Source.
| int supernovas::Planet::de_number | ( | ) | const |
Returns the ID number of for this planet (or planet type body in the SuperNOVAS sense) in the JPL DExxx (e.g.
DE441) planetary ephemeris data files. For some planets, the DExxx files contain data for the planet's center, while for others it is for the barycenter of the planetary system.
References novas_id(), and novas_to_dexxx_planet().
|
static |
Returns the static reference to the planet Earth.
References NOVAS_EARTH.
|
static |
|
static |
Returns a new planet corresponding to the specified NAIF ID, if possible, or else an invalid Planet if the NAIF id does not belong to a major planet in the SuperNOVAS definition (which includes the Sun, Moon, SSB, EMB, and Pluto system barycenter also).
As such, you should typically check the result, e.g. as:
| naif | the NAIF ID number of the planet |
References naif_to_novas_planet(), and NOVAS_PLANETS.
|
static |
Returns a new planet corresponding to the specified name (case insensitive), if possible, or else an invalid Planet if the name does not correspond to a major planet in the SuperNOVAS definition (which includes the Sun, Moon, SSB, EMB, and Pluto system barycenter also).
As such, you should typically check the result, e.g. as:
| name | the planet's name (includes Sun, Moon, SSB, EMB, and Pluto-Barycenter also). Case insensitive. |
References supernovas::Source::name(), novas_planet_for_name(), and NOVAS_PLANETS.
|
static |
Returns the static reference to the planet Jupiter.
References NOVAS_JUPITER.
|
static |
Returns the static reference to the planet Mars.
References NOVAS_MARS.
| double supernovas::Planet::mass | ( | ) | const |
Returns the mean radius (average of the equatorial and polar radii) of this planet (or planet type body in the SuperNOVAS sense).
References supernovas::Source::_object, supernovas::Validating::is_valid(), supernovas::Constant::M_sun, and NOVAS_RMASS_INIT.
| Coordinate supernovas::Planet::mean_radius | ( | ) | const |
Returns the mean radius (average of the equatorial and polar radii) of this planet (or planet type body in the SuperNOVAS sense).
References supernovas::Source::_object, supernovas::Validating::is_valid(), NOVAS_PLANET_RADII_INIT, and supernovas::Coordinate::undefined().
|
static |
Returns the static reference to the planet Mercury.
References NOVAS_MERCURY.
|
static |
Returns the static reference to the Moon.
References NOVAS_MOON.
| int supernovas::Planet::naif_id | ( | ) | const |
Returns the NAIF ID number for this planet (or planet type body in the SuperNOVAS sense).
References novas_id(), and novas_to_naif_planet().
|
static |
Returns the static reference to the planet Neptune.
References NOVAS_NEPTUNE.
| enum novas_planet supernovas::Planet::novas_id | ( | ) | const |
Returns the (Super)NOVAS ID of this planet (or planet type body in the SuperNOVAS sense).
References supernovas::Source::_object.
Referenced by approx_apparent_in(), approx_geometric_in(), de_number(), naif_id(), and orbit().
Returns the approximate Keplerian orbital parameters for this planet, calculated for the specified time of reference.
| ref_time | Reference time for the Keplerian orbital parameters. |
References supernovas::Orbital::from_novas_orbit(), supernovas::Time::jd(), novas_id(), novas_make_planet_orbit(), NOVAS_TDB, and orbit().
Referenced by orbit().
|
static |
Returns the static reference to the planet Pluto.
References NOVAS_PLUTO.
|
static |
Returns the static reference to the Pluto system barycenter position.
References NOVAS_PLUTO_BARYCENTER.
|
static |
Returns the static reference to the planet Saturn.
References NOVAS_SATURN.
|
static |
|
static |
|
overridevirtual |
Implements supernovas::Source.
References supernovas::Source::name().
|
static |
Returns the static reference to the planet Uranus.
References NOVAS_URANUS.
|
static |
Returns the static reference to the planet Venus.
References NOVAS_VENUS.