VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtUtmCoordinateConverter.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2007 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /*********************************************************************
6 ** $RCSfile: DtUtmCoordinateConverter.h,v $ $Revision: 1.13 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DtUtmCoordinateConverter_H_
13 #define DtUtmCoordinateConverter_H_
14 
16 
17 namespace makVrv
18 {
19 
24 {
25 public:
26 
29 
31  virtual ~DtUtmCoordinateConverter();
32 
34  virtual DtCoordinateConverter* clone() const;
35 
40  virtual void init(double lat, double lon, long zone = 0, int useStandardOffsets = 0);
41 
46  virtual void init(double lat, double lon, double z, long zone = 0, int useStandardOffsets = 0);
47 
51  virtual void init(const DtGeodeticCoord& origin, long zone = 0, int useStandardOffsets = 0);
52 
56  virtual void init(const DtDegMinSec& lat, const DtDegMinSec& lon, long zone = 0, int useStandardOffsets = 0);
57 
61  virtual void init(const DtDegMinSec& lat, const DtDegMinSec& lon, double z, long zone = 0, int useStandardOffsets = 0);
62 
66  virtual void init(long zone, char hemisphere = 'N', bool useMpiDefaultOrigin = true);
67 
71  virtual void init(double falseOriginX, double falseOriginY, double falseOriginZ,
72  long zone, char hemisphere = 'N', bool useMpiDefaultOrigin = true);
73 
79  virtual bool init(const std::string& originstring);
80 
82  virtual std::string stringRep();
83 
86  virtual const DtGeodeticCoord& origin() const;
87 
89  virtual bool useStandardOffsets() const;
90 
92  virtual long zone() const;
93  virtual void setZone(long zone);
94 
96  virtual DtDegMinSec latRef() const;
97  virtual DtDegMinSec longRef() const;
98 
99  /********************* Conversions *****************************/
101  virtual void geocToCig(const DtVector& geoc, DtVector& out) const;
102 
103  virtual DtUtmReferencePoint* referencePoint() const;
104 
106  virtual void cigToGeoc(const DtVector& in, DtVector& geoc) const;
107 
108  virtual void setupTopoFrame(const DtVector& truth);
109 
110 protected:
111 
114  std::string parseUtm( const DtDegMinSec& lat, const DtDegMinSec& lng, bool bUseStandardOffsets, long zone );
115 
116 public:
117 
118  static DtCoordinateConverter* create();
119  static double calculateUtmLongitudeOrigin(double zone, bool useMpiDefaultOrigin = true);
120 
121  static void calculateUtmLatLonOrigin(double zone, double falseOriginX, double falseOriginY,
122  double& latitude, double& longitude, bool useMpiDefaultOrigin = true);
123 
124  static int utmGridZoneFromLatLon( double latitudeInDegrees, double longitudeInDegrees );
125 
126  // Useful functions for dealing with vrlink Utm Ref Point routines that use DtDegMinSec
127  static void setLatDtDegMinSecFromDegrees(DtDegMinSec& dmslat, double deg);
128  static void setLonDtDegMinSecFromDegrees(DtDegMinSec& dmslon, double deg);
129 
130  // Get a utm reference point initialized to the zone center and equator for specified
131  // geodetic coordinates.
132  static void initUtmReferencePointForZone( double longitude, bool standardOffsets,
133  const DtMapDatum& datum, DtUtmReferencePoint& refToInitialized );
134 
135  // returns the zone's central meridian, in degrees
136  static double utmZoneToCentralMeridian( int zone );
137 
138 protected:
139 
140  // Used by setLatDtDegMinSecFromDegrees and setLonDtDegMinSecFromDegrees
141  static void setDtDegMinSecFromDegrees(DtDegMinSec& dms, double deg);
142 
143 
144 private:
145 
148 
150  DtUtmCoordinateConverter& operator=(const DtUtmCoordinateConverter& orig);
151 
152 protected:
153 
154  mutable DtUtmReferencePoint myReferencePoint;
155 
157 };
158 
159 }
160 
161 #endif
Instances of DtUtmCoordSystem provide transformations and utilities for converting between network an...
Definition: DtUtmCoordinateConverter.h:23
#define DT_DLL_VRVUTIL
Definition: vrvUtil.h:34
DtCoordinateConverter is the base class for 'local (cig) to geocentric' converters.
Definition: DtCoordinateConverter.h:25
voidpf uLong int origin
Definition: ioapi.h:42
DT_DLL_terrainCS void setLonDtDegMinSecFromDegrees(DtDegMinSec &dms, double deg)
DtUtmReferencePoint myReferencePoint
Definition: DtUtmCoordinateConverter.h:154
DT_DLL_terrainCS void setDtDegMinSecFromDegrees(DtDegMinSec &dms, double deg)
DT_DLL_terrainCS void setLatDtDegMinSecFromDegrees(DtDegMinSec &dms, double deg)
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
bool myUseStandardOffsets
Definition: DtUtmCoordinateConverter.h:156

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)