![]() |
SuperNOVAS C++ API v1.6
High-precision C/C++ astrometry library
|
An Earth-based (geodetic) observer site location, or airborne observer location. More...
#include <supernovas.h>
Public Member Functions | |
| Site (const Angle &longitude, const Angle &latitude, const Coordinate &altitude=Coordinate::zero(), enum novas_reference_ellipsoid ellipsoid=NOVAS_GRS80_ELLIPSOID) | |
| Constructs a new observing site with the specified geodetic location on the reference ellipsoid of choice. | |
| Site (const Position &xyz) | |
| Instantiates a new observing site with the specified geocentric position vector. | |
| Site (const std::string &longitude, const std::string &latitude, const Coordinate &altitude=Coordinate::zero(), enum novas_reference_ellipsoid ellipsoid=NOVAS_GRS80_ELLIPSOID) | |
| Constructs a new observing site with the specified geodetic location on the reference ellipsoid of choice. | |
| Site (double longitude_rad, double latitude_rad, double altitude_m=0.0, enum novas_reference_ellipsoid ellipsoid=NOVAS_GRS80_ELLIPSOID) | |
| Instantiates a new observing site with the specified geodetic location on the reference ellipsoid of choice. | |
| const on_surface * | _on_surface () const |
| Returns a pointer to the the NOVAS C on_surface data structure stored in this site data. | |
| const Coordinate | altitude () const |
| Returns a new distance containing the altitude of this site above the GRS80 reference ellipsoid (ie, above sea level). | |
| Position | enu_to_itrs (const Position &p) const |
| Converts an East-Noth-Up (ENU) position vector at the site to an ITRF vector. | |
| Velocity | enu_to_itrs (const Velocity &p) const |
| Converts an East-Noth-Up (ENU) velocity vector at the site to an ITRF vector. | |
| bool | equals (const Site &site, const Coordinate &tol) const |
| Checks if this site is the same as another site, within the specified precision. | |
| bool | equals (const Site &site, double tol_m=1e-3) const |
| Checks if this site is the same as another site, within the specified precision. | |
| Site | itrf_transformed (int from_year, int to_year) const |
| Returns a new site transformed into a different ITRF realization. | |
| Position | itrs_to_enu (const Position &p) const |
| Converts an ITRF position vector to a local East-Noth-Up (ENU) vector at the site. | |
| Velocity | itrs_to_enu (const Velocity &p) const |
| Converts an ITRF velocity vector to a local East-Noth-Up (ENU) vector at the site. | |
| const Angle | latitude () const |
| Returns a new angle containing the geodetic latitude of this site on the GRS80 reference ellipsoid. | |
| const Angle | longitude () const |
| Returns a new angle containing the geodetic longitude of this site on the GRS80 reference ellipsoid. | |
| bool | operator!= (const Site &site) const |
| Checks if this site differs from another site, by more than 1 mm. | |
| bool | operator== (const Site &site) const |
| Checks if this site is the same as another site, within 1 mm. | |
| GeodeticObserver | to_observer (const EOP &eop) const |
| Returns an observer location for this observing site and the specified IERS Earth Orientation Parameters (EOP). | |
| std::string | to_string (enum novas_separator_type separator=NOVAS_SEP_UNITS_AND_SPACES, int decimals=3) const |
| Returns a string representation of this observing site. | |
| Position | xyz () const |
| Returns the geocentric position of this site in rectangular coordinates. | |
| 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 Site | from_GPS (const Angle &longitude, const Angle &latitude, const Coordinate &altitude=Coordinate::zero()) |
| Returns an observing site for its geodetic GPS location. | |
| static Site | from_GPS (const std::string &longitude, const std::string &latitude, const Coordinate &altitude=Coordinate::zero()) |
| Returns an observing site for its geodetic GPS location, with the longitude and latitude provided in decimal or DMS string representations. | |
| static Site | from_GPS (double longitude, double latitude, double altitude=0.0) |
| Returns an observing site for its geodetic GPS location. | |
| static const Site & | undefined () |
| Returns a reference to a statically allocated undefined observing site instance. | |
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. | |
An Earth-based (geodetic) observer site location, or airborne observer location.
Positions may be defined as GPS / WGS84 or else as ITRF / GRS80 geodetic locations, or as Cartesian geocentric xyz positions in the International Terrestrial Reference Frame (ITRF).
The class provides the means to convert between ITRF realizations, e.g. to match the ITRF realization used for the Eath Orientation Parameters (EOP) obtained from IERS, for μas precision. (This is really only necessary for VLBI interferometry). Alternatively, one may also transform the EOP values to match the ITRF realization of the site.
| supernovas::Site::Site | ( | double | longitude_rad, |
| double | latitude_rad, | ||
| double | altitude_m = 0.0, | ||
| enum novas_reference_ellipsoid | ellipsoid = NOVAS_GRS80_ELLIPSOID ) |
Instantiates a new observing site with the specified geodetic location on the reference ellipsoid of choice.
| longitude_rad | [rad] Observer's geodetic longitude |
| latitude_rad | [rad] Observer's geodetic latitude |
| altitude_m | [m] (optional) Observers's altitude above sea level (default: 0 m) |
| ellipsoid | (optional) reference ellipsoid to use (default: NOVAS_GRS80_ELLIPSOID) |
References supernovas::Validating::_valid, supernovas::Unit::deg, supernovas::Constant::half_pi, make_itrf_site(), novas_geodetic_transform_site(), NOVAS_GRS80_ELLIPSOID, and NOVAS_REFERENCE_ELLIPSOIDS.
| supernovas::Site::Site | ( | const Angle & | longitude, |
| const Angle & | latitude, | ||
| const Coordinate & | altitude = Coordinate::zero(), | ||
| enum novas_reference_ellipsoid | ellipsoid = NOVAS_GRS80_ELLIPSOID ) |
Constructs a new observing site with the specified geodetic location on the reference ellipsoid of choice.
| longitude | Observer's geodetic longitude |
| latitude | Observer's geodetic latitude |
| altitude | (optional) Observers's altitude above sea level (default: 0 m) |
| ellipsoid | (optional) reference ellipsoid to use (default: NOVAS_GRS80_ELLIPSOID) |
References altitude(), latitude(), and longitude().
| supernovas::Site::Site | ( | const std::string & | longitude, |
| const std::string & | latitude, | ||
| const Coordinate & | altitude = Coordinate::zero(), | ||
| enum novas_reference_ellipsoid | ellipsoid = NOVAS_GRS80_ELLIPSOID ) |
Constructs a new observing site with the specified geodetic location on the reference ellipsoid of choice.
| longitude | String represenration of observer's geodetic longitude, as DMS or decimal degrees. |
| latitude | String representation of observer's geodetic latitude, as DMS or decimal degrees. |
| altitude | (optional) Observers's altitude above sea level (default: 0 m) |
| ellipsoid | (optional) reference ellipsoid to use (default: NOVAS_GRS80_ELLIPSOID) |
References altitude(), latitude(), and longitude().
|
explicit |
Instantiates a new observing site with the specified geocentric position vector.
| xyz | Observers geocentric position vector in rectangular coordinates. |
References supernovas::Validating::_valid, novas_cartesian_to_geodetic(), NOVAS_GRS80_ELLIPSOID, and xyz().
| const on_surface * supernovas::Site::_on_surface | ( | ) | const |
Returns a pointer to the the NOVAS C on_surface data structure stored in this site data.
Referenced by supernovas::Observer::Observer(), and supernovas::Weather::guess().
| const Coordinate supernovas::Site::altitude | ( | ) | const |
Returns a new distance containing the altitude of this site above the GRS80 reference ellipsoid (ie, above sea level).
References supernovas::Validating::is_valid(), and supernovas::Unit::m.
Referenced by Site(), Site(), from_GPS(), from_GPS(), and from_GPS().
Converts an East-Noth-Up (ENU) position vector at the site to an ITRF vector.
| p | position vector in East-North-Up (ENU) directions at the site. |
References supernovas::Vector::_array(), supernovas::Validating::is_valid(), and novas_enu_to_itrs().
Converts an East-Noth-Up (ENU) velocity vector at the site to an ITRF vector.
| v | velocity vector in East-North-Up (ENU) directions at the site. |
References supernovas::Vector::_array(), supernovas::Validating::is_valid(), and novas_enu_to_itrs().
| bool supernovas::Site::equals | ( | const Site & | site, |
| const Coordinate & | tol ) const |
Checks if this site is the same as another site, within the specified precision.
| site | another site |
| tol | distance tolerance for equality (default: 1 mm). |
References equals(), and supernovas::Coordinate::m().
| bool supernovas::Site::equals | ( | const Site & | site, |
| double | tol_m = 1e-3 ) const |
Checks if this site is the same as another site, within the specified precision.
| site | another site |
| tol_m | [m] distance tolerance for equality (default: 1 mm). |
References supernovas::Position::equals(), and xyz().
Referenced by equals(), and operator==().
|
static |
Returns an observing site for its geodetic GPS location.
| longitude | GPS longitude angle (East positive) |
| latitude | GPS latitude angle |
| altitude | (optional) GPS altitude (default: 0 m) |
References altitude(), from_GPS(), latitude(), and longitude().
|
static |
Returns an observing site for its geodetic GPS location, with the longitude and latitude provided in decimal or DMS string representations.
| longitude | string representation of GPS longitude as DSM or decimal degrees. |
| latitude | string representation of GPS latitude as DSM or decimal degrees. |
| altitude | (optional) GPS altitude (default: 0 m) |
References altitude(), from_GPS(), latitude(), and longitude().
|
static |
Returns an observing site for its geodetic GPS location.
| longitude | [rad] GPS longitude (East positive) |
| latitude | [rad] GPS latitude |
| altitude | [m] (optional) GPS altitude (default: 0 m) |
References altitude(), supernovas::Validating::is_valid(), latitude(), longitude(), and NOVAS_WGS84_ELLIPSOID.
Referenced by from_GPS(), and from_GPS().
| Site supernovas::Site::itrf_transformed | ( | int | from_year, |
| int | to_year ) const |
Returns a new site transformed into a different ITRF realization.
The ITRF realizations are defined by a year. While it is best practice to use years with actual ITRF realizations, any year will be interpreted as to pick the last ITRF realization preceding it (or in case of years before thefirst ITRF realization, the initial ITR realizatio will be used).
| from_year | [yr] The original ITRF realization year of this site, e.g. 2008. |
| to_year | [yr] The ITRF realization year of the returned new Site, e.g. 2014. |
References supernovas::Unit::deg, novas_on_surface::height, supernovas::Validating::is_valid(), novas_on_surface::latitude, novas_on_surface::longitude, supernovas::Unit::m, and novas_itrf_transform_site().
Converts an ITRF position vector to a local East-Noth-Up (ENU) vector at the site.
| p | xyz position vector in ITRF. |
References supernovas::Vector::_array(), supernovas::Validating::is_valid(), and novas_itrs_to_enu().
Converts an ITRF velocity vector to a local East-Noth-Up (ENU) vector at the site.
| v | xyz velocity vector in ITRF. |
References supernovas::Vector::_array(), supernovas::Validating::is_valid(), and novas_itrs_to_enu().
| const Angle supernovas::Site::latitude | ( | ) | const |
Returns a new angle containing the geodetic latitude of this site on the GRS80 reference ellipsoid.
References supernovas::Unit::deg, and supernovas::Validating::is_valid().
Referenced by Site(), Site(), from_GPS(), from_GPS(), and from_GPS().
| const Angle supernovas::Site::longitude | ( | ) | const |
Returns a new angle containing the geodetic longitude of this site on the GRS80 reference ellipsoid.
References supernovas::Unit::deg, and supernovas::Validating::is_valid().
Referenced by Site(), Site(), from_GPS(), from_GPS(), from_GPS(), and supernovas::Time::lst().
| bool supernovas::Site::operator!= | ( | const Site & | site | ) | const |
Checks if this site differs from another site, by more than 1 mm.
| site | another site |
| bool supernovas::Site::operator== | ( | const Site & | site | ) | const |
Checks if this site is the same as another site, within 1 mm.
| site | another site |
References equals().
| GeodeticObserver supernovas::Site::to_observer | ( | const EOP & | eop | ) | const |
Returns an observer location for this observing site and the specified IERS Earth Orientation Parameters (EOP).
| eop | Earth Orientation Parameters (EOP) from IERS, for the same ITRF realization as this site (if μas precision is required). |
References supernovas::Validating::is_valid(), and supernovas::Observer::on_earth().
| std::string supernovas::Site::to_string | ( | enum novas_separator_type | separator = NOVAS_SEP_UNITS_AND_SPACES, |
| int | decimals = 3 ) const |
Returns a string representation of this observing site.
| separator | (optional) the separator to use for the representation of angles (default: NOVAS_SEP_UNITS_AND_SPACES). |
| decimals | (optional) the number of decimal places to print (default: 3). |
References supernovas::Unit::deg, and supernovas::Angle::to_string().
Referenced by supernovas::GeodeticObserver::to_string().
|
static |
Returns a reference to a statically allocated undefined observing site instance.
| Position supernovas::Site::xyz | ( | ) | const |
Returns the geocentric position of this site in rectangular coordinates.
References supernovas::Validating::is_valid(), novas_geodetic_to_cartesian(), and NOVAS_GRS80_ELLIPSOID.