DUNE: Uniform Navigational Environment  2016.03.0
DUNE::Coordinates::WGS84 Class Reference

Detailed Description

Routines for WGS-84 coordinate manipulation.

Static Public Member Functions

template<typename Ta , typename Tb >
static Ta distance (Ta lat1, Ta lon1, Tb hae1, Ta lat2, Ta lon2, Tb hae2)
 
template<typename Ta , typename Tb , typename Tc , typename Td , typename Te >
static void displacement (Ta rlat, Ta rlon, Tb rhae, Tc lat, Tc lon, Td hae, Te *n, Te *e, Te *d=NULL)
 
template<typename Ta , typename Tb , typename Tc , typename Td >
static void displace (Ta n, Ta e, Tb d, Tc *lat, Tc *lon, Td *hae)
 
template<typename Ta , typename Tb >
static void displace (Ta n, Ta e, Tb *lat, Tb *lon)
 
template<typename Ta , typename Tb >
static void getNEBearingAndRange (Ta lat1, Ta lon1, Ta lat2, Ta lon2, Tb *bearing, Tb *range)
 
template<typename Ta , typename Tb , typename Tc >
static void getAzimuthAndElevation (Ta lat1, Ta lon1, Tb hei1, Ta lat2, Ta lon2, Tb hei2, Tc *azimuth, Tc *elevation)
 

Member Function Documentation

template<typename Ta , typename Tb , typename Tc , typename Td >
static void DUNE::Coordinates::WGS84::displace ( Ta  n,
Ta  e,
Tb  d,
Tc *  lat,
Tc *  lon,
Td *  hae 
)
inlinestatic

Displace a geodetic coordinate in the NED frame according to given offsets.

Parameters
[in]nNorth offset (m).
[in]eEast offset (m).
[in]dDown offset (m).
[in,out]latreference latitude on entry, displaced latitude on exit (rad).
[in,out]lonreference longitude entry, displaced longitude on exit (rad).
[in,out]haereference height on entry, displaced height on exit (rad).

Referenced by DUNE::Maneuvers::VehicleFormation::consume(), DUNE::Maneuvers::FollowTrajectory::desiredPath(), DUNE::Maneuvers::VehicleFormation::desiredPath(), displace(), DUNE::Parsers::PlanConfigParser::parseCoordinate(), and DUNE::Coordinates::toWGS84().

template<typename Ta , typename Tb >
static void DUNE::Coordinates::WGS84::displace ( Ta  n,
Ta  e,
Tb *  lat,
Tb *  lon 
)
inlinestatic

Displace a WGS-84 coordinate in the NED frame according to given offsets.

Parameters
[in]nNorth offset (m).
[in]eEast offset (m).
[in,out]latreference latitude on entry, displaced latitude on exit (rad).
[in,out]lonreference longitude entry, displaced longitude on exit (rad).

References displace().

template<typename Ta , typename Tb , typename Tc , typename Td , typename Te >
static void DUNE::Coordinates::WGS84::displacement ( Ta  rlat,
Ta  rlon,
Tb  rhae,
Tc  lat,
Tc  lon,
Td  hae,
Te *  n,
Te *  e,
Te *  d = NULL 
)
inlinestatic

Compute North-East-Down displacement between two WGS-84 coordinates.

Parameters
[in]rlatreference WGS-84 latitude (rad).
[in]rlonreference WGS-84 longitude (rad).
[in]rhaereference WGS-84 coordinate height (m).
[in]latOffset coordinate WGS-84 latitude (rad).
[in]lonOffset coordinate WGS-84 longitude (rad).
[in]haeOffset coordinate height (m).
[out]nstorage for North offset (x-coordinate in NED referential).
[out]estorage for East offset (y-coordinate in NED referential).
[out]dstorage for Down offset (z-coordinate in NED referential).

Referenced by DUNE::Navigation::StreamEstimator::consume(), DUNE::Navigation::BasicNavigation::consume(), getNEBearingAndRange(), DUNE::Maneuvers::VehicleFormation::toLocalCoordinates(), and DUNE::Navigation::BasicTransponder::update().

template<typename Ta , typename Tb >
static Ta DUNE::Coordinates::WGS84::distance ( Ta  lat1,
Ta  lon1,
Tb  hae1,
Ta  lat2,
Ta  lon2,
Tb  hae2 
)
inlinestatic

Calculate distance between two WGS-84 coordinates.

Basically, a ECEF conversion of both WGS-84 coordinates is done then the ECEF distance is returned.

Note
This is the standard way of doing it and that NE distance is a different measure.
Parameters
[in]lat1WGS-84 latitude of first coordinate (rad).
[in]lon1WGS-84 longitude of first coordinate (rad).
[in]hae1height above WGS-84 ellipsoid of first coordinate (m).
[in]lat2WGS-84 latitude of second coordinate (rad).
[in]lon2WGS-84 longitude of second coordinate (rad).
[in]hae2height above WGS-84 ellipsoid of second coordinate (m).
Returns
distance between the two coordinates (m).

Referenced by DUNE::Navigation::StreamEstimator::consume().

template<typename Ta , typename Tb , typename Tc >
static void DUNE::Coordinates::WGS84::getAzimuthAndElevation ( Ta  lat1,
Ta  lon1,
Tb  hei1,
Ta  lat2,
Ta  lon2,
Tb  hei2,
Tc *  azimuth,
Tc *  elevation 
)
inlinestatic

Get angles of Azimuth and Elevation between two latitude/longitude/height coordinates.

Parameters
[in]lat1WGS-84 latitude of first coordinate (rad).
[in]lon1WGS-84 longitude of first coordinate (rad).
[in]hei1WGS-84 height of first coordinate (m).
[in]lat2WGS-84 latitude of second coordinate (rad).
[in]lon2WGS-84 longitude of second coordinate (rad).
[in]hei2WGS-84 height of second coordinate (m).
[in,out]azimuthazimuth angle (rad).
[in,out]elevationelevation angle (rad).

References getNEBearingAndRange().

template<typename Ta , typename Tb >
static void DUNE::Coordinates::WGS84::getNEBearingAndRange ( Ta  lat1,
Ta  lon1,
Ta  lat2,
Ta  lon2,
Tb *  bearing,
Tb *  range 
)
inlinestatic

Get North-East bearing and range between two latitude/longitude coordinates.

Parameters
[in]lat1WGS-84 latitude of first coordinate (rad).
[in]lon1WGS-84 longitude of first coordinate (rad).
[in]lat2WGS-84 latitude of second coordinate (rad).
[in]lon2WGS-84 longitude of second coordinate (rad).
[in,out]bearingbearing (rad).
[in,out]rangerange (m).

References displacement().

Referenced by getAzimuthAndElevation().

Collaboration diagram for DUNE::Coordinates::WGS84:
Collaboration graph