VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lambertConformalCS.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2005 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: lamConfCrdSys.h,v $ $Revision: 1.15 $ $State: Exp $
7 *********************************************************************/
8 #ifndef lambertConformalCS_H_
9 #define lambertConformalCS_H_
10 
11 //
12 // \file lamConfCrdSys.h
13 // \brief Contains the lambert conformal coordinate system class declaration.
14 //
16 #include "terrainCS/utmCS.h"
17 
18 // Derived class for converting between DIS (geocentric) and
19 // coordinates in a Lambert Conformal projection.
20 //
21 // Before instantiating this class, you must call DtUseMapDatum
22 // to specify which shape for the earth you want to use.
23 //
24 // \note This class does not support dynamic scene origin
26 {
27 public:
28 
29  // The values passed to the constructor (all in radians) are:
30  // lambda0 - longitude east of Greenwich of the central meridian of the map
31  // phi0 - middle latitude
32  // phi1, phi2 - standard parallels of latitude
33  DtLambertConformalCS(double passedLambda0, double passedPhi0,
34  double passedPhi1, double passedPhi2);
35 
36  // Need this for FILE* based constructor in derived class.
38 
40 
41  // Destructor
42  virtual ~DtLambertConformalCS();
43 
44  // Assignment operator
46  const DtLambertConformalCS& orig);
47 
48  // Clone operator
49  virtual Coordinate_System* clone() const;
50 
51  // Coordinates in the local (i.e., projected) coordinate system only
52  // consist of X and Y, but we use a three element vector to store them so a
53  // programmer can use the Z value for height above terrain.
54  virtual void dis2local(const DtVector& in, DtVector& out) const;
55  virtual void local2dis(const DtVector& in, DtVector& out) const;
56 
57  // Returns name of coordinate system
58  virtual DtString coordinateSystemName() const;
59 
60  double getPhi1() const;
61  double getPhi2() const;
62 
63  virtual bool isSameCS(const Coordinate_System* CSystem) const;
64 
65  // Override as UTM grid declination calculations should not be used for this
66  virtual DtDcm topoToUtmMatrix(const DtVector& geocLoc) const;
67  virtual DtDcm utmToTopoMatrix(const DtVector& geocLoc) const;
68 
69 protected:
70  // The projection requires:
71 
72  // Semi-major axis of the ellipsoid of reference
73  double a;
74 
75  // Semi-minor axis of the ellipsoid of reference
76  double b;
77 
78  // Eccentricity of the ellipsoid (1 - b^2/a^2)^ (1/2)
79  double e;
80 
81  // Middle latitude
82  double phi0;
83 
84  // Standard parallels of latitude
85  double phi1;
86  double phi2;
87 
88  // Longitude east of Greenwich of the central meridian of the map
89  double lambda0;
90 
91  // Intermediate parameters that don't rely on phi and lambda
92  double n;
93  double F;
94  double p0;
95 
96  // The forward and inverse coordinate transformations share several
97  // intermediate variables which are further based on lower level
98  // parameters. The low level and intermediate variables are not based on
99  // the lat/lon being transformed. They only rely on the reference
100  // ellipsoid, central meridian, middle and standard parallels. Since they
101  // are not dependent on the lat/long being translated, they need only be
102  // computed once. Based on Map Projections: A Working Manual by Snyder, the
103  // parameters can be divided thusly: low level parameters are m1, m2, t0,
104  // t1 and t2. They are only used to compute the intermediate
105  // parameters. intermediate parameters are n, F and p0 are the same for both
106  // forward and inverse computations t and p are different for forward and
107  // inverse computations. To prevent the repetition of code, a function is
108  // provided to compute intermediate parameters.
109 
110  void computeIntermediateParameters(double* n,double* F,double* p0);
111 };
112 
113 inline double DtLambertConformalCS::getPhi1() const
114 {
115  return phi1;
116 }
117 
118 inline double DtLambertConformalCS::getPhi2() const
119 {
120  return phi2;
121 }
122 
123 #endif

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)