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;
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 //*****************************************************************************
GARS.hpp
Header for GeographicLib::GARS class.
GeographicLib::GARS::Forward
static void Forward(real lat, real lon, int prec, std::string &gars)
Definition: src/GARS.cpp:20
res
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Definition: PartialRedux_count.cpp:3
NETGeographicLib::GeographicErr
Exception class for NETGeographicLib.
Definition: NETGeographicLib.h:132
NETGeographicLib::GARS::Precision
static int Precision(double res)
Definition: dotnet/NETGeographicLib/GARS.cpp:57
GeographicLib::GARS::Resolution
static Math::real Resolution(int prec)
Definition: GARS.hpp:113
l
static const Line3 l(Rot3(), 1, 1)
stdafx.h
GARS.h
Header for NETGeographicLib::GARS class.
NETGeographicLib::GARS::Forward
static void Forward(double lat, double lon, int prec, [System::Runtime::InteropServices::Out] System::String^% gars)
Definition: dotnet/NETGeographicLib/GARS.cpp:19
NETGeographicLib.h
Header for NETGeographicLib::NETGeographicLib objects.
NETGeographicLib::GARS::Resolution
static double Resolution(int prec)
Definition: dotnet/NETGeographicLib/GARS.cpp:54
NETGeographicLib::GARS::Reverse
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)
Definition: dotnet/NETGeographicLib/GARS.cpp:34
GeographicLib::GARS::Reverse
static void Reverse(const std::string &gars, real &lat, real &lon, int &prec, bool centerp=true)
Definition: src/GARS.cpp:57
GeographicLib::GARS::Precision
static int Precision(real res)
Definition: GARS.hpp:127
lon
static const double lon
Definition: testGeographicLib.cpp:34
NETGeographicLib
Definition: Accumulator.h:13
NETGeographicLib::StringConvert::ManagedToUnmanaged
static std::string ManagedToUnmanaged(System::String^ s)
Definition: NETGeographicLib.cpp:20
lat
static const double lat
Definition: testGeographicLib.cpp:34


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