Terrestrial Domain

Specification

The Terrestrial domain (tracktable::domain::terrestrial) concerns points on the surface of the Earth. These points are located using longitude and latitude. In Tracktable, longitude and latitude are always measured in degrees and longitude always comes first. We prefer to let longitude range from -180 to 180 but the underlying math doesn’t care.

Units

Position in the terrestrial domain is measured in degrees of longitude and latitude. Longitude is always coordinate 0 and latitude is always coordinate 1. Points are presumed to lie on the surface of the Earth. If you want to include altitude, use the user-defined properties.

Distances are measured in kilometers. Speeds are measured in kilometers per hour.

Module Contents

class TerrestrialPoint : public tracktable::PointLonLat

2D point on a sphere

This class represents a point on a sphere. Its coordinates are measured in degrees of longitude and latitude.

Distances between TerrestrialPoints are measured in kilometers. Speeds between two TerrestrialTrajectoryPoints will be measured in kilometers per hour.

Public Types

using Superclass = PointLonLat

Public Functions

TerrestrialPoint()

Create an uninitialized point.

TerrestrialPoint(TerrestrialPoint const &other)

Copy constructor: make this point like another.

TerrestrialPoint(TerrestrialPoint &&other)
TerrestrialPoint(Superclass const &other)

Copy constructor: use PointLonLat instances as if they were TerrestrialPoint instances.

~TerrestrialPoint()

Empty destructor - nothing to do here.

TerrestrialPoint &operator=(TerrestrialPoint const &other)

Explicitly delegate assignment to prevent compiler hijinks.

TerrestrialPoint &operator=(TerrestrialPoint &&other)
TerrestrialPoint(double _longitude, double _latitude)

Convenience constructor.

Parameters
  • [in] _longitude: Longitude in degrees

  • [in] _latitude: Latitude in degrees

template<class Archive>
void serialize(Archive &ar, const unsigned int)

Public Static Functions

static CartesianPoint3D ECEF_from_km(const coord_type _longitude, const coord_type _latitude, const double _altitude)

Returns ECEF values for lon, lat, and altitude.

Uses a km convention.

Note

this expects an altitude in km (not ft or m).

Return

3D Earth Centered, Earth Fixed point in km

class TerrestrialTrajectoryPoint : public tracktable::TrajectoryPoint<TerrestrialPoint>

Earth Centered Earth Fixed

This group of functions is useful for converting longitude and latitude to a cartesian point.

A static method is provided to convert any arbitrary point. ECEF_from_feet will be the most common use case. Multiple functions will throw an exception if altitude is not present. To bypass exception throws, use ECEF(ratio,altString) with the appropriate ratio to convert to km and the name of the property you are expecting to find altitude in.

See

TerrestrialPoint::ECEF

CartesianPoint3D ECEF() const

Returns ECEF values for lon/lat points.

Uses a km convention.

Note

this expects an altitude in km (not ft or m).

Return

3D Earth Centered, Earth Fixed point in km

CartesianPoint3D ECEF(const double ratio, const std::string &_altitudeString) const

Returns ECEF values for lon/lat points.

Uses a km convention.

Note

this expects an altitude in km (not ft or m). Change ratio if the altitude is not km

Return

3D Earth Centered, Earth Fixed point in km

Parameters
  • ratio: The value to multiply altitude by to get km

  • _altitudeString: The label of the property that contains altitude

Exceptions
  • PropertyDoesNotExist: if we can’t find altitude

CartesianPoint3D ECEF_from_feet(const std::string &_altitudeString = "altitude") const

Returns ECEF values for lon/lat points.

Uses a km convention.

Note

this expects an altitude in feet.

Return

3D Earth Centered, Earth Fixed point in km

Parameters
  • _altitudeString: The label of the property that contains altitude

Exceptions
  • PropertyDoesNotExist: if we can’t find altitude

CartesianPoint3D ECEF_from_meters(const std::string &_altitudeString = "altitude") const

Returns ECEF values for lon/lat points.

Uses a km convention.

Note

this expects an altitude in meters.

Return

3D Earth Centered, Earth Fixed point in km

Parameters
  • _altitudeString: The label of the property that contains altitude

Exceptions
  • PropertyDoesNotExist: if we can’t find altitude

Public Types

using Superclass = TrajectoryPoint<TerrestrialPoint>

Public Functions

TerrestrialTrajectoryPoint()

Create an uninitialized point.

TerrestrialTrajectoryPoint(TerrestrialTrajectoryPoint const &other)

Copy constructor: make this point like another.

TerrestrialTrajectoryPoint(TerrestrialTrajectoryPoint &&other)
TerrestrialTrajectoryPoint(Superclass const &other)

Copy constructor: use superclass as self.

~TerrestrialTrajectoryPoint()

Empty destructor: nothing to do here.

TerrestrialTrajectoryPoint &operator=(TerrestrialTrajectoryPoint const &other)

Explicitly delegate assignment to prevent compiler hijinks.

TerrestrialTrajectoryPoint &operator=(TerrestrialTrajectoryPoint &&other)
TerrestrialTrajectoryPoint(double _longitude, double _latitude)

Convenience constructor.

Parameters
  • [in] _longitude: Longitude in degrees

  • [in] _latitude: Latitude in degrees

Private Functions

template<class Archive>
void serialize(Archive &ar, const unsigned int)