VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
flatEarthCS.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2025 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: flatEarthCrdSys.h,v $ $Revision: 1.14 $ $State: Exp $
7 *********************************************************************/
8 #ifndef flatEarthCS_H_
9 #define flatEarthCS_H_
10 
11 //
12 // \file flatEarthCrdSys.h Contains the flat earth coordinate system class declaration.
13 //
14 
16 #include "terrainCS/coordSystem.h"
17 
18 //
19 // Instances of DtFlatEarthCS are used by the terrain objects
20 // for performing coordinate conversions from geocentric to flat earth.
22 {
23 public:
24  // constructor
25  DtFlatEarthCS(double refLatitude,
26  double refLongitude, bool setUseDynamicSceneOrigin = false,
27  double dynamicSceneOriginDeadband = 0.0);
28 
29  DtFlatEarthCS(bool setUseDynamicSceneOrigin = false,
30  double dynamicSceneOriginDeadband = 0.0);
31 
32  // copy constructor
33  DtFlatEarthCS(const DtFlatEarthCS& orig);
34 
35  // destructor
36  virtual ~DtFlatEarthCS() override;
37 
38  // assignment operator
40 
41  // Clone operator
42  virtual Coordinate_System *clone() const override;
43 
44  // coordinates in the local (i.e., projected) coordinate system only
45  // consist of X and Y, but we use a three element vector to store them so a
46  // programmer can use the Z value for height above terrain.
47  virtual void dis2local(const DtVector &in, DtVector &out) const override;
48  virtual void local2dis(const DtVector &in, DtVector &out) const override;
49 
50  virtual DtVector down(const DtVector &location) const override;
51  virtual void topoToLocal(const DtVector &localPosition,
52  DtDcm &topoToLocal) const override;
53  virtual void localToTopo(const DtVector &localPosition,
54  DtDcm &localToTopo) const override;
55 
56  // Returns the geodetic coordinate for a given local position.
57  virtual void localToGeodetic(const DtVector &localPosition,
58  DtGeodeticCoord &geodeticPosition) const override;
59 
60  // Returns the local coordinate for a given geodetic position.
61  virtual void geodeticToLocal(const DtGeodeticCoord &geodeticPosition,
62  DtVector &localPosition) const override;
63 
64  virtual void initFromLatLon(double latRadians, double lonRadians);
65 
66  virtual void init();
67 
68  // Returns name of coordinate system
69  virtual DtString coordinateSystemName() const override;
70  virtual void setOrigin(const DtGeodeticCoord &c) override;
71 
72  // Override as UTM grid declination calculations should not be used for this
73  virtual DtDcm topoToUtmMatrix(const DtVector& geocLoc) const;
74  virtual DtDcm utmToTopoMatrix(const DtVector& geocLoc) const;
75 
76 protected:
77  double myRefLatitude;
79 
80 public:
81  // Radius of the earth used in the Multigen Flat Earth projection.
82  // (defined to be 6366707.02 meters).
83  // This value was taken from the SRM_EOR_MFE enumerant in the
84  // SRM_Ellipsoid_Of_Revolution table on the SEDRIS web site
85  // (www.sedris.org).
86  static const double theMultigenFlatEarthRadius;
87 };
88 
89 #endif
Definition: flatEarthCS.h:21
virtual void setOrigin(const DtGeodeticCoord &)
double myRefLatitude
Definition: flatEarthCS.h:77
virtual void localToTopo(const DtVector &localPosition, DtDcm &localToTopo) const
Definition: coordSystem.h:54
virtual void local2dis(const DtVector &in, DtVector &out) const
virtual void dis2local(const DtVector &in, DtVector &out) const
virtual void topoToLocal(const DtVector &localPosition, DtDcm &topoToLocal) const
Coordinate_System & operator=(const Coordinate_System &orig)
virtual void geodeticToLocal(const DtGeodeticCoord &geodeticPosition, DtVector &localPosition) const
virtual DtVector down(const DtVector &localPosition) const
virtual Coordinate_System * clone() const
static const double theMultigenFlatEarthRadius
Definition: flatEarthCS.h:86
double myRefLongitude
Definition: flatEarthCS.h:78
virtual void localToGeodetic(const DtVector &localPosition, DtGeodeticCoord &geodeticPosition) const
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
virtual DtString coordinateSystemName() const
#define DT_DLL_terrainCS
Definition: terrainCSDefines.h:23

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)