template class ugcs::vsm::Position¶
Overview¶
Immutable position in a specified coordinates system. More…
#include <coordinates.h> template <class Datum> class Position { public: // typedefs typedef Datum Datum_type; // fields static constexpr double ECCENTRICITY_SQUARED =(2 - Datum::FLATTENING)* Datum::FLATTENING; // construction Position(Geodetic_tuple tuple); Position(Cartesian_tuple tuple); // methods Geodetic_tuple Get_geodetic() const; Cartesian_tuple Get_ecef() const; double Lat_meter() const; double Long_meter() const; double Bearing(const Position& target); double Earth_radius() const; double Distance(const Position& pos) const; };
Detailed Documentation¶
Immutable position in a specified coordinates system.
Typedefs¶
typedef Datum Datum_type
Associated datum.
Fields¶
static constexpr double ECCENTRICITY_SQUARED =(2 - Datum::FLATTENING)* Datum::FLATTENING
Square of eccentricity of the reference ellipsoid.
Construction¶
Position(Geodetic_tuple tuple)
Construct position from geodetic coordinates.
Position(Cartesian_tuple tuple)
Construct position from ECEF coordinates.
Methods¶
Geodetic_tuple Get_geodetic() const
Get representation in geodetic coordinates.
Cartesian_tuple Get_ecef() const
Get representation in ECEF coordinates - Earth-centered Earth-fixed CS, ((x) axis points from the Earth center to the intersection of zero parallel and zero (International Reference) meridian; (z) axis points towards the International Reference Pole; (x, y, z) form right-hand reference frame.
double Lat_meter() const
One meter expressed in latitude radians.
double Long_meter() const
One meter expressed in longitude radians.
double Bearing(const Position& target)
Get bearing in radians to the target.
double Earth_radius() const
The Earth’s mean radius of curvature (averaging over all directions) at a latitude of the position.
double Distance(const Position& pos) const
Calculate the surface (altitude is not taken into account) distance in meters between this and given positions using spherical law of cosines formula and mean Earth radius of curvature between these points.