Routines for WGS-84 coordinate manipulation.
|
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) |
|
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] | n | North offset (m). |
[in] | e | East offset (m). |
[in] | d | Down offset (m). |
[in,out] | lat | reference latitude on entry, displaced latitude on exit (rad). |
[in,out] | lon | reference longitude entry, displaced longitude on exit (rad). |
[in,out] | hae | reference 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 , 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 |
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] | lat1 | WGS-84 latitude of first coordinate (rad). |
[in] | lon1 | WGS-84 longitude of first coordinate (rad). |
[in] | hae1 | height above WGS-84 ellipsoid of first coordinate (m). |
[in] | lat2 | WGS-84 latitude of second coordinate (rad). |
[in] | lon2 | WGS-84 longitude of second coordinate (rad). |
[in] | hae2 | height above WGS-84 ellipsoid of second coordinate (m). |
- Returns
- distance between the two coordinates (m).
Referenced by DUNE::Navigation::StreamEstimator::consume().