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

An abstract observer location. More...

#include <supernovas.h>

Inheritance diagram for supernovas::Observer:

Public Member Functions

virtual ~Observer ()
const observer_novas_observer () const
 Returns the underlying NOVAS C observer data structure.
virtual const Observer * copy () const
 Returns a newly allocated copy of this observer.
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_geocentric () const
 Checks if this observer can be cast to a GeocentricObserver.
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.
virtual std::string to_string () const
 Returns a string representation of this observer.
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().

Static Public Member Functions

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

 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

observer _observer = {}
 stored observer data
Protected Attributes inherited from supernovas::Validating
bool _valid = false
 the state variable.

Detailed Description

An abstract observer location.

Both Earth-bound (geodetic sites, airborne, or Earth-orbit), and locations elsewhere in the Solar-system are supported.

See also
Frame

Constructor & Destructor Documentation

◆ Observer()

◆ ~Observer()

virtual supernovas::Observer::~Observer ( )
inlinevirtual

Member Function Documentation

◆ _novas_observer()

const observer * supernovas::Observer::_novas_observer ( ) const

Returns the underlying NOVAS C observer data structure.

Returns
pointer to the underlying C observer data structure.

References _novas_observer(), and _observer.

Referenced by supernovas::Frame::Frame(), and _novas_observer().

◆ at_geocenter()

GeocentricObserver supernovas::Observer::at_geocenter ( )
static

Returns a fictitious observer placed at the location of the geocenter.

Returns
a new fictitious observer located at the geocenter.
See also
on_earth(), in_earth_orbit(), in_solar_system(), at_ssb()

References at_geocenter().

Referenced by at_geocenter().

◆ at_ssb()

SolarSystemObserver supernovas::Observer::at_ssb ( )
static

Returns a fictitious observer placed at the location of the Solar-System Barycenter (SSB).

Returns
a new fictitious observer located at the Solar-System Barycenter (SSB).
See also
in_solar_system(), at_geocenter(), on_earth(), in_earth_orbit()

References at_ssb().

Referenced by at_ssb().

◆ copy()

const Observer * supernovas::Observer::copy ( ) const
virtual

Returns a newly allocated copy of this observer.

The default implementation returns an invalid observer, but concrete subclasses should override that to return their onw copies.

Returns
a copy of this observer class, which may be an invalid observer (default).

Reimplemented in supernovas::GeocentricObserver, supernovas::GeodeticObserver, and supernovas::SolarSystemObserver.

References copy().

Referenced by copy(), and supernovas::Frame::operator=().

◆ in_earth_orbit()

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

Returns a new observer orbiting the Earth.

Parameters
posmomentary position of the observer relative to the geocenter.
velmomentary velocity of the observer relative to the geocenter.
Returns
a new observer instance for the observer in Earth orbit.
See also
on_earth(), in_solar_system(), at_geocenter(), at_ssb()

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

Referenced by in_earth_orbit().

◆ in_solar_system()

SolarSystemObserver supernovas::Observer::in_solar_system ( const Position & pos,
const Velocity & vel )
static

Returns a new observer in some Solar-system location.

Parameters
posmomentary position of the observer relative to the Solar-system Barycenter (SSB).
velmomentary velocity of the observer relative to the Solar-system Barycenter (SSB).
Returns
a new observer instance for the given Solar-system location.
See also
at_ssb(), at_geocenter(), on_earth(), in_earth_orbit()

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

Referenced by in_solar_system().

◆ is_geocentric()

bool supernovas::Observer::is_geocentric ( ) const
virtual

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 in supernovas::GeocentricObserver.

References is_geocentric().

Referenced by is_geocentric().

◆ is_geodetic()

bool supernovas::Observer::is_geodetic ( ) const
virtual

Checks if this observer can be cast to a GeodeticObserver.

Returns
true is this observer is an instance of GeodeticObserver, otherwise false.
See also
GeodeticObserver, is_geocentric()

Reimplemented in supernovas::GeodeticObserver.

References is_geodetic().

Referenced by supernovas::Frame::Frame(), supernovas::Source::horizontal_track(), and is_geodetic().

◆ moving_on_earth() [1/2]

GeodeticObserver supernovas::Observer::moving_on_earth ( const Site & site,
const EOP & eop,
const ScalarVelocity & horizontal,
const Angle & direction,
const ScalarVelocity & vertical = ScalarVelocity::stationary() )
static

Instantiates a new observer that is moving relative to Earth's surface, such as an airborne observer.

Parameters
sitethe momentary geodetic location of the observer.
eopEarth Orientation Parameters (EOP) appropriate around the time of observation.
horizontalmomentary horizontal speed of moving observer.
directionazimuthal direction of motion (from North, measured to the East).
vertical(optional) momentary vertical speed of observer (default: 0).
See also
Site::enu_to_itrf()

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

◆ moving_on_earth() [2/2]

GeodeticObserver supernovas::Observer::moving_on_earth ( const Site & geodetic,
const Velocity & itrs_vel,
const EOP & eop )
static

Returns a new observer that is moving, at some velocitym relative to Earth's surface, such as an airborne aircraft or balloon based observatory.

Parameters
geodeticthe momentary geodetic location of the observer.
itrs_velthe momentary velocity of the observer with respect to the surface (in ITRS).
eopEarth Orientation Parameters (EOP) appropriate around the time of observation, such as obtained from the IERS bulletins or data service.
Returns
a new observer instance for the given moving observer.
See also
on_earth(), in_earth_orbit(), in_solar_system(), at_geocenter(), at_ssb()

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

Referenced by moving_on_earth(), and moving_on_earth().

◆ on_earth()

GeodeticObserver supernovas::Observer::on_earth ( const Site & site,
const EOP & eop )
static

Returns a new observer located at a fixed observing site.

Parameters
sitethe observing site
eopEarth Orientation Parameters (EOP) appropriate the time of observation, such as obtained from the IERS bulletins or data service.
Returns
a new observer instance for the given observing site.
See also
moving_on_earth(), in_earth_orbit(), in_solar_system(), at_geocenter(), at_ssb()

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

Referenced by on_earth(), and supernovas::Site::to_observer().

◆ to_string()

std::string supernovas::Observer::to_string ( ) const
virtual

Returns a string representation of this observer.

I am salivating at the thought of it. Tell Benjami

Returns
a new string with a brief description of this observer.

Reimplemented in supernovas::GeocentricObserver, supernovas::GeodeticObserver, and supernovas::SolarSystemObserver.

References _observer, and to_string().

Referenced by to_string().

◆ type()

enum novas_observer_place supernovas::Observer::type ( ) const

Returns the observer type.

Returns
the observer type constant for this observer

References _observer, and type().

Referenced by Observer(), and type().

◆ undefined()

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

Returns a reference to a statically defined standard invalid observer.

This invalid observer may be used inside any object that is invalid itself.

Returns
a reference to a static standard invalid observer.

References undefined().

Referenced by supernovas::GeocentricObserver::GeocentricObserver(), supernovas::SolarSystemObserver::SolarSystemObserver(), and undefined().

Member Data Documentation

◆ _observer