dotnet/NETGeographicLib/Ellipsoid.cpp
Go to the documentation of this file.
1 
11 #include "stdafx.h"
13 #include "Ellipsoid.h"
14 #include "NETGeographicLib.h"
15 
16 using namespace NETGeographicLib;
17 
18 const char BADALLOC[] = "Failed to allocate memory for a GeographicLib::Ellipsoid";
19 
20 //*****************************************************************************
22 {
23  if ( m_pEllipsoid != NULL )
24  {
25  delete m_pEllipsoid;
26  m_pEllipsoid = NULL;
27  }
28 }
29 
30 //*****************************************************************************
32 {
33  try
34  {
36  }
37  catch ( std::bad_alloc )
38  {
39  throw gcnew GeographicErr( BADALLOC );
40  }
41 }
42 
43 //*****************************************************************************
44 Ellipsoid::Ellipsoid(double a, double f)
45 {
46  try
47  {
49  }
50  catch ( std::bad_alloc err )
51  {
52  throw gcnew GeographicErr( BADALLOC );
53  }
54  catch ( const std::exception& err )
55  {
56  throw gcnew GeographicErr( err.what() );
57  }
58 }
59 
60 //*****************************************************************************
62 {
63  return m_pEllipsoid->ParametricLatitude( phi );
64 }
65 
66 //*****************************************************************************
68 {
70 }
71 
72 //*****************************************************************************
74 {
75  return m_pEllipsoid->GeocentricLatitude( phi );
76 }
77 
78 //*****************************************************************************
80 {
81  return m_pEllipsoid->InverseGeocentricLatitude( theta );
82 }
83 
84 //*****************************************************************************
86 {
87  return m_pEllipsoid->RectifyingLatitude( phi );
88 }
89 
90 //*****************************************************************************
92 {
94 }
95 
96 //*****************************************************************************
97 double Ellipsoid::AuthalicLatitude(double phi)
98 {
99  return m_pEllipsoid->AuthalicLatitude( phi );
100 }
101 
102 //*****************************************************************************
104 {
106 }
107 
108 //*****************************************************************************
110 {
111  return m_pEllipsoid->ConformalLatitude( phi );
112 }
113 
114 //*****************************************************************************
116 {
117  return m_pEllipsoid->InverseConformalLatitude( chi );
118 }
119 
120 //*****************************************************************************
122 {
123  return m_pEllipsoid->IsometricLatitude( phi );
124 }
125 
126 //*****************************************************************************
128 {
129  return m_pEllipsoid->InverseIsometricLatitude( psi );
130 }
131 
132 //*****************************************************************************
133 double Ellipsoid::CircleRadius(double phi)
134 {
135  return m_pEllipsoid->CircleRadius( phi );
136 }
137 
138 //*****************************************************************************
139 double Ellipsoid::CircleHeight(double phi)
140 {
141  return m_pEllipsoid->CircleHeight( phi );
142 }
143 
144 //*****************************************************************************
145 double Ellipsoid::MeridianDistance(double phi)
146 {
147  return m_pEllipsoid->MeridianDistance( phi );
148 }
149 
150 //*****************************************************************************
152 {
154 }
155 
156 //*****************************************************************************
158 {
160 }
161 
162 //*****************************************************************************
163 double Ellipsoid::NormalCurvatureRadius(double phi, double azi)
164 {
165  return m_pEllipsoid->NormalCurvatureRadius( phi, azi );
166 }
167 
168 //*****************************************************************************
170 {
172 }
173 
174 //*****************************************************************************
176 {
178 }
179 
180 //*****************************************************************************
182 {
184 }
185 
186 //*****************************************************************************
188 {
190 }
191 
192 //*****************************************************************************
194 {
196 }
197 
198 //*****************************************************************************
200 {
202 }
203 
204 //*****************************************************************************
206 {
208 }
209 
210 //*****************************************************************************
212 {
214 }
215 
216 //*****************************************************************************
218 {
220 }
221 
222 //*****************************************************************************
224 {
226 }
227 
228 //*****************************************************************************
230 { return m_pEllipsoid->MajorRadius(); }
231 
232 //*****************************************************************************
234 { return m_pEllipsoid->MinorRadius(); }
235 
236 //*****************************************************************************
238 { return m_pEllipsoid->QuarterMeridian(); }
239 
240 //*****************************************************************************
241 double Ellipsoid::Area::get()
242 { return m_pEllipsoid->Area(); }
243 
244 //*****************************************************************************
245 double Ellipsoid::Volume::get()
246 { return m_pEllipsoid->Volume(); }
247 
248 //*****************************************************************************
250 { return m_pEllipsoid->Flattening(); }
251 
252 //*****************************************************************************
254 { return m_pEllipsoid->SecondFlattening(); }
255 
256 //*****************************************************************************
258 { return m_pEllipsoid->ThirdFlattening(); }
259 
260 //*****************************************************************************
262 { return m_pEllipsoid->EccentricitySq(); }
263 
264 //*****************************************************************************
266 { return m_pEllipsoid->SecondEccentricitySq(); }
267 
268 //*****************************************************************************
270 { return m_pEllipsoid->ThirdEccentricitySq(); }
Math::real InverseAuthalicLatitude(real xi) const
Math::real MeridianDistance(real phi) const
Header for NETGeographicLib::NETGeographicLib objects.
static double SecondEccentricitySqToFlattening(double ep2)
Math::real EccentricitySq() const
Definition: Ellipsoid.hpp:142
Exception class for NETGeographicLib.
Math::real IsometricLatitude(real phi) const
Math::real ConformalLatitude(real phi) const
double mu
static Math::real SecondFlatteningToFlattening(real fp)
Definition: Ellipsoid.hpp:416
Math::real Volume() const
Definition: Ellipsoid.hpp:106
Math::real InverseRectifyingLatitude(real mu) const
Math::real InverseParametricLatitude(real beta) const
int n
Math::real SecondEccentricitySq() const
Definition: Ellipsoid.hpp:150
Math::real CircleRadius(real phi) const
const char BADALLOC[]
static double ThirdEccentricitySqToFlattening(double epp2)
Math::real Area() const
Math::real NormalCurvatureRadius(real phi, real azi) const
Math::real QuarterMeridian() const
Math::real GeocentricLatitude(real phi) const
static Math::real FlatteningToEccentricitySq(real f)
Definition: Ellipsoid.hpp:472
double NormalCurvatureRadius(double phi, double azi)
Math::real Flattening() const
Definition: Ellipsoid.hpp:120
static Math::real ThirdEccentricitySqToFlattening(real epp2)
Definition: Ellipsoid.hpp:508
static Math::real ThirdFlatteningToFlattening(real n)
Definition: Ellipsoid.hpp:437
static double FlatteningToSecondEccentricitySq(double f)
GeographicLib::Ellipsoid * m_pEllipsoid
Definition: Ellipsoid.h:51
Math::real SecondFlattening() const
Definition: Ellipsoid.hpp:127
Math::real InverseGeocentricLatitude(real theta) const
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Math::real ParametricLatitude(real phi) const
static Math::real FlatteningToThirdEccentricitySq(real f)
Definition: Ellipsoid.hpp:522
static Math::real SecondEccentricitySqToFlattening(real ep2)
Definition: Ellipsoid.hpp:484
Math::real InverseIsometricLatitude(real psi) const
#define NULL
Definition: ccolamd.c:609
Math::real TransverseCurvatureRadius(real phi) const
Header for GeographicLib::Ellipsoid class.
Math::real RectifyingLatitude(real phi) const
Vector xi
Definition: testPose2.cpp:148
Properties of an ellipsoid.
Definition: Ellipsoid.hpp:39
static Math::real FlatteningToThirdFlattening(real f)
Definition: Ellipsoid.hpp:448
Math::real MajorRadius() const
Definition: Ellipsoid.hpp:80
Math::real ThirdFlattening() const
Definition: Ellipsoid.hpp:134
Math::real InverseConformalLatitude(real chi) const
.NET wrapper for GeographicLib::Ellipsoid.
Definition: Ellipsoid.h:47
static Math::real EccentricitySqToFlattening(real e2)
Definition: Ellipsoid.hpp:460
Math::real AuthalicLatitude(real phi) const
static Math::real FlatteningToSecondFlattening(real f)
Definition: Ellipsoid.hpp:426
static const Ellipsoid & WGS84()
Math::real MeridionalCurvatureRadius(real phi) const
Container::iterator get(Container &c, Position position)
static Math::real FlatteningToSecondEccentricitySq(real f)
Definition: Ellipsoid.hpp:496
Math::real ThirdEccentricitySq() const
Definition: Ellipsoid.hpp:159
Math::real MinorRadius() const
Definition: Ellipsoid.hpp:85
Header for NETGeographicLib::Ellipsoid class.
Math::real CircleHeight(real phi) const


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:34:12