dotnet/examples/ManagedCPP/example-DMS.cpp
Go to the documentation of this file.
1 using namespace System;
2 using namespace NETGeographicLib;
3 
5 {
6  try {
7  {
8  System::String^ dms = "30d14'45.6\"S";
10  double ang = DMS::Decode(dms, type);
11  Console::WriteLine(String::Format("Type: {0} String: {1}", type, ang));
12  }
13  {
14  double ang = -30.245715;
15  System::String^ dms = DMS::Encode(ang, 6, DMS::Flag::LATITUDE, 0);
16  Console::WriteLine(String::Format("Latitude: {0}", dms));
17  }
18  }
19  catch (GeographicErr^ e) {
20  Console::WriteLine( String::Format( "Caught exception: {0}", e->Message ) );
21  return -1;
22  }
23  return 0;
24 }
gtsam.examples.DogLegOptimizerExample.type
type
Definition: DogLegOptimizerExample.py:111
e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
NETGeographicLib::GeographicErr
Exception class for NETGeographicLib.
Definition: NETGeographicLib.h:132
NETGeographicLib::DMS::Flag
Flag
Definition: DMS.h:36
array
Definition: numpy.h:821
main
int main(array< System::String ^> ^)
Definition: dotnet/examples/ManagedCPP/example-DMS.cpp:4
NETGeographicLib
Definition: Accumulator.h:13


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:31