SuperNOVAS C++ API v1.6
High-precision C/C++ astrometry library
Loading...
Searching...
No Matches
supernovas::Geometric Class Reference

The geometric (3D) position and velocity of a source relative to an observer location. More...

#include <supernovas.h>

Inheritance diagram for supernovas::Geometric:

Public Member Functions

 Geometric (const Frame &frame, const Position &p, const Velocity &v, enum novas_reference_system system=NOVAS_TOD)
 Instantiates new geometric coordinates, relative to an observer frame, in the equatorial coordinate reference system of choice.
Ecliptic ecliptic () const
 Returns the geometric ecliptic coordinates, in the system in which the geometric positions and velocities were defined.
Equatorial equatorial () const
 Returns the geometric equatorial coordinates, in the system in which the geometric positions and velocities were defined.
const Frameframe () const
 Returns the observing frame for which these geometric coordinates were defined.
Galactic galactic () const
 Returns the geometric galactic coordinates, in the system in which the geometric positions and velocities were defined.
Geometric operator>> (enum novas_reference_system system) const
 Returns new geometric coordinates that are transformed from these into a different coordinate reference system.
const Positionposition () const
 Returns the cartesian equatorial position vector, relative to the observer.
enum novas_reference_system system_type () const
 Returns the equatorial coordinate system in which these geometric coordinates are defined.
Geometric to_cirs () const
 Returns new geometric coordinates that are transformed from these into the Celestial Intermediate Reference System (CIRS), with respect to the true dynamical equator and the Celestial Intermediate Origin (CIO) of date.
Geometric to_icrs () const
 Returns new geometric coordinates that are transformed from these into the International Coordinate Reference System (ICRS).
Geometric to_itrs () const
 Returns new geometric coordinates that are transformed from these into the rotating International Terrestrial Reference System (ITRS), with respect to the true dynamical equator and the Greenwich meridian.
Geometric to_j2000 () const
 Returns new geometric coordinates that are transformed from these into the J2000 mean dynamical catalog coordinate system.
Geometric to_mod () const
 Returns new geometric coordinates that are transformed from these into the Mean-of-Date (MOD) dynamical system, with respect to the mean dynamical equator and equinox of date.
std::string to_string (int decimals=3) const
 Returns a human-readable basic string description of these geometric positions and velocities.
Geometric to_system (enum novas_reference_system system) const
 Returns new geometric coordinates that are transformed from these into a different coordinate reference system.
Geometric to_tirs () const
 Returns new geometric coordinates that are transformed from these into the rotating Terrestrial Intermediate Reference System (TIRS), with respect to the true dynamical equator and the Terrestrial Intermediate Origin (TIO) of date.
Geometric to_tod () const
 Returns new geometric coordinates that are transformed from these into the True-of-Date (TOD) dynamical system, with respect to the true dynamical equator and equinox of date.
const Velocityvelocity () const
 Returns the cartesian equatorial velocity vector, relative to the observer.
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 Geometric & undefined ()
 Returns a reference to a statically defined standard invalid geometric coordinates.

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

The geometric (3D) position and velocity of a source relative to an observer location.

It denotes spatial location and velocity of the source at the time light originated from it, prior to detection by the observer. As such, geometric positions are necessarily antedated for light travel time (for Solar-system sources) or corrected for the differential light-travel between the Solar-system barycenter and the observer location (for sidereal sources).

In other words, geometric positions are not the same as ephemeris positions for the equivalent time for Solar-system bodies. Rather, geometric positions match the ephemeris positions for an earlier time, when the observed light originated from the source.

See also
Source::geometric_in(), Frame::geometric_planet()
Apparent

Constructor & Destructor Documentation

◆ Geometric()

supernovas::Geometric::Geometric ( const Frame & frame,
const Position & p,
const Velocity & v,
enum novas_reference_system system = NOVAS_TOD )

Instantiates new geometric coordinates, relative to an observer frame, in the equatorial coordinate reference system of choice.

Parameters
pequatorial position vector, with respect to the observer
vequatorial velocity vector, with respect to the observer
frameobserving frame (observer location and time of observation)
systemequatorial coordinate reference_system, in which position and velocity vectors are defined

References supernovas::Validating::_valid, frame(), supernovas::Validating::is_valid(), and NOVAS_REFERENCE_SYSTEMS.

Member Function Documentation

◆ frame()

const Frame & supernovas::Geometric::frame ( ) const

Returns the observing frame for which these geometric coordinates were defined.

Returns
a reference to the observing frame (observer location and time of observation)
See also
system()

Referenced by Geometric().

◆ operator>>()

Geometric supernovas::Geometric::operator>> ( enum novas_reference_system system) const

Returns new geometric coordinates that are transformed from these into a different coordinate reference system.

Same as to_system(). For dynamical coordinate systems, the result is in the coordinate epoch of observation.

Parameters
systemthe new coordinate reference system type
Returns
geometric coordinates for the same position and velocity as this, but expressed in the other type of coordinate reference system.
See also
to_system()

References supernovas::Validating::is_valid().

◆ position()

const Position & supernovas::Geometric::position ( ) const

Returns the cartesian equatorial position vector, relative to the observer.

Returns
the equatorial position vector.
See also
astrometric_position(), equatorial(), velocity(), system()

Referenced by to_string().

◆ system_type()

enum novas_reference_system supernovas::Geometric::system_type ( ) const

Returns the equatorial coordinate system in which these geometric coordinates are defined.

Returns
a reference to the equatorial coordinate system stored internally.
See also
position(), velocity(), equatorial()

◆ to_cirs()

Geometric supernovas::Geometric::to_cirs ( ) const

Returns new geometric coordinates that are transformed from these into the Celestial Intermediate Reference System (CIRS), with respect to the true dynamical equator and the Celestial Intermediate Origin (CIO) of date.

Returns
geometric coordinates for the same position and velocity as this, but expressed in the CIRS.
See also
to_system(), to_icrs(), to_j2000(), to_mod(), to_tod(), to_tirs(), to_itrs()

References supernovas::Validating::is_valid(), and NOVAS_CIRS.

◆ to_icrs()

Geometric supernovas::Geometric::to_icrs ( ) const

Returns new geometric coordinates that are transformed from these into the International Coordinate Reference System (ICRS).

Returns
geometric coordinates for the same position and velocity as this, but expressed in the ICRS.
See also
to_system(), to_j2000(), to_mod(), to_tod(), to_cirs(), to_tirs(), to_itrs()

References supernovas::Validating::is_valid(), and NOVAS_ICRS.

◆ to_itrs()

Geometric supernovas::Geometric::to_itrs ( ) const

Returns new geometric coordinates that are transformed from these into the rotating International Terrestrial Reference System (ITRS), with respect to the true dynamical equator and the Greenwich meridian.

The returned instance may be invalid if an invalid EOP was supplied and the observer also does not define its own valid EOP. It's best practice to check on the validity of the returned value, e.g. as:

Geometric g = ...; // geometric coordinates defined in some reference system
Geometric itrs = g.to_itrs(eop);
if(!itrs) {
// Oops, there was no valid EOP to calculate true ITRS values.
return;
}
Geometric to_itrs() const
Returns new geometric coordinates that are transformed from these into the rotating International Ter...
Definition Geometric.cpp:332
Returns
geometric coordinates for the same position and velocity as this, but expressed in the ITRS. The returned instance may be invalid if an invalid EOP was supplied and the observer also does not define its own valid EOP.
See also
to_system(), to_icrs(), to_j2000(), to_mod(), to_tod(), to_cirs(), to_tirs()

References supernovas::Validating::is_valid(), and NOVAS_ITRS.

◆ to_j2000()

Geometric supernovas::Geometric::to_j2000 ( ) const

Returns new geometric coordinates that are transformed from these into the J2000 mean dynamical catalog coordinate system.

Returns
geometric coordinates for the same position and velocity as this, but expressed in the J2000 catalog system.
See also
to_system(), to_icrs(), to_mod(), to_tod(), to_cirs(), to_tirs(), to_itrs()

References supernovas::Validating::is_valid(), and NOVAS_J2000.

◆ to_mod()

Geometric supernovas::Geometric::to_mod ( ) const

Returns new geometric coordinates that are transformed from these into the Mean-of-Date (MOD) dynamical system, with respect to the mean dynamical equator and equinox of date.

Returns
geometric coordinates for the same position and velocity as this, but expressed in the MOD system of date.
See also
to_system(), to_icrs(), to_j2000(), to_tod(), to_cirs(), to_tirs(), to_itrs()

References supernovas::Validating::is_valid(), and NOVAS_MOD.

◆ to_string()

std::string supernovas::Geometric::to_string ( int decimals = 3) const

Returns a human-readable basic string description of these geometric positions and velocities.

Parameters
decimals(optional) Number of decimal places to print after the decimal point (default: 3).
Returns
a string description of these geometric coordinates.

References position(), supernovas::Position::to_string(), supernovas::Velocity::to_string(), and velocity().

◆ to_system()

Geometric supernovas::Geometric::to_system ( enum novas_reference_system system) const

Returns new geometric coordinates that are transformed from these into a different coordinate reference system.

For dynamical coordinate systems, the result is in the coordinate epoch of observation.

Note, that using this pathway (as to_system().equatorial()) for converting geometric positions to different equatorial systems is typically much faster than the equivalent but slower equatorial().to_system(), since this method uses transformations that are readily available for the observing frame.

Parameters
systemthe new coordinate reference system type
Returns
geometric coordinates for the same position and velocity as this, but expressed in the other type of coordinate reference system.
See also
operator>>(), to_icrs(), to_j2000(), to_mod(), to_tod(), to_cirs(), to_tirs(), to_itrs()

References supernovas::Validating::is_valid(), novas_make_transform(), novas_transform_vector(), and undefined().

◆ to_tirs()

Geometric supernovas::Geometric::to_tirs ( ) const

Returns new geometric coordinates that are transformed from these into the rotating Terrestrial Intermediate Reference System (TIRS), with respect to the true dynamical equator and the Terrestrial Intermediate Origin (TIO) of date.

Returns
geometric coordinates for the same position and velocity as this, but expressed in the TIRS.
See also
to_system(), to_icrs(), to_j2000(), to_mod(), to_tod(), to_cirs(), to_itrs()

References supernovas::Validating::is_valid(), and NOVAS_TIRS.

◆ to_tod()

Geometric supernovas::Geometric::to_tod ( ) const

Returns new geometric coordinates that are transformed from these into the True-of-Date (TOD) dynamical system, with respect to the true dynamical equator and equinox of date.

Returns
geometric coordinates for the same position and velocity as this, but expressed in the TOD system of date.
See also
to_system(), to_icrs(), to_j2000(), to_mod(), to_cirs(), to_tirs(), to_itrs()

References supernovas::Validating::is_valid(), and NOVAS_TOD.

◆ undefined()

const Geometric & supernovas::Geometric::undefined ( )
static

Returns a reference to a statically defined standard invalid geometric coordinates.

These invalid coordinates may be used inside any object that is invalid itself.

Returns
a reference to a static standard invalid geometric coordinates.

Referenced by supernovas::Source::geometric_in(), supernovas::Frame::geometric_moon_elp2000(), and to_system().

◆ velocity()

const Velocity & supernovas::Geometric::velocity ( ) const

Returns the cartesian equatorial velocity vector, relative to the observer.

Returns
the equatorial velocity vector.
See also
position(), system()

Referenced by to_string().