LRAUV  revA
Wgs84 Class Reference

Provides Datum information, for only WGS84. More...

#include <Datum.h>

Static Public Member Functions

static long UtmToLatLon (const double northings, const double eastings, const unsigned int zone, const bool northernHemi, double &lat, double &lon)
 Converts a UTM and zone to lat/lon (in radians!). More...
 
static long LatLonToUtm (const double lat, const double lon, double &northings, double &eastings, unsigned int &zone, bool &northernHemi)
 Converts a lat and lon (in radians!) to northings/eastings/zone. More...
 
static const char * UtmErrorToString (long error)
 

Private Member Functions

 Wgs84 ()
 

Detailed Description

Provides Datum information, for only WGS84.

Derived from constants calculated on: http://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.HTM

Modified to match: http://home.hiwaay.net/~taylorc/toolbox/geography/geoutm.html as the above uwgb.edu link had some transcription errors

Some code also taken from: http://www.koders.com/cpp/fid56D52408FAC344874E65BF9A1C54F3731C96A39B.aspx From his notation eqRadius_ = a, polRadius_ = b All in meters.

Constructor & Destructor Documentation

Wgs84::Wgs84 ( )
inlineprivate

Member Function Documentation

static long Wgs84::LatLonToUtm ( const double  lat,
const double  lon,
double &  northings,
double &  eastings,
unsigned int &  zone,
bool &  northernHemi 
)
inlinestatic

Converts a lat and lon (in radians!) to northings/eastings/zone.

This function complies with the standard UTM zone system.

Referenced by ExternalSim::initialize(), Datum_Test::testLatLonToUtm(), and Datum_Test::testUtmToLatLon().

static const char* Wgs84::UtmErrorToString ( long  error)
inlinestatic
static long Wgs84::UtmToLatLon ( const double  northings,
const double  eastings,
const unsigned int  zone,
const bool  northernHemi,
double &  lat,
double &  lon 
)
inlinestatic

Converts a UTM and zone to lat/lon (in radians!).

This function complies with the standard UTM zone system.

Operates on corrected eastings (i.e. e=500,000 is on the center meridian of the zone)

Referenced by Datum_Test::testLatLonToUtm(), and Datum_Test::testUtmToLatLon().


The documentation for this class was generated from the following file: