Loading...
Searching...
No Matches
supernovas::Geometric Class Reference
Geometric positions and velocities

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.
Coordinate | distance () const
| Returns the geometric distance.
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 Frame & | frame () 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 Position & | position () 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 Velocity & | velocity () 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' 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 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.

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

Since
  1.6

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

  p | equatorial position vector, with respect to the observer
  v | equatorial velocity vector, with respect to the observer
  frame | observing frame (observer location and time of observation)
  system | equatorial coordinate reference_system, in which position and velocity vectors are defined

Since
  1.6

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

## Member Function Documentation

## distance()

Coordinate supernovas::Geometric::distance | ( |  | ) | const

Returns the geometric distance.

Returns
  the geometric distance.

Since
  1.6

## 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)

Since
  1.6

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

  system | the 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.

Since
  1.6

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.

Since
  1.6

See also
  astrometric_position(), equatorial(), velocity(), system()

Referenced by supernovas::Observer::to_interferometric(), and 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.

Since
  1.6

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.

Since
  1.6

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.

Since
  1.6

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;
}
supernovas::Geometric::to_itrs
Geometric to_itrs() const
Returns new geometric coordinates that are transformed from these into the rotating International Ter...
Definition Geometric.cpp:361

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.

Since
  1.6

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.

Since
  1.6

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.

Since
  1.6

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.

Since
  1.6

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

  system | the 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.

Since
  1.6

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.

Since
  1.6

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.

Since
  1.6

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.

Since
  1.6

Referenced by supernovas::SolarSystemSource::barycentric_at(), 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.

Since
  1.6

See also
  position(), system()

Referenced by supernovas::Observer::to_interferometric(), and to_string().