|
VR-Engage
2.2
|
The DtCoordinateConvert class provides methods for converting positions, vectors, and orientations between different coordinate systems, including geocentric, topographic, UTM, and flat-earth coordinates. It also supports axis remapping and flipping to handle different coordinate system conventions.
#include <coordConverter.h>
Classes | |
| struct | DtCoordConvertInitData |
Public Types | |
| enum | AxisType { X , Y , Z } |
| enum | CoordinateType { FLATEARTH , TOPOGRAPHIC , UTM , GEOCENTRIC } |
Public Member Functions | |
| DtCoordinateConvert () | |
| virtual | ~DtCoordinateConvert () |
| virtual void | init (DtCoordConvertInitData data) |
| virtual void | init (DtInitTable &init) |
| virtual DtVector | toGeocPos (const DtVector &pos) const |
| virtual DtVector | toGeocVec (const DtVector &vec, const DtVector &localPos) const |
| virtual DtTaitBryan | toGeocOri (float heading, float pitch, float roll, const DtVector &localPos) const |
| virtual DtTaitBryan | toGeocOri (const DtTaitBryan &localOri, const DtVector &localPos) const |
| virtual DtVector | fromGeocPos (const DtVector &pos) const |
| virtual DtVector | fromGeocVec (const DtVector &geocVec, const DtVector &geocPos) const |
| virtual DtTaitBryan | fromGeocOri (const DtTaitBryan &geocOri, const DtVector &geocLoc) const |
| const DtGeodeticCoord & | origin () const |
Static Public Member Functions | |
| static double | calcHeading (DtVector geocLoc, DtTaitBryan geocOri) |
| static double | calcPitch (DtVector geocLoc, DtTaitBryan geocOri) |
| static double | calcRoll (DtVector geocLoc, DtTaitBryan geocOri) |
| static void | calcHeadingPitchRoll (DtVector geocLoc, DtTaitBryan geocOri, double &heading, double &pitch, double &roll) |
| static DtTaitBryan | calcTaitBryan (double heading, double pitch, double roll, DtVector geocLoc) |
Protected Member Functions | |
| DtVector | handleRemapping (const DtVector &vec, AxisType x, AxisType y, AxisType z) const |
| DtVector | handleFlipping (const DtVector &vec, bool x, bool y, bool z) const |
| double | convertToDouble (const std::string &str) const |
Protected Attributes | |
| CoordinateType | myCoordinateType |
| DtCoordTransform | myTopoTransform |
| DtCoordTransform | myInverseTopoTransform |
| DtUtmReferencePoint | myUtmReference |
| AxisType | myRemapX |
| AxisType | myRemapY |
| AxisType | myRemapZ |
| bool | myFlipX |
| bool | myFlipY |
| bool | myFlipZ |
| DtVector | myOffset |
| DtGeodeticCoord | myOrigin |
| makVre::DtCoordinateConvert::DtCoordinateConvert | ( | ) |
Default constructor.
Creates a coordinate converter with default settings (GEOCENTRIC coordinates)
|
virtual |
Virtual destructor.
|
virtual |
Initialize the converter with explicit settings.
| data | The initialization data structure containing converter settings |
Referenced by init().
|
virtual |
Initialize the converter from a configuration table.
| init | A Lua configuration table containing converter settings |
References init().
|
virtual |
Convert a position from local to geocentric coordinates.
| pos | The position in local coordinates |
|
virtual |
Convert a vector from local to geocentric coordinates.
| vec | The vector in local coordinates |
| localPos | The local position where the vector is applied |
|
virtual |
Convert an orientation from local heading/pitch/roll to geocentric orientation.
| heading | The heading (yaw) angle in radians |
| pitch | The pitch angle in radians |
| roll | The roll angle in radians |
| localPos | The local position associated with the orientation |
|
virtual |
Convert an orientation from local to geocentric coordinates.
| localOri | The orientation in local coordinates |
| localPos | The local position associated with the orientation |
|
virtual |
Convert a position from geocentric to local coordinates.
| pos | The position in geocentric coordinates |
|
virtual |
Convert a vector from geocentric to local coordinates.
| geocVec | The vector in geocentric coordinates |
| geocPos | The geocentric position where the vector is applied |
|
virtual |
Convert an orientation from geocentric to local coordinates.
| geocOri | The orientation in geocentric coordinates |
| geocLoc | The geocentric position associated with the orientation |
|
static |
Calculate heading from geocentric location and orientation.
| geocLoc | The geocentric location |
| geocOri | The geocentric orientation |
|
static |
Calculate pitch from geocentric location and orientation.
| geocLoc | The geocentric location |
| geocOri | The geocentric orientation |
|
static |
Calculate roll from geocentric location and orientation.
| geocLoc | The geocentric location |
| geocOri | The geocentric orientation |
|
static |
Calculate heading, pitch, and roll from geocentric location and orientation.
| geocLoc | The geocentric location | |
| geocOri | The geocentric orientation | |
| [out] | heading | The calculated heading angle in radians |
| [out] | pitch | The calculated pitch angle in radians |
| [out] | roll | The calculated roll angle in radians |
|
static |
Calculate Tait-Bryan orientation from heading, pitch, roll and geocentric location.
| heading | The heading angle in radians |
| pitch | The pitch angle in radians |
| roll | The roll angle in radians |
| geocLoc | The geocentric location |
| const DtGeodeticCoord & makVre::DtCoordinateConvert::origin | ( | ) | const |
returns the geodetic coordinate origin
|
protected |
Handle axis remapping for vector conversion.
| vec | The input vector |
| x | The axis to use for X |
| y | The axis to use for Y |
| z | The axis to use for Z |
|
protected |
Handle axis flipping for vector conversion.
| vec | The input vector |
| x | Whether to flip the X axis |
| y | Whether to flip the Y axis |
| z | Whether to flip the Z axis |
|
protected |
Convert a string to a double.
| str | The string to convert |
|
protected |
The current coordinate system type.
|
protected |
Transformation from topographic to geocentric coordinates.
|
protected |
Transformation from geocentric to topographic coordinates.
|
protected |
UTM reference point for UTM conversions.
|
protected |
The axis to use for X in remapping.
|
protected |
The axis to use for Y in remapping.
|
protected |
The axis to use for Z in remapping.
|
protected |
Whether to flip the X axis.
|
protected |
Whether to flip the Y axis.
|
protected |
Whether to flip the Z axis.
|
protected |
Offset to apply to coordinates.
|
protected |
Geodetic origin (lat, lon, alt)