MOOS 0.2375
|
Implements simple geodesy calculations. More...
#include <MOOSGeodesy.h>
Classes | |
class | CEllipsoid |
Public Member Functions | |
CMOOSGeodesy () | |
virtual | ~CMOOSGeodesy () |
double | GetOriginNorthing () |
double | GetOriginEasting () |
bool | LatLong2LocalUTM (double lat, double lon, double &MetersNorth, double &MetersEast) |
bool | LocalGrid2LatLong (double dfEast, double dfNorth, double &dfLat, double &dfLon) |
bool | UTM2LatLong (double dfX, double dfY, double &dfLat, double &dfLong) |
char * | GetUTMZone () |
int | GetRefEllipsoid () |
double | GetMetersEast () |
double | GetMetersNorth () |
double | GetOriginLatitude () |
double | GetOriginLongitude () |
bool | Initialise (double lat, double lon) |
double | GetLocalGridY () |
double | GetLocalGridX () |
bool | LatLong2LocalGrid (double lat, double lon, double &MetersNorth, double &MetersEast) |
double | DMS2DecDeg (double dfVal) |
Implements simple geodesy calculations.
Definition at line 52 of file MOOSGeodesy.h.
CMOOSGeodesy::CMOOSGeodesy | ( | ) |
Definition at line 62 of file MOOSGeodesy.cpp.
CMOOSGeodesy::~CMOOSGeodesy | ( | ) | [virtual] |
Definition at line 86 of file MOOSGeodesy.cpp.
double CMOOSGeodesy::DMS2DecDeg | ( | double | dfVal | ) |
Definition at line 390 of file MOOSGeodesy.cpp.
double CMOOSGeodesy::GetLocalGridX | ( | ) |
Definition at line 444 of file MOOSGeodesy.cpp.
double CMOOSGeodesy::GetLocalGridY | ( | ) |
Definition at line 449 of file MOOSGeodesy.cpp.
double CMOOSGeodesy::GetMetersEast | ( | ) |
Definition at line 161 of file MOOSGeodesy.cpp.
double CMOOSGeodesy::GetMetersNorth | ( | ) |
Definition at line 156 of file MOOSGeodesy.cpp.
double CMOOSGeodesy::GetOriginEasting | ( | ) |
Definition at line 380 of file MOOSGeodesy.cpp.
double CMOOSGeodesy::GetOriginLatitude | ( | ) |
Definition at line 140 of file MOOSGeodesy.cpp.
double CMOOSGeodesy::GetOriginLongitude | ( | ) |
Definition at line 135 of file MOOSGeodesy.cpp.
double CMOOSGeodesy::GetOriginNorthing | ( | ) |
Definition at line 385 of file MOOSGeodesy.cpp.
int CMOOSGeodesy::GetRefEllipsoid | ( | ) |
Definition at line 291 of file MOOSGeodesy.cpp.
char * CMOOSGeodesy::GetUTMZone | ( | ) |
Definition at line 307 of file MOOSGeodesy.cpp.
bool CMOOSGeodesy::Initialise | ( | double | lat, |
double | lon | ||
) |
This method is called to set the Origins of the Coordinate system being used by the vehicle for a mission. This class will store the vehicle's position in Northings and Eastings. This allows for tracking the vehicle as if it were operating on a grid.
lat | the Latitude of where the vehicle is as it begins a mission |
lon | the Longitude of where the vehicle is as it begins a mission |
Definition at line 104 of file MOOSGeodesy.cpp.
bool CMOOSGeodesy::LatLong2LocalGrid | ( | double | lat, |
double | lon, | ||
double & | MetersNorth, | ||
double & | MetersEast | ||
) |
Definition at line 401 of file MOOSGeodesy.cpp.
bool CMOOSGeodesy::LatLong2LocalUTM | ( | double | lat, |
double | lon, | ||
double & | MetersNorth, | ||
double & | MetersEast | ||
) |
This method is the interface to this class and allows the client to query the amount of ground covered with respect to the origin where the origin is defined as a point in the UTM grid where we got an initial GPS fix that we defined to be the origin. What this method does not take into account is the curvature of the reference ellipsoid at a particular Lat/Lon value. Curvature influences the deltaX and deltaY that this method calculates for determining the overall distance traveled wrt the origin. Therefore, at Lat/Lon values that are significantly far enough (~300km) away from the origin of the UTM grid (0,0), a shift in one dimension, i.e. just along Latitude, or just along Longitude, does not map to a corresponding one dimensional shift in our "local" grid where we should be seeing just a deltaX or deltaY result in moving in only one direction. Instead, we have observed that moving just .0001 degrees in Longitude (~1m in local) results in both a deltaX that is coupled to a deltaY.
lat | The current Latitude the vehicle is at |
lon | The current Longitude the vehicle is at |
MetersNorth | The distance in meters traveled North wrt to Origin |
MetersEast | The distance in meters traveled East wrt to Origin |
Definition at line 334 of file MOOSGeodesy.cpp.
bool CMOOSGeodesy::LocalGrid2LatLong | ( | double | dfEast, |
double | dfNorth, | ||
double & | dfLat, | ||
double & | dfLon | ||
) |
Utility method for converting from a local grid fix to the global Lat, Lon pair. This method will work for small grid approximations - <300km sq
dfEast | The current local grid distance in meters traveled East (X dir) wrt to Origin |
dfNorth | The current local grid distance in meters traveled North (Y dir) wrt to Origin |
dfLat | the calculated latitude out |
dfLon | the calculated longitude out |
Definition at line 464 of file MOOSGeodesy.cpp.
bool CMOOSGeodesy::UTM2LatLong | ( | double | dfX, |
double | dfY, | ||
double & | dfLat, | ||
double & | dfLong | ||
) |
Definition at line 489 of file MOOSGeodesy.cpp.