gtsam
3rdparty
GeographicLib
dotnet
examples
ManagedCPP
dotnet/examples/ManagedCPP/example-Geoid.cpp
Go to the documentation of this file.
1
using namespace
System;
2
using namespace
NETGeographicLib
;
3
4
int
main
(
array<System::String ^>
^
/*args*/
)
5
{
6
try
{
7
Geoid
^ egm96 =
gcnew
Geoid
(
"egm96-5"
,
""
,
true
,
false
);
8
// Convert height above egm96 to height above the ellipsoid
9
double
lat
= 42,
lon
= -75, height_above_geoid = 20;
10
double
11
geoid_height = egm96->
Height
(
lat
,
lon
),
12
height_above_ellipsoid = (height_above_geoid +
13
(double)Geoid::ConvertFlag::GEOIDTOELLIPSOID * geoid_height);
14
Console::WriteLine(height_above_ellipsoid);
15
}
16
catch
(
GeographicErr
^
e
) {
17
Console::WriteLine(String::Format(
"Caught exception: {0}"
,
e
->Message));
18
return
-1;
19
}
20
return
0;
21
}
main
int main(array< System::String ^> ^)
Definition:
dotnet/examples/ManagedCPP/example-Geoid.cpp:4
e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
NETGeographicLib::GeographicErr
Exception class for NETGeographicLib.
Definition:
NETGeographicLib.h:132
NETGeographicLib::Geoid
.NET wrapper for GeographicLib::Geoid.
Definition:
Geoid.h:71
NETGeographicLib::Geoid::Height
double Height(double lat, double lon)
Definition:
dotnet/NETGeographicLib/Geoid.cpp:83
array
Definition:
numpy.h:821
lon
static const double lon
Definition:
testGeographicLib.cpp:34
NETGeographicLib
Definition:
Accumulator.h:13
lat
static const double lat
Definition:
testGeographicLib.cpp:34
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:31