![]() |
VR-Link API Documentation for HLA 1516
|
Instances of this class are used to store a particular mapDatum and perform useful calculations based on this map – specifically it can be used to convert between geodetic and geocentric coordinates using the given reference ellipsoid (which is defined by a DtMapDatum). More...
Collaboration diagram for DtReferenceEllipsoid:Public Member Functions | |
| DtReferenceEllipsoid (const DtMapDatum &datum) | |
| virtual | ~DtReferenceEllipsoid () |
| void | useMapDatum (const DtMapDatum &datum) |
| const DtMapDatum & | mapDatum () const |
| void | geocentricToGeodetic (const DtVector &gc, DtVector &gd) const |
| void | geodeticToGeocentric (const DtVector &gd, DtVector &gc) const |
Static Public Member Functions | |
| static void | setMaxIterationsForConvergence (unsigned int maxItr) |
| sets the maximum number of iterations to preform when converting from geocentric to geodetic. More... | |
| static unsigned int | maxIterationsForConvergence () |
| Returns the maximum number of iterations used in geocentric_to_geodetic(). More... | |
| static void | setThrowExceptionOnConversionFrom0Geocentric (bool enable) |
| Call to cause an exception to be thrown when an attempt is made to convert a 0,0,0 geocentric coordinate to geodetic. More... | |
| static void | setNotifyConversionFrom0Geocentric (bool enable) |
| Set the notification that a 0,0,0 coordinate was called. More... | |
| static void | setNotifyOnceConversionFrom0Geocentric (bool enableNotifyOnce) |
| Set the notification that a 0,0,0 coordinate was called only once. More... | |
Protected Member Functions | |
| void | initialize_ellipsoid (double a, double f) |
| void | geo_to_rad (double deg, double min, double sec, double *radian) const |
| void | rad_to_geo (double radian, double *deg, double *min, double *sec) const |
| void | geodetic_to_geocentric (double lat, double lon, double height, double *x, double *y, double *z) const |
| void | geocentric_to_geodetic (double xp, double yp, double zp, double *lat, double *lon, double *height) const |
| Performs the transformation between geocentric and geodetic coordinate systems. More... | |
Protected Attributes | |
| DtMapDatum | myMapDatum |
| int | myInited |
| double | ellipse_a |
| double | ellipse_a_sq |
| equatorial radius More... | |
| double | ellipse_f |
| radius squared More... | |
| double | ellipse_b |
| flattening (a-b)/a More... | |
| double | ellipse_b_sq |
| polar semi-diameter More... | |
| double | ellipse_a_sq_over_b |
| polar semi-diameter squared More... | |
| double | ellipse_e |
| a*a/b More... | |
| double | ellipse_c1 |
| ellipticity 2f-f*f More... | |
Static Protected Attributes | |
| static unsigned int | theMaxIterationsForConvergence |
| static bool | theThrowExceptionOnConversionFrom0Geocentric |
| static bool | theNotifyOnConversionFrom0Geocentric |
| static bool | theNotifyOnceOnConversionFrom0Geocentric |
Instances of this class are used to store a particular mapDatum and perform useful calculations based on this map – specifically it can be used to convert between geodetic and geocentric coordinates using the given reference ellipsoid (which is defined by a DtMapDatum).
By default, VR-Link creates a global ellipsoid object that is used for geodetic coordinates conversions. However, users can choose to define and maintain their own ellipsoids and then can explicitly pass the ellipsoid to a geodetic coordinate.
Conversions between geocentric and geodetic coordinates depend on the particular MapDatum used. The default is DtWGS84, but you can set the current global MapDatum using DtUseMapDatum . See mapDatum.h for more details
| DtReferenceEllipsoid::DtReferenceEllipsoid | ( | const DtMapDatum & | datum | ) |
|
virtual |
|
protected |
|
protected |
Performs the transformation between geocentric and geodetic coordinate systems.
This routine receives geocentric coordinates (X, Y, Z) in meters and converts it into geodetic coordinates given in latitude, longitude, and height. This algorithm uses Newton- Raphson's convergence algorithm, and will stop iteration at values less than 50 cm. Will also stop iteration when maxIteractionsForConvergence is reached.
| DtException | when maximum iterations reached. |
|
protected |
| const DtMapDatum& DtReferenceEllipsoid::mapDatum | ( | ) | const |
|
static |
Returns the maximum number of iterations used in geocentric_to_geodetic().
|
protected |
|
static |
sets the maximum number of iterations to preform when converting from geocentric to geodetic.
This is used by the geocentric_to_geodetic() function. The default value is 5000.
|
static |
Set the notification that a 0,0,0 coordinate was called.
By default, it is on. This should not be disabled unless you know what you are doing.
|
static |
Set the notification that a 0,0,0 coordinate was called only once.
By default, it will notify every time. Default is false.
|
static |
Call to cause an exception to be thrown when an attempt is made to convert a 0,0,0 geocentric coordinate to geodetic.
Should only be enabled to debug the source of such errors.
| void DtReferenceEllipsoid::useMapDatum | ( | const DtMapDatum & | datum | ) |
|
protected |
|
protected |
equatorial radius
|
protected |
polar semi-diameter squared
|
protected |
flattening (a-b)/a
|
protected |
polar semi-diameter
|
protected |
ellipticity 2f-f*f
|
protected |
a*a/b
|
protected |
radius squared
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |