dotnet/NETGeographicLib/GravityCircle.cpp
Go to the documentation of this file.
1 
11 #include "stdafx.h"
13 #include "GravityModel.h"
14 #include "GravityCircle.h"
15 #include "NETGeographicLib.h"
16 
17 using namespace NETGeographicLib;
18 
19 //*****************************************************************************
21 {
22  if ( m_pGravityCircle != NULL )
23  {
24  delete m_pGravityCircle;
25  m_pGravityCircle = NULL;
26  }
27 }
28 
29 //*****************************************************************************
31 {
32  try
33  {
35  }
36  catch ( std::bad_alloc )
37  {
38  throw gcnew GeographicErr( "Failed to allocate memory for a GeographicLib::GravityCircle" );
39  }
40 }
41 
42 //*****************************************************************************
44  [System::Runtime::InteropServices::Out] double% gx,
45  [System::Runtime::InteropServices::Out] double% gy,
46  [System::Runtime::InteropServices::Out] double% gz)
47 {
48  double lgx, lgy, lgz;
49  double out = m_pGravityCircle->Gravity( lon, lgx, lgy, lgz );
50  gx = lgx;
51  gy = lgy;
52  gz = lgz;
53  return out;
54 }
55 
56 //*****************************************************************************
58  [System::Runtime::InteropServices::Out] double% deltax,
59  [System::Runtime::InteropServices::Out] double% deltay,
60  [System::Runtime::InteropServices::Out] double% deltaz)
61 {
62  double ldeltax, ldeltay, ldeltaz;
63  double out = m_pGravityCircle->Disturbance( lon, ldeltax, ldeltay, ldeltaz );
64  deltax = ldeltax;
65  deltay = ldeltay;
66  deltaz = ldeltaz;
67  return out;
68 }
69 
70 //*****************************************************************************
72 {
73  return m_pGravityCircle->GeoidHeight( lon );
74 }
75 
76 //*****************************************************************************
78  [System::Runtime::InteropServices::Out] double% Dg01,
79  [System::Runtime::InteropServices::Out] double% xi,
80  [System::Runtime::InteropServices::Out] double% eta)
81 {
82  double lDg01, lxi, leta;
83  m_pGravityCircle->SphericalAnomaly( lon, lDg01, lxi, leta );
84  Dg01 = lDg01;
85  xi = lxi;
86  eta = leta;
87 }
88 
89 //*****************************************************************************
90 double GravityCircle::W(double lon,
91  [System::Runtime::InteropServices::Out] double% gX,
92  [System::Runtime::InteropServices::Out] double% gY,
93  [System::Runtime::InteropServices::Out] double% gZ)
94 {
95  double lgx, lgy, lgz;
96  double out = m_pGravityCircle->W( lon, lgx, lgy, lgz );
97  gX = lgx;
98  gY = lgy;
99  gZ = lgz;
100  return out;
101 }
102 
103 //*****************************************************************************
104 double GravityCircle::V(double lon,
105  [System::Runtime::InteropServices::Out] double% GX,
106  [System::Runtime::InteropServices::Out] double% GY,
107  [System::Runtime::InteropServices::Out] double% GZ)
108 {
109  double lgx, lgy, lgz;
110  double out = m_pGravityCircle->V( lon, lgx, lgy, lgz );
111  GX = lgx;
112  GY = lgy;
113  GZ = lgz;
114  return out;
115 }
116 
117 //*****************************************************************************
118 double GravityCircle::T(double lon,
119  [System::Runtime::InteropServices::Out] double% deltaX,
120  [System::Runtime::InteropServices::Out] double% deltaY,
121  [System::Runtime::InteropServices::Out] double% deltaZ)
122 {
123  double lgx, lgy, lgz;
124  double out = m_pGravityCircle->T( lon, lgx, lgy, lgz );
125  deltaX = lgx;
126  deltaY = lgy;
127  deltaZ = lgz;
128  return out;
129 }
130 
131 //*****************************************************************************
132 double GravityCircle::T(double lon)
133 {
134  return m_pGravityCircle->T( lon );
135 }
136 
137 //*****************************************************************************
139 {
140  if ( m_pGravityCircle->Init() )
141  return m_pGravityCircle->MajorRadius();
142  throw gcnew GeographicErr("GravityCircle::MajorRadius failed because the GravityCircle is not initialized.");
143 }
144 
145 //*****************************************************************************
147 {
148  if ( m_pGravityCircle->Init() )
149  return m_pGravityCircle->Flattening();
150  throw gcnew GeographicErr("GravityCircle::Flattening failed because the GravityCircle is not initialized.");
151 }
152 
153 //*****************************************************************************
155 {
156  if ( m_pGravityCircle->Init() )
157  return m_pGravityCircle->Latitude();
158  throw gcnew GeographicErr("GravityCircle::Latitude failed because the GravityCircle is not initialized.");
159 }
160 
161 //*****************************************************************************
163 {
164  if ( m_pGravityCircle->Init() )
165  return m_pGravityCircle->Height();
166  throw gcnew GeographicErr("GravityCircle::Height failed because the GravityCircle is not initialized.");
167 }
168 
169 //*****************************************************************************
170 bool GravityCircle::Init::get() { return m_pGravityCircle->Init(); }
171 
172 //*****************************************************************************
174 { return static_cast<GravityModel::Mask>(m_pGravityCircle->Capabilities()); }
175 
176 //*****************************************************************************
178 { return m_pGravityCircle->Capabilities( (unsigned int)testcaps ); }
GeographicLib::GravityCircle::V
Math::real V(real slam, real clam, real &gX, real &gY, real &gZ) const
Definition: src/GravityCircle.cpp:78
GeographicLib::GravityCircle::W
Math::real W(real slam, real clam, real &gX, real &gY, real &gZ) const
Definition: src/GravityCircle.cpp:70
NETGeographicLib::GravityCircle::Disturbance
double Disturbance(double lon, [System::Runtime::InteropServices::Out] double% deltax, [System::Runtime::InteropServices::Out] double% deltay, [System::Runtime::InteropServices::Out] double% deltaz)
Definition: dotnet/NETGeographicLib/GravityCircle.cpp:57
GeographicLib::GravityCircle
Gravity on a circle of latitude.
Definition: GravityCircle.hpp:41
NETGeographicLib::GravityCircle
.NET wrapper for GeographicLib::GravityCircle.
Definition: GravityCircle.h:45
screwPose2::xi
Vector xi
Definition: testPose2.cpp:148
NETGeographicLib::GravityModel::Mask
Mask
Definition: GravityModel.h:109
GeographicLib::GravityCircle::SphericalAnomaly
void SphericalAnomaly(real lon, real &Dg01, real &xi, real &eta) const
Definition: src/GravityCircle.cpp:49
NETGeographicLib::GravityCircle::V
double V(double lon, [System::Runtime::InteropServices::Out] double% GX, [System::Runtime::InteropServices::Out] double% GY, [System::Runtime::InteropServices::Out] double% GZ)
Definition: dotnet/NETGeographicLib/GravityCircle.cpp:104
NETGeographicLib::GravityCircle::SphericalAnomaly
void SphericalAnomaly(double lon, [System::Runtime::InteropServices::Out] double% Dg01, [System::Runtime::InteropServices::Out] double% xi, [System::Runtime::InteropServices::Out] double% eta)
Definition: dotnet/NETGeographicLib/GravityCircle.cpp:77
GravityModel.h
Header for NETGeographicLib::GravityModel class.
NETGeographicLib::GeographicErr
Exception class for NETGeographicLib.
Definition: NETGeographicLib.h:132
GeographicLib::GravityCircle::GeoidHeight
Math::real GeoidHeight(real lon) const
Definition: src/GravityCircle.cpp:39
NETGeographicLib::GravityCircle::Capabilities
GravityModel::Mask Capabilities()
Definition: dotnet/NETGeographicLib/GravityCircle.cpp:173
NETGeographicLib::GravityCircle::m_pGravityCircle
const GeographicLib::GravityCircle * m_pGravityCircle
Definition: GravityCircle.h:49
GravityCircle.hpp
Header for GeographicLib::GravityCircle class.
NETGeographicLib::GravityCircle::W
double W(double lon, [System::Runtime::InteropServices::Out] double% gX, [System::Runtime::InteropServices::Out] double% gY, [System::Runtime::InteropServices::Out] double% gZ)
Definition: dotnet/NETGeographicLib/GravityCircle.cpp:90
NETGeographicLib::GravityCircle::T
double T(double lon, [System::Runtime::InteropServices::Out] double% deltaX, [System::Runtime::InteropServices::Out] double% deltaY, [System::Runtime::InteropServices::Out] double% deltaZ)
Definition: dotnet/NETGeographicLib/GravityCircle.cpp:118
stdafx.h
NETGeographicLib.h
Header for NETGeographicLib::NETGeographicLib objects.
out
std::ofstream out("Result.txt")
GeographicLib::GravityCircle::Gravity
Math::real Gravity(real lon, real &gx, real &gy, real &gz) const
Definition: src/GravityCircle.cpp:19
different_sigmas::gc
const auto gc
Definition: testHybridBayesNet.cpp:231
GravityCircle.h
Header for NETGeographicLib::GravityCircle class.
GeographicLib::GravityCircle::T
Math::real T(real lon, real &deltaX, real &deltaY, real &deltaZ) const
Definition: GravityCircle.hpp:228
GeographicLib::GravityCircle::Disturbance
Math::real Disturbance(real lon, real &deltax, real &deltay, real &deltaz) const
Definition: src/GravityCircle.cpp:29
NETGeographicLib::GravityCircle::Gravity
double Gravity(double lon, [System::Runtime::InteropServices::Out] double% gx, [System::Runtime::InteropServices::Out] double% gy, [System::Runtime::InteropServices::Out] double% gz)
Definition: dotnet/NETGeographicLib/GravityCircle.cpp:43
NETGeographicLib::GravityCircle::GeoidHeight
double GeoidHeight(double lon)
Definition: dotnet/NETGeographicLib/GravityCircle.cpp:71
GeographicLib::GravityCircle::Capabilities
unsigned Capabilities() const
Definition: GravityCircle.hpp:289
lon
static const double lon
Definition: testGeographicLib.cpp:34
NULL
#define NULL
Definition: ccolamd.c:609
NETGeographicLib::GravityCircle::GravityCircle
GravityCircle(const GeographicLib::GravityCircle &gc)
Definition: dotnet/NETGeographicLib/GravityCircle.cpp:30
get
Container::iterator get(Container &c, Position position)
Definition: stdlist_overload.cpp:29
NETGeographicLib
Definition: Accumulator.h:13


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:23