VR-Forces 4.6 Class Documentation
 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) 2004 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();
37 
38  // assignment operator
40 
41  // Clone operator
42  virtual Coordinate_System* clone() const;
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;
48  virtual void local2dis(const DtVector& in, DtVector& out) const;
49 
50  virtual DtVector down(const DtVector& location) const;
51  virtual void topoToLocal(const DtVector& localPosition, DtDcm& topoToLocal) const;
52  virtual void localToTopo(const DtVector& localPosition, DtDcm& localToTopo) const;
53 
54  // Returns the geodetic coordinate for a given local position.
55  virtual void localToGeodetic(const DtVector& localPosition,
56  DtGeodeticCoord& geodeticPosition) const;
57 
58  // Returns the local coordinate for a given geodetic position.
59  virtual void geodeticToLocal(const DtGeodeticCoord& geodeticPosition,
60  DtVector& localPosition) const;
61 
62  virtual void initFromLatLon(double latRadians, double lonRadians);
63 
64  virtual void init();
65 
66  // Returns name of coordinate system
67  virtual DtString coordinateSystemName() const;
68  virtual void setOrigin(const DtGeodeticCoord& c);
69 
70  // Override as UTM grid declination calculations should not be used for this
71  virtual DtDcm topoToUtmMatrix(const DtVector& geocLoc) const;
72  virtual DtDcm utmToTopoMatrix(const DtVector& geocLoc) const;
73 
74 protected:
75  double myRefLatitude;
77 
78 public:
79  // Radius of the earth used in the Multigen Flat Earth projection.
80  // (defined to be 6366707.02 meters).
81  // This value was taken from the SRM_EOR_MFE enumerant in the
82  // SRM_Ellipsoid_Of_Revolution table on the SEDRIS web site
83  // (www.sedris.org).
84  static const double theMultigenFlatEarthRadius;
85 };
86 
87 #endif

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)