dotnet/NETGeographicLib/GARS.cpp
Go to the documentation of this file.
1 
11 #include "stdafx.h"
12 #include "GeographicLib/GARS.hpp"
13 #include "GARS.h"
14 #include "NETGeographicLib.h"
15 
16 using namespace NETGeographicLib;
17 
18 //*****************************************************************************
19 void GARS::Forward(double lat, double lon, int prec, System::String^% gars)
20 {
21  try
22  {
23  std::string l;
24  GeographicLib::GARS::Forward( lat, lon, prec, l );
25  gars = gcnew System::String( l.c_str() );
26  }
27  catch ( const std::exception& xcpt )
28  {
29  throw gcnew GeographicErr( xcpt.what() );
30  }
31 }
32 
33 //*****************************************************************************
34 void GARS::Reverse( System::String^ gars, double% lat, double% lon,
35  int% prec, bool centerp)
36 {
37  try
38  {
39  double llat, llon;
40  int lprec;
42  llat, llon, lprec, centerp );
43  lat = llat;
44  lon = llon;
45  prec = lprec;
46  }
47  catch ( const std::exception& err )
48  {
49  throw gcnew GeographicErr( err.what() );
50  }
51 }
52 
53 //*****************************************************************************
54 double GARS::Resolution(int prec) { return GeographicLib::GARS::Resolution(prec); }
55 
56 //*****************************************************************************
Header for NETGeographicLib::NETGeographicLib objects.
static const double lat
static double Resolution(int prec)
Exception class for NETGeographicLib.
static void Forward(double lat, double lon, int prec, [System::Runtime::InteropServices::Out] System::String^% gars)
static void Forward(real lat, real lon, int prec, std::string &gars)
Definition: src/GARS.cpp:20
static void Reverse(System::String^ gars, [System::Runtime::InteropServices::Out] double% lat, [System::Runtime::InteropServices::Out] double% lon, [System::Runtime::InteropServices::Out] int% prec, bool centerp)
static Math::real Resolution(int prec)
Definition: GARS.hpp:113
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
static const Line3 l(Rot3(), 1, 1)
static void Reverse(const std::string &gars, real &lat, real &lon, int &prec, bool centerp=true)
Definition: src/GARS.cpp:57
static std::string ManagedToUnmanaged(System::String^ s)
static const double lon
Header for GeographicLib::GARS class.
static int Precision(real res)
Definition: GARS.hpp:127
Header for NETGeographicLib::GARS class.


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