VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
coordUtils.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2024 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvUtil/vrvUtil.h>
13 #include <vrvUtil/DtQuat.h>
14 #include <matrix/vlVector.h>
15 #include <matrix/vlDcm.h>
16 #include <matrix/vlTaitBryan.h>
17 #include <matrix/geodeticCoord.h>
18 
19 class DtTaitBryan;
20 class DtDcm;
21 class DtDegMinSec;
22 
23 namespace makVrv
24 {
25  class DtCoordinateConverter;
26  class DtCoordinateSystem;
27 
28  DT_DLL_VRVUTIL DtTaitBryan orientUp( DtCoordinateConverter& converter,
29  const DtVector& position, const DtTaitBryan& orientation );
30 
31  DT_DLL_VRVUTIL DtDcm orientUpDcm( DtCoordinateConverter& converter,
32  const DtVector& position, const DtTaitBryan& orientation );
33 
35 
39  DT_DLL_VRVUTIL DtQuat DtOrientToVector( DtCoordinateConverter& converter,
40  const DtVector& start, const DtVector& end );
41 
44  DtCoordinateConverter& converter, const DtVector& localLocation,
45  const DtVector& dirVec );
47 
51  DtCoordinateConverter& converter, const DtTaitBryan& cigOri);
52 
54  DT_DLL_VRVUTIL DtTaitBryan DtEastNorthUpToNorthEastDown( const DtTaitBryan& tbIn );
65  DT_DLL_VRVUTIL DtTaitBryan DtNorthEastDownToEastNorthUp( const DtTaitBryan& tbIn );
66  DT_DLL_VRVUTIL DtTaitBryan DtXFrontZDownToYFrontZUp( const DtTaitBryan& tbIn );
67  DT_DLL_VRVUTIL DtTaitBryan DtYFrontZUpToXFrontZDown( const DtTaitBryan& tbIn );
68  DT_DLL_VRVUTIL DtDcm DtEastNorthUpToNorthEastDown( const DtDcm& dcmIn );
69  DT_DLL_VRVUTIL DtDcm DtNorthEastDownToEastNorthUp( const DtDcm& dcmIn );
70  DT_DLL_VRVUTIL DtDcm DtXFrontZDownToYFrontZUp( const DtDcm& dcmIn );
71  DT_DLL_VRVUTIL DtDcm DtYFrontZUpToXFrontZDown( const DtDcm& dcmIn );
73  DT_DLL_VRVUTIL DtDcm DtSwapDcmAxes( const DtDcm& dcmIn );
75  DT_DLL_VRVUTIL DtTaitBryan DtSwapTaitBryanAxes( const DtTaitBryan& tbIn );
77 
79  DT_DLL_VRVUTIL DtGeodeticCoord DtLocalToGeodetic( const DtVector& localLocation,
81  const DtCoordinateSystem& coordSystem );
82  DT_DLL_VRVUTIL DtVector DtGeodeticToLocal( const DtGeodeticCoord& geodeticLocation,
83  const DtCoordinateSystem& coordSystem );
85 
86  DT_DLL_VRVUTIL DtTaitBryan DtGetTopographicOrientation(const DtVector& geocLocation, const DtTaitBryan& _geocOrientation);
87  DT_DLL_VRVUTIL double DtGetTopographicHeading(const DtVector& geocLocation, const DtTaitBryan& geocOrientation);
88  DT_DLL_VRVUTIL double DtGetTopographicPitch(const DtVector& geocLocation, const DtTaitBryan& geocOrientation);
89  DT_DLL_VRVUTIL double DtGetTopographicRoll(const DtVector& geocLocation, const DtTaitBryan& geocOrientation);
90 
92  {
93  public:
98  static DtVector findCenter(const std::vector<DtVector>& vertexList);
99 
101  static void pack(const double pos[3], float pospack[4]);
102 
104  static void unpack(const float pospack[4], double pos[3]);
105 
108  static float closestSegmentPointToTestPoint(const DtVector& start, const DtVector& end, const DtVector& testPoint, DtVector& result);
109 
111  static void setLatDtDegMinSecFromDegrees(DtDegMinSec &dmslat, double deg);
112 
114  static void setLonDtDegMinSecFromDegrees(DtDegMinSec &dmslon, double deg);
115 
118  static void utmToGeodetic(int zone, bool isNorth, double easting, double northing, DtGeodeticCoord& result);
119 
120  protected:
123  static void setDtDegMinSecFromDegrees(DtDegMinSec &dms, double deg);
124 
125  };
126 }
127 
128 
DT_DLL_VRVUTIL DtGeodeticCoord DtLocalToGeodetic(const DtVector &localLocation, const DtCoordinateSystem &coordSystem)
Convert between local and geodetic locations.
DT_DLL_VRVUTIL double DtGetTopographicPitch(const DtVector &geocLocation, const DtTaitBryan &geocOrientation)
#define DT_DLL_VRVUTIL
Definition: vrvUtil.h:34
Definition: coordUtils.h:91
DT_DLL_VRVUTIL DtTaitBryan orientUp(DtCoordinateConverter &converter, const DtVector &position, const DtTaitBryan &orientation)
DT_DLL_VRVUTIL double DtGetTopographicHeading(const DtVector &geocLocation, const DtTaitBryan &geocOrientation)
DT_DLL_VRVUTIL DtDcm DtSwapDcmAxes(const DtDcm &dcmIn)
All DCM versions above call this.
DT_DLL_VRVUTIL DtTaitBryan DtXFrontZDownToYFrontZUp(const DtTaitBryan &tbIn)
These are all the same method (escept for the different input / return types The DCM (Direction Cosin...
DT_DLL_VRVUTIL DtTaitBryan DtGetTopographicOrientation(const DtVector &geocLocation, const DtTaitBryan &_geocOrientation)
DT_DLL_terrainCS void setLonDtDegMinSecFromDegrees(DtDegMinSec &dms, double deg)
Contains DLL export macros.
DT_DLL_VRVUTIL DtTaitBryan DtNorthEastDownToEastNorthUp(const DtTaitBryan &tbIn)
These are all the same method (escept for the different input / return types The DCM (Direction Cosin...
DT_DLL_VRVUTIL DtTaitBryan DtYFrontZUpToXFrontZDown(const DtTaitBryan &tbIn)
These are all the same method (escept for the different input / return types The DCM (Direction Cosin...
DT_DLL_terrainCS void setDtDegMinSecFromDegrees(DtDegMinSec &dms, double deg)
DT_DLL_terrainCS void setLatDtDegMinSecFromDegrees(DtDegMinSec &dms, double deg)
DT_DLL_VRVUTIL DtVector DtGeodeticToLocal(const DtGeodeticCoord &geodeticLocation, const DtCoordinateSystem &coordSystem)
Convert between local and geodetic locations.
Contains makVrv::DtQuat class.
DT_DLL_VRVUTIL DtQuat DtOrientToDirectionVector(DtCoordinateConverter &converter, const DtVector &localLocation, const DtVector &dirVec)
This form uses the local location and normalized direction vector provided.
DT_DLL_VRVUTIL DtQuat DtOrientToVector(DtCoordinateConverter &converter, const DtVector &start, const DtVector &end)
DtOrientToVector returns a quaternion that represents a rotation in the direction of the vector...
DT_DLL_VRVUTIL DtTaitBryan DtEastNorthUpToNorthEastDown(const DtTaitBryan &tbIn)
These are all the same method (escept for the different input / return types The DCM (Direction Cosin...
DT_DLL_VRVUTIL double DtGetTopographicRoll(const DtVector &geocLocation, const DtTaitBryan &geocOrientation)
DT_DLL_VRVUTIL DtTaitBryan DtGetLevelOrientation(DtCoordinateConverter &converter, const DtTaitBryan &cigOri)
Take an euler rotation (in local coordinates) and remove any pitch/roll components.
DT_DLL_VRVUTIL DtTaitBryan DtSwapTaitBryanAxes(const DtTaitBryan &tbIn)
All TaitBryan versions above call this.
DT_DLL_VRVUTIL DtDcm orientUpDcm(DtCoordinateConverter &converter, const DtVector &position, const DtTaitBryan &orientation)

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)