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

An observer location and motion, defined relative to the geocenter, such as for an Earth-orbit sattelite, or for a virtual observer located at the geocenter itself. More...

#include <supernovas.h>

Inheritance diagram for supernovas::GeocentricObserver:

Public Member Functions

 GeocentricObserver ()
 Instantiates a new observer located at the geocenter.
 GeocentricObserver (const Position &pos, const Velocity &vel)
 Instantiates a new observer located (and moving) relative to the geocenter.
const Observer * copy () const override
 Returns a pointer to a newly allocated copy of this geocentric observer instance.
Position geocentric_position () const
 Returns the momentary geocentric position of this observer.
Velocity geocentric_velocity () const
 Returns the momentary geocentric velocity of this observer.
bool is_geocentric () const override
 Checks if this observer can be cast to a GeocentricObserver.
std::string to_string () const override
 Returns a string representation of this geocentric observer.
Public Member Functions inherited from supernovas::Observer
virtual ~Observer ()
const observer_novas_observer () const
 Returns the underlying NOVAS C observer data structure.
Frame frame_at (const Time &time, enum novas_accuracy accuracy=NOVAS_FULL_ACCURACY) const
 Returns an observing frame for this observer at the specified time and optionally with a specified accuracy.
virtual bool is_geodetic () const
 Checks if this observer can be cast to a GeodeticObserver.
Frame reduced_accuracy_frame_at (const Time &time) const
 Returns a reduced accuracy observing frame for this observer at the specified time.
enum novas_observer_place type () const
 Returns the observer type.
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::Observer
static GeocentricObserver at_geocenter ()
 Returns a fictitious observer placed at the location of the geocenter.
static SolarSystemObserver at_ssb ()
 Returns a fictitious observer placed at the location of the Solar-System Barycenter (SSB).
static GeocentricObserver in_earth_orbit (const Position &pos, const Velocity &vel)
 Returns a new observer orbiting the Earth.
static SolarSystemObserver in_solar_system (const Position &pos, const Velocity &vel)
 Returns a new observer in some Solar-system location.
static GeodeticObserver moving_on_earth (const Site &site, const EOP &eop, const ScalarVelocity &horizontal, const Angle &direction, const ScalarVelocity &vertical=ScalarVelocity::stationary())
 Instantiates a new observer that is moving relative to Earth's surface, such as an airborne observer.
static GeodeticObserver moving_on_earth (const Site &site, const Velocity &itrs_vel, const EOP &eop)
 Returns a new observer that is moving, at some velocitym relative to Earth's surface, such as an airborne aircraft or balloon based observatory.
static GeodeticObserver on_earth (const Site &site, const EOP &eop)
 Returns a new observer located at a fixed observing site.
static const Observer & undefined ()
 Returns a reference to a statically defined standard invalid observer.
Protected Member Functions inherited from supernovas::Observer
 Observer (enum novas_observer_place type, const Site &site=Site::undefined(), const Position &pos=Position::origin(), const Velocity &vel=Velocity::stationary())
Protected Member Functions inherited from supernovas::Validating
 Validating ()
 dummy constructor;
Protected Attributes inherited from supernovas::Observer
observer _observer = {}
 stored observer data
Protected Attributes inherited from supernovas::Validating
bool _valid = false
 the state variable.

Detailed Description

An observer location and motion, defined relative to the geocenter, such as for an Earth-orbit sattelite, or for a virtual observer located at the geocenter itself.

See also
GeodeticObserver

Constructor & Destructor Documentation

◆ GeocentricObserver() [1/2]

supernovas::GeocentricObserver::GeocentricObserver ( )

Instantiates a new observer located at the geocenter.

References GeocentricObserver(), supernovas::Validating::_valid, and NOVAS_OBSERVER_AT_GEOCENTER.

Referenced by GeocentricObserver(), and copy().

◆ GeocentricObserver() [2/2]

supernovas::GeocentricObserver::GeocentricObserver ( const Position & pos,
const Velocity & vel )

Instantiates a new observer located (and moving) relative to the geocenter.

Parameters
posmomentary position of the observer relative to the geocenter.
velmomentary velocity of the observer relative to the geocenter.

References supernovas::Validating::_valid, supernovas::Validating::is_valid(), NOVAS_OBSERVER_IN_EARTH_ORBIT, and supernovas::Observer::undefined().

Member Function Documentation

◆ copy()

const Observer * supernovas::GeocentricObserver::copy ( ) const
overridevirtual

Returns a pointer to a newly allocated copy of this geocentric observer instance.

Returns
pointer to new copy of this geocentric observer instance.

Reimplemented from supernovas::Observer.

References GeocentricObserver().

◆ geocentric_position()

Position supernovas::GeocentricObserver::geocentric_position ( ) const

Returns the momentary geocentric position of this observer.

Returns
the momentary geocentric position
See also
geocentric_velocity()

References supernovas::Observer::_observer, supernovas::Validating::is_valid(), and supernovas::Unit::km.

Referenced by to_string().

◆ geocentric_velocity()

Velocity supernovas::GeocentricObserver::geocentric_velocity ( ) const

Returns the momentary geocentric velocity of this observer.

Returns
the momentary geocentric velocity
See also
geocentric_position()

References supernovas::Observer::_observer, supernovas::Validating::is_valid(), supernovas::Unit::km, and supernovas::Unit::sec.

Referenced by to_string().

◆ is_geocentric()

bool supernovas::GeocentricObserver::is_geocentric ( ) const
overridevirtual

Checks if this observer can be cast to a GeocentricObserver.

Returns
true if this observer is an instance of GeocentricObserver, otherwise false.
See also
GeocentricObserver, is_geodetic()

Reimplemented from supernovas::Observer.

◆ to_string()

std::string supernovas::GeocentricObserver::to_string ( ) const
overridevirtual

Returns a string representation of this geocentric observer.

Returns
a string representation of this observer.

Reimplemented from supernovas::Observer.

References geocentric_position(), geocentric_velocity(), supernovas::Vector::is_zero(), supernovas::Position::to_string(), and supernovas::Velocity::to_string().