Loading...
Searching...
No Matches
supernovas::Equatorial Class Reference
Equatorial coordinates and systems

Equatorial coordinates (RA, Dec / α, δ), representing the direction on the sky, for a particular type of equatorial coordinate reference system, relative to the equator and equatorial origin (such as the Vernal Equinox or CIO) in that system. More...

`#include <supernovas.h>`

Inheritance diagram for supernovas::Equatorial:

## Public Member Functions

| Equatorial (const Angle &ra, const Angle &dec, const Equinox &system=Equinox::icrs())
| Instantiates equatorial coordinates with the specified right-ascension (R.A.) and declination coordinates, optionally specifying a system and a distance if needed.
| Equatorial (const Position &pos, const Equinox &system=Equinox::icrs())
| Instantiates equatorial coordinates with the specified rectangular components.
| Equatorial (const std::string &ra, const std::string &dec, const Equinox &system=Equinox::icrs())
| Instantiates equatorial coordinates with the specified string representations of right-ascension (R.A.) and declination, optionally specifying a system and a distance if needed.
| Equatorial (double ra_rad, double dec_rad, const Equinox &system=Equinox::icrs())
| Instantiates equatorial coordinates with the specified right-ascension (R.A.) and declination coordinates, optionally specifying a system and a distance if needed.
const Angle & | dec () const
| Returns the declination coordinate as an angle.
Angle | distance_to (const Equatorial &other) const
| Returns the angular distance of these equatorial coordiantes to/from the specified other equatorial coordinates.
bool | equals (const Equatorial &other, const Angle &precision) const
| Checks if these equatorial coordinates are the same as another, within the specified precision.
bool | equals (const Equatorial &other, double precision_rad=1.0 *Unit::uas) const
| Checks if these equatorial coordinates are the same as another, within the specified precision.
Equatorial | offset (const Angle &direction, const Angle &distance) const
| Returns equatorial coordinates for an offset position from these along the great circle that crosses these coordinates in the speciifed direction.
Equatorial | offset (double direction_rad, double distance_rad) const
| Returns equatorial coordinates for an offset position from these along the great circle that crosses these coordinates in the speciifed direction.
bool | operator!= (const Equatorial &other) const
| Checks if these equatorial coordinates differ from another, by more than 1 μas.
bool | operator== (const Equatorial &other) const
| Checks if these equatorial coordinates are the same as another, within 1 μas.
Equatorial | operator>> (const Equinox &system) const
| Converts these equatorial coordinates to another equatorial coordinate system.
TimeAngle | ra () const
| Returns the right ascension (R.A.) coordinate as a time-angle.
const Equinox & | system () const
| Returns the equatorial system (type and epoch) in which these equatorial coordinates are defined.
enum novas_reference_system | system_type () const
| Retuens the equatorial reference system type in which thse equatorial coordinates are defined.
Equatorial | to_cirs (const Time &time) const
| Converts these equatorial coordinates to the Celestial Intermediate Reference System (CIRS) coordinate system, at the specified coordinate epoch.
Ecliptic | to_ecliptic (enum novas_accuracy=NOVAS_FULL_ACCURACY) const
| Returns the equivalent ecliptic coordinates corresponding to these equatorial coordinates, with respect to the same equator and equinox of date as these equatorial coordinates.
Galactic | to_galactic () const
| Returns the equivalent galactic coordinates corresponding to these equatorial coordinates.
Equatorial | to_hip () const
| Converts these equatorial coordinates to the Hipparcos catalog coordinate system (= J1991.25).
Equatorial | to_icrs () const
| Converts these equatorial coordinates to the International Celestial Reference System (ICRS).
Equatorial | to_j2000 () const
| Converts these equatorial coordinates to the J2000 (= FK5) catalog coordinate system.
Equatorial | to_mod (const Time &time) const
| Converts these equatorial coordinates to the Mean-of-Date (MOD) catalog coordinate system, at the specified coordinate epoch.
Equatorial | to_mod_at_besselian_epoch (double year) const
| Converts these equatorial coordinates to the Mean-of-Date (MOD) catalog coordinate system, at the specified Besselian coordinate epoch.
std::string | to_string (enum novas_separator_type separator=NOVAS_SEP_UNITS_AND_SPACES, int decimals=3) const override
| Returns a string representation of these equatorial coordinates in HMS / DMS format, optionally specifying the type of separator to use and the precision to print.
Equatorial | to_system (const Equinox &system, enum novas_accuracy accuracy=NOVAS_FULL_ACCURACY) const
| Converts these equatorial coordinates to another equatorial coordinate system.
Equatorial | to_tod (const Time &time) const
| Converts these equatorial coordinates to the True-of-Date (TOD) coordinate system, at the specified coordinate epoch.
Public Member Functions inherited from supernovas::Spherical
| Spherical (const Angle &longitude, const Angle &latitude)
| Instantiates new spherical coordinates with the specified components.
| Spherical (const std::string &longitude, const std::string &latitude)
| Instantiates spherical coordinates with the specified string representations of the longitude and latitude coordinates, optionally specifying a system and a distance if needed.
| Spherical (double longitude_rad, double latitude_rad)
| Instantiates new spherical coordinates with the specified components.
virtual | ~Spherical ()
const Angle & | latitude () const
| Returns the latitude coordinate as an angle.
const Angle & | longitude () const
| Returns the longitude coordinate as an angle.
Position | xyz (const Coordinate &distance) const
| Returns the cartesian position vector corresponding to these spherical coordinates.
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 Equatorial & | undefined ()
| Returns a reference to a statically defined standard invalid equatorial coordinates.

## Additional Inherited Members

Protected Member Functions inherited from supernovas::Spherical
| Spherical ()
| Instantiates invalid spherical coordinates.
Angle | distance_to (const Spherical &other) const
| Returns the angular distance of these spherical coordiantes to/from the specified other spherical coordinates.
bool | equals (const Spherical &other, double precision) const
Protected Member Functions inherited from supernovas::Validating
| Validating ()
| dummy constructor;
Protected Attributes inherited from supernovas::Validating
bool | _valid = false
| the state variable.

## Detailed Description

Equatorial coordinates (RA, Dec / α, δ), representing the direction on the sky, for a particular type of equatorial coordinate reference system, relative to the equator and equatorial origin (such as the Vernal Equinox or CIO) in that system.

Since
  1.6

## Constructor & Destructor Documentation

## Equatorial() [1/4]

supernovas::Equatorial::Equatorial | ( | double | ra_rad,
|  | double | dec_rad,
|  | const Equinox & | system = Equinox::icrs() )

Instantiates equatorial coordinates with the specified right-ascension (R.A.) and declination coordinates, optionally specifying a system and a distance if needed.

Parameters

  ra_rad | [rad] right ascension (R.A.) coordinate
  dec_rad | [rad] declination coordinate
  system | (optional) the equatorial coordinate reference system in which the coordinates are specified (default: ICRS)

Since
  1.6

References supernovas::Spherical::Spherical(), and system().

## Equatorial() [2/4]

supernovas::Equatorial::Equatorial | ( | const Angle & | ra,
|  | const Angle & | dec,
|  | const Equinox & | system = Equinox::icrs() )

Instantiates equatorial coordinates with the specified right-ascension (R.A.) and declination coordinates, optionally specifying a system and a distance if needed.

Parameters

  ra | right ascension (R.A.) coordinate
  dec | declination coordinate
  system | (optional) the equatorial coordinate reference system in which the coordinates are specified (default: ICRS)

Since
  1.6

References supernovas::Spherical::Spherical(), dec(), ra(), and system().

## Equatorial() [3/4]

supernovas::Equatorial::Equatorial | ( | const std::string & | ra,
|  | const std::string & | dec,
|  | const Equinox & | system = Equinox::icrs() )

Instantiates equatorial coordinates with the specified string representations of right-ascension (R.A.) and declination, optionally specifying a system and a distance if needed.

After instantiation, you should check that the resulting coordinates are valid, e.g. as:

Equatorial coords = Equatorial(..., ...);
if(!coords.is_valid()) {
// oops, looks like the angles could not be parsed...
return;
}
supernovas::Validating::is_valid
bool is_valid() const
Returns the previously set 'valid' state of the implementing instance.
Definition supernovas.h:278

Parameters

  ra | string representation of the right ascension (R.A.) coordinate in HMS or decimal hours.
  dec | string representation of the declination coordinate as DMS or decimal degrees.
  system | (optional) the equatorial coordinate reference system in which the coordinates are specified (default: ICRS)

Since
  1.6

See also
  novas_str_hours(), novas_str_degrees() for details on string representation that can be parsed.
  novas_parse_hours(), novas_parse_degrees() for more managed parsing from strings.

References dec(), ra(), and system().

## Equatorial() [4/4]

supernovas::Equatorial::Equatorial | ( | const Position & | pos,
|  | const Equinox & | system = Equinox::icrs() )

explicit

Instantiates equatorial coordinates with the specified rectangular components.

Parameters

  pos | position vector
  system | (optional) the equatorial coordinate reference system in which the coordinates are specified (default: ICRS)

Since
  1.6

References supernovas::Spherical::Spherical(), and system().

## Member Function Documentation

## dec()

const Angle & supernovas::Equatorial::dec | ( |  | ) | const

Returns the declination coordinate as an angle.

Returns
  the declination coordinate.

Since
  1.6

See also
  ra()

References supernovas::Spherical::latitude().

Referenced by supernovas::CatalogEntry::CatalogEntry(), Equatorial(), Equatorial(), offset(), to_ecliptic(), to_galactic(), to_string(), and to_system().

## distance_to()

Angle supernovas::Equatorial::distance_to | ( | const Equatorial & | other | ) | const

Returns the angular distance of these equatorial coordiantes to/from the specified other equatorial coordinates.

Parameters

  other | the reference equatorial coordinates

Returns
  the angular distance of thereturn Angle::operator+(r);se coordinates to/from the argument.

Since
  1.6

See also
  offset_by()

References supernovas::Spherical::distance_to(), and supernovas::Validating::is_valid().

## equals() [1/2]

bool supernovas::Equatorial::equals | ( | const Equatorial & | other,
|  | const Angle & | precision ) const

Checks if these equatorial coordinates are the same as another, within the specified precision.

Parameters

  other | the reference equatorial coordinates
  precision | (optional) precision for equality test (default: 1 μas).

Returns
  true if these coordinates are the same as the reference within the precision, or else false.

Since
  1.6

See also
  operator==()

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

## equals() [2/2]

bool supernovas::Equatorial::equals | ( | const Equatorial & | other,
|  | double | precision_rad = 1.0 * Unit::uas ) const

Checks if these equatorial coordinates are the same as another, within the specified precision.

Parameters

  other | the reference equatorial coordinates
  precision_rad | [rad] (optional) precision for equality test (default: 1 μas).

Returns
  true if these coordinates are the same as the reference within the precision, or else false.

Since
  1.6

See also
  equals(), operator==()

References supernovas::Spherical::equals().

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

## offset() [1/2]

Equatorial supernovas::Equatorial::offset | ( | const Angle & | direction,
|  | const Angle & | distance ) const

Returns equatorial coordinates for an offset position from these along the great circle that crosses these coordinates in the speciifed direction.

Parameters

  direction | offset direction, measured East of the local North.
  distance | offset great circle distance.

Returns
  The equatorial coordinates of the offset position

Since
  1.7

See also
  distance_to(), Ecliptic::offset(), Galactic::offset(), Horizontal::offset()

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

## offset() [2/2]

Equatorial supernovas::Equatorial::offset | ( | double | direction_rad,
|  | double | distance_rad ) const

Returns equatorial coordinates for an offset position from these along the great circle that crosses these coordinates in the speciifed direction.

Parameters

  direction_rad | [rad] offset direction, measured East of the local North.
  distance_rad | [rad] offset great circle distance.

Returns
  The equatorial coordinates of the offset position

Since
  1.7

See also
  distance_to(), Ecliptic::offset(), Galactic::offset(), Horizontal::offset()

References dec(), supernovas::Unit::deg, supernovas::Validating::is_valid(), novas_offset_by(), ra(), and system().

Referenced by offset().

## operator!=()

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

Checks if these equatorial coordinates differ from another, by more than 1 μas.

Parameters

  other | the reference equatorial coordinates

Returns
  true if these coordinates differ from the reference, by more than 1 μas, or else false.

Since
  1.6

See also
  operator==()

References equals().

## operator==()

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

Checks if these equatorial coordinates are the same as another, within 1 μas.

Parameters

  other | the reference equatorial coordinates

Returns
  true if these coordinates are the same as the reference within 1 μas, or else false.

Since
  1.6

See also
  operator!=()

References equals().

## operator>>()

Equatorial supernovas::Equatorial::operator>> | ( | const Equinox & | system | ) | const

Converts these equatorial coordinates to another equatorial coordinate system.

Same as to_system().

Parameters

  system | the equatorial coordinate system (type and epoch) to convert to.

Returns
  new equatorial coordinates, which represent the same equatorial position as this, but expressed in the specified other coordinate reference system.

Since
  1.6

See also
  to_system()

References supernovas::Validating::is_valid(), system(), and to_system().

## ra()

TimeAngle supernovas::Equatorial::ra | ( |  | ) | const

Returns the right ascension (R.A.) coordinate as a time-angle.

Returns
  the right ascension (R.A.) coordinate.

Since
  1.6

See also
  dec()

References supernovas::Validating::is_valid(), and supernovas::Spherical::longitude().

Referenced by supernovas::CatalogEntry::CatalogEntry(), Equatorial(), Equatorial(), offset(), to_ecliptic(), to_galactic(), to_string(), and to_system().

## system()

const Equinox & supernovas::Equatorial::system | ( |  | ) | const

Returns the equatorial system (type and epoch) in which these equatorial coordinates are defined.

Returns
  the coordinate reference system (type and epoch).

Since
  1.6

See also
  system_type()

Referenced by Equatorial(), Equatorial(), Equatorial(), Equatorial(), offset(), operator>>(), and to_system().

## system_type()

enum novas_reference_system supernovas::Equatorial::system_type | ( |  | ) | const

Retuens the equatorial reference system type in which thse equatorial coordinates are defined.

Returns
  the type of coordinate reference system

Since
  1.6

See also
  system()

## to_cirs()

Equatorial supernovas::Equatorial::to_cirs | ( | const Time & | time | ) | const

Converts these equatorial coordinates to the Celestial Intermediate Reference System (CIRS) coordinate system, at the specified coordinate epoch.

CIRS is defined on the true dynamical equator of date, with its origin at the Celestial Intermediate Origin (CIO).

Parameters

  time | [day] the astronomical time specification for the coordinate epoch.

Returns
  new equatorial coordinates, which represent the same equatorial position as this, but with respect to the true equator and CIO of date.

Since
  1.6

See also
  to_system(), to_tod(), to_icrs()

References supernovas::Equinox::cirs(), supernovas::Validating::is_valid(), and to_system().

## to_hip()

Equatorial supernovas::Equatorial::to_hip | ( |  | ) | const

Converts these equatorial coordinates to the Hipparcos catalog coordinate system (= J1991.25).

Returns
  new equatorial coordinates, which represent the same equatorial position as this, but expressed in the Hipparcos (= J1991.25) catalog system.

Since
  1.6

See also
  to_system(), to_icrs(), to_j2000()

References supernovas::Equinox::hip(), supernovas::Validating::is_valid(), and to_system().

## to_icrs()

Equatorial supernovas::Equatorial::to_icrs | ( |  | ) | const

Converts these equatorial coordinates to the International Celestial Reference System (ICRS).

Returns
  new equatorial coordinates, which represent the same equatorial position as this, but expressed in the ICRS (= FK6).

Since
  1.6

See also
  to_system()

References supernovas::Equinox::icrs(), supernovas::Validating::is_valid(), and to_system().

Referenced by to_galactic(), and supernovas::Ecliptic::to_icrs().

## to_j2000()

Equatorial supernovas::Equatorial::to_j2000 | ( |  | ) | const

Converts these equatorial coordinates to the J2000 (= FK5) catalog coordinate system.

Returns
  new equatorial coordinates, which represent the same equatorial position as this, but expressed in the J2000 (= FK5) catalog system.

Since
  1.6

See also
  to_system(), to_icrs(), to_hip(), to_mod(), to_mod_at_besselian_epoch(), to_tod(), to_cirs()

References supernovas::Validating::is_valid(), supernovas::Equinox::j2000(), and to_system().

Referenced by supernovas::Ecliptic::to_j2000().

## to_mod()

Equatorial supernovas::Equatorial::to_mod | ( | const Time & | time | ) | const

Converts these equatorial coordinates to the Mean-of-Date (MOD) catalog coordinate system, at the specified coordinate epoch.

MOD coordinates are expressed with respect to the mean dynamical equator and equinox of date, accounting for precession but not nutation.

Parameters

  time | [day] the astronomical time specification for the coordinate epoch.

Returns
  new equatorial coordinates, which represent the same equatorial position as this, but expressed in the MOD catalog system of date.

Since
  1.6

See also
  to_mod_at_besselian_epoch(), to_system(), to_j2000(), to_tod()

References supernovas::Validating::is_valid(), supernovas::Equinox::mod(), and to_system().

Referenced by supernovas::Ecliptic::to_mod().

## to_mod_at_besselian_epoch()

Equatorial supernovas::Equatorial::to_mod_at_besselian_epoch | ( | double | year | ) | const

Converts these equatorial coordinates to the Mean-of-Date (MOD) catalog coordinate system, at the specified Besselian coordinate epoch.

MOD coordinates are expressed with respect to the mean dynamical equator and equinox of date, accounting for precession but not nutation.

Parameters

  year | [yr] Besselian year for the coordinate epoch (e.g. 1950.0 for B1950).

Returns
  new equatorial coordinates, which represent the same equatorial position as this, but expressed in the catalog system of the specified Besselian epoch.

Since
  1.6

See also
  to_mod(), to_system(), to_j2000(), to_tod()

References supernovas::Validating::is_valid(), supernovas::Equinox::mod_at_besselian_epoch(), and to_system().

## to_string()

std::string supernovas::Equatorial::to_string | ( | enum novas_separator_type | separator = NOVAS_SEP_UNITS_AND_SPACES,
|  | int | decimals = 3 ) const

override virtual

Returns a string representation of these equatorial coordinates in HMS / DMS format, optionally specifying the type of separator to use and the precision to print.

Parameters

  separator | (optional) the type of separators to use for the HMS / DMS representations of the components (default: units and spaces).
  decimals | (optional) the number of decimal places to print for the seconds (default: 3)

Returns
  a new string with the human-readable representation of these equatorial coordinates.

Since
  1.6

Reimplemented from supernovas::Spherical.

References dec(), ra(), supernovas::Angle::to_string(), and supernovas::TimeAngle::to_string().

Referenced by supernovas::CatalogEntry::to_string().

## to_system()

Equatorial supernovas::Equatorial::to_system | ( | const Equinox & | system,
|  | enum novas_accuracy | accuracy = NOVAS_FULL_ACCURACY ) const

Converts these equatorial coordinates to another equatorial coordinate system.

Parameters

  system | the equatorial coordinate system (type and epoch) to convert to.
  accuracy | (optional) NOVAS_FULL_ACCURACY (default) or NOVAS_REDUCED_ACCURACY.

Returns
  new equatorial coordinates, which represent the same equatorial position as this, but expressed in the specified other coordinate reference system.

Since
  1.6

See also
  operator>>(), to_icrs(), to_j2000(), to_hip(), to_mod(), to_mod_at_besselian_epoch(), to_tod(), to_cirs()

References dec(), supernovas::Unit::deg, supernovas::Unit::hour_angle, supernovas::Validating::is_valid(), novas_icrs_to_sys(), novas_sys_to_icrs(), ra(), radec2vector(), system(), undefined(), and vector2radec().

Referenced by operator>>(), to_cirs(), to_hip(), to_icrs(), supernovas::AstrometricPosition::to_interferometric(), supernovas::Observer::to_interferometric(), to_j2000(), to_mod(), to_mod_at_besselian_epoch(), supernovas::Ecliptic::to_system(), and to_tod().

## to_tod()

Equatorial supernovas::Equatorial::to_tod | ( | const Time & | time | ) | const

Converts these equatorial coordinates to the True-of-Date (TOD) coordinate system, at the specified coordinate epoch.

TOD is defined on the true dynamical equator of date, with its origin at the true equinox of date.

Parameters

  time | [day] the astronomical time specification for the coordinate epoch.

Returns
  new equatorial coordinates, which represent the same equatorial position as this, but expressed with respect to the true equator and equinox of date.

Since
  1.6

See also
  to_system(), to_cirs(), to_j2000(), to_mod()

References supernovas::Validating::is_valid(), to_system(), and supernovas::Equinox::tod().

Referenced by supernovas::Ecliptic::to_tod().

## undefined()

const Equatorial & supernovas::Equatorial::undefined | ( |  | ) |

static

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

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

Returns
  a reference to a static standard invalid equatorial coordinates.

Since
  1.6

Referenced by supernovas::EquatorialTrack::projected_at(), supernovas::Ecliptic::to_equatorial(), supernovas::Galactic::to_equatorial(), and to_system().