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

The astrometric 3D geometric equatorial position of an object, referenced to the Solar System Barycenter (SSB) or place in the Solar-system w.r.t. More...

#include <supernovas.h>

Inheritance diagram for supernovas::AstrometricPosition:

Public Member Functions

 AstrometricPosition (const Position &equ_pos, const Frame &frame, enum novas_reference_system system=NOVAS_TOD)
 Instantiates an astrometric position from a true-of-date (TOD) equatorial position vector references to an observing frame.
Equatorial as_equatorial () const
 Returns the equatorial coordinates place of this position, as would be seen by a stationary (w.r.t.
const Timeemit_time () const
 Returns the time at which the observed light was emitted from this position, that is antedated from the time of observation by the time it takes for light to travel to the observer.
Time obs_time () const
 Returns the reference time at which this position was observed by an observer at the reference location.
const Positionreference () const
 Returns the Solar system barycentric (SSB) position, relative to which this position is defined.
AstrometricPosition referenced_to (const Position &ssb_pos) const
 Returns the same astrometric location relative to a new location relative to the Solar-system Barycenter.
AstrometricPosition referenced_to_ssb () const
 Returns the same astrometric location relative the Solar-system Barycenter (SSB).
enum novas_reference_system system_type () const
 Returns the equatorial coordinate reference system type in which this astrometric position was defined.
std::string to_string (int decimals=3) const override
 Returns a human-readable string representation of this referenced position.
Public Member Functions inherited from supernovas::Position
 Position (const double pos[3], double unit=Unit::m)
 Instantiates a new 3D cartesian position vector from its components in S.I.
 Position (double x_m, double y_m, double z_m)
 Instantiates a new 3D cartesian position vector from its components in S.I.
AstrometricPosition as_astrometric (const Frame &frame, enum novas_reference_system system=NOVAS_TOD) const
 Returns this equatorial position vector as an astrometric position, referenced to the specified time and Solar-system barycentric observer location.
Coordinate distance () const
 Returns the distance to the location indicated by this position (that is the absolute value of this position vector).
bool equals (const Position &p, double precision) const
 Checks if this position is the same as another, within the specified precision.
Position inv () const
 Returns a position vector with the same magnitude as this, but in the opposite direction.
bool operator!= (const Position &p) const
 Checks if this position is differs fro the specified other position by more than the 12th significant figure, or 1mm (whichever is larger).
Position operator+ (const Position &r) const
 Returns the sum of this position and another (relative) position.
Position operator- (const Position &r) const
 Returns the difference of this position and another position.
Velocity operator/ (const Interval &dt) const
 Returns the velocity vector that is equal to this position vector travelled under the specified time interval.
bool operator== (const Position &p) const
 Checks if this position is the same as the specified other position to 12 significant figures, or 1mm (whichever is larger).
Spherical to_spherical () const
 Converts this position vector to Spherical coordinates.
Public Member Functions inherited from supernovas::Vector
virtual ~Vector ()
const double * _array () const
 Returns the underlying double[3] C array that stores the components of this vector internally.
double abs () const
 Returns the absolute value (length / magnitude) of this vector.
double dot (const Vector &v) const
 Returns the dot product of this vector and the specified other vector.
bool is_zero () const
 Checks if this verctor is a null vector, that is all of its components are zero.
Vector operator* (double r) const
 Scales a vector by a factor, for example to cast it to/from a physical unit.
double operator[] (int idx) const
 Returns the component at the specified index.
Angle phi () const
 Returns the azumithal angle of this vector.
double projection_on (const Vector &v) const
 Returns the projection of this vector along the direction of another vector.
Vector scaled (double factor) const
 Returns a rescaled version of this vector, for example to cast it to/from a physical unit.
Angle theta () const
 Returns the polar angleof this vector, that is the angle from the z axis.
Vector unit_vector () const
 Returns a unit vector in the direction of this vector.
double x () const
 Returns the x component of this vector.
double y () const
 Returns the y component of this vector.
double z () const
 Returns the z component of this vector.
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().

Additional Inherited Members

Static Public Member Functions inherited from supernovas::Position
static const Positionorigin ()
 Returns a reference to the statically define position at the origin (that is a null posiution vector).
static const Positionundefined ()
 Returns a reference to a statically defined standard invalid position vector.
Protected Member Functions inherited from supernovas::Position
 Position ()
 Instantiates an undefined position vector.
Protected Member Functions inherited from supernovas::Vector
 Vector ()
 Instantiates an undefined vector.
 Vector (double x, double y, double z)
 Instantiates a vector from its cartesian components.
bool equals (const Vector &v, double precision) const
 Checks if this vector is the same as another vector, within the specified precision.
Protected Member Functions inherited from supernovas::Validating
 Validating ()
 dummy constructor;
Protected Attributes inherited from supernovas::Vector
double _component [3]
 [arb.u] Array containing the x, y, z components.
Protected Attributes inherited from supernovas::Validating
bool _valid = false
 the state variable.

Detailed Description

The astrometric 3D geometric equatorial position of an object, referenced to the Solar System Barycenter (SSB) or place in the Solar-system w.r.t.

the SSB, at a specific astrometric time.

See also
Geometric, Apparent::astrometric_position(), Position::as_astrometric()

Constructor & Destructor Documentation

◆ AstrometricPosition()

supernovas::AstrometricPosition::AstrometricPosition ( const Position & equ_pos,
const Frame & frame,
enum novas_reference_system system = NOVAS_TOD )

Instantiates an astrometric position from a true-of-date (TOD) equatorial position vector references to an observing frame.

Parameters
equ_posEquatorial rectangual position vector defined relative to the reference place.
Observing framesObserving frame (observer location and time of observation).
system(optional) Equatorial coordinate reference system type used for the position and observer location (default: TOD).

References supernovas::Position::Position().

Member Function Documentation

◆ reference()

const Position & supernovas::AstrometricPosition::reference ( ) const

Returns the Solar system barycentric (SSB) position, relative to which this position is defined.

Returns
the Solar-system barycentric position that this position is referenced to.

References supernovas::Position::Position().

◆ referenced_to()

AstrometricPosition supernovas::AstrometricPosition::referenced_to ( const Position & ref_pos) const

Returns the same astrometric location relative to a new location relative to the Solar-system Barycenter.

Parameters
ref_posThe new location, w.r.t. the SSB, relative to which to redefine this position. It should be given in the same coordinate reference system in which this position was defined.
Returns
This position but referenced to the new location.
See also
referenced_to_ssb()

References supernovas::Position::Position(), supernovas::Validating::is_valid(), and obs_time().

Referenced by referenced_to_ssb().

◆ referenced_to_ssb()

AstrometricPosition supernovas::AstrometricPosition::referenced_to_ssb ( ) const

Returns the same astrometric location relative the Solar-system Barycenter (SSB).

Returns
This position but referenced to the SSB.
See also
referenced_to()

References supernovas::Validating::is_valid(), supernovas::Position::origin(), and referenced_to().

◆ system_type()

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

Returns the equatorial coordinate reference system type in which this astrometric position was defined.

Returns
the reference system type for this position.
See also
Transforming between equatorial systems

◆ to_string()

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

Returns a human-readable string representation of this referenced position.

Parameters
decimalsNumber of decimal places to show for the position components.
Returns
a string summary of this referenced position.

Reimplemented from supernovas::Position.

References to_string(), and supernovas::Position::to_string().

Referenced by to_string().