NETGeographicLib.h
Go to the documentation of this file.
1 #pragma once
2 
12 #include <string>
13 
14 using namespace System;
15 
16 namespace NETGeographicLib
17 {
18  enum class captype {
19  CAP_NONE = 0U,
20  CAP_C1 = 1U<<0,
21  CAP_C1p = 1U<<1,
22  CAP_C2 = 1U<<2,
23  CAP_C3 = 1U<<3,
24  CAP_C4 = 1U<<4,
25  CAP_ALL = 0x1FU,
26  CAP_MASK = CAP_ALL,
27  OUT_ALL = 0x7F80U,
28  OUT_MASK = 0xFF80U,
29  };
30 
38  public enum class Mask {
43  NONE = 0U,
49  LATITUDE = 1U<<7 | unsigned(captype::CAP_NONE),
54  LONGITUDE = 1U<<8 | unsigned(captype::CAP_C3),
61  AZIMUTH = 1U<<9 | unsigned(captype::CAP_NONE),
66  DISTANCE = 1U<<10 | unsigned(captype::CAP_C1),
72  DISTANCE_IN = 1U<<11 | unsigned(captype::CAP_C1) |
73  unsigned(captype::CAP_C1p),
78  REDUCEDLENGTH = 1U<<12 | unsigned(captype::CAP_C1) |
79  unsigned(captype::CAP_C2),
84  GEODESICSCALE = 1U<<13 | unsigned(captype::CAP_C1) |
85  unsigned(captype::CAP_C2),
90  AREA = 1U<<14 | unsigned(captype::CAP_C4),
95  LONG_UNROLL = 1U<<15,
100  ALL = unsigned(captype::OUT_ALL) | unsigned(captype::CAP_ALL),
101  };
102 
106  public ref class VersionInfo
107  {
108  private:
110  public:
114  static System::String^ GetString();
118  static int MajorVersion();
122  static int MinorVersion();
126  static int Patch();
127  };
128 
132  public ref class GeographicErr : public System::Exception
133  {
134  public:
139  GeographicErr( const char* msg ) :
140  System::Exception( gcnew System::String( msg ) ) {}
145  GeographicErr( System::String^ msg ) : System::Exception( msg ) {}
146  };
147 
148  ref class StringConvert
149  {
151  public:
152  static std::string ManagedToUnmanaged( System::String^ s );
153  static System::String^ UnmanagedToManaged( const std::string& s )
154  { return gcnew System::String( s.c_str() ); }
155  };
156 
165  public ref class Constants
166  {
167  private:
169  public:
170 
174  ref class WGS72
175  {
176  private:
177  WGS72() {}
178  // The equatorial radius in meters.
179  static const double m_MajorRadius = 6378135.0;
180  // The flattening of the ellipsoid
181  static const double m_Flattening = 1.0 / 298.26;
182  // The gravitational constant in meters<sup>3</sup>/second<sup>2</sup>.
183  static const double m_GravitationalConstant = 3.986008e+14;
184  // The spin rate of the Earth in radians/second.
185  static const double m_EarthRate = 7.292115147e-5;
186  // dynamical form factor
187  static const double m_J2 = 1.0826158e-3;
188  public:
190  static property double MajorRadius { double get() { return m_MajorRadius; } }
192  static property double Flattening { double get() { return m_Flattening; } }
194  static property double GravitationalConstant { double get() { return m_GravitationalConstant; } }
196  static property double EarthRate { double get() { return m_EarthRate; } }
198  static property double J2 { double get() { return m_J2; } }
199  };
200 
204  ref class WGS84
205  {
206  private:
207  WGS84() {}
208  // The equatorial radius in meters.
209  static const double m_MajorRadius = 6378137.0;
210  // The flattening of the ellipsoid
211  static const double m_Flattening = 1.0 / 298.257223563;
212  // The gravitational constant in meters<sup>3</sup>/second<sup>2</sup>.
213  // I have also seen references that set this value to 3.986004418e+14.
214  // The following value is used to maintain consistency with GeographicLib.
215  static const double m_GravitationalConstant = 3.986005e+14;
216  // The spin rate of the Earth in radians/second.
217  static const double m_EarthRate = 7.292115e-5;
218  // dynamical form factor
219  static const double m_J2 = 1.08263e-3;
220  public:
222  static property double MajorRadius { double get() { return m_MajorRadius; } }
224  static property double Flattening { double get() { return m_Flattening; } }
226  static property double GravitationalConstant { double get() { return m_GravitationalConstant; } }
228  static property double EarthRate { double get() { return m_EarthRate; } }
230  static property double J2 { double get() { return m_J2; } }
231  };
232 
236  ref class GRS80
237  {
238  private:
239  GRS80() {}
240  // The equatorial radius in meters.
241  static const double m_MajorRadius = 6378137.0;
242  // The flattening of the ellipsoid
243  static const double m_Flattening = 1.0 / 298.257222100882711;
244  // The gravitational constant in meters<sup>3</sup>/second<sup>2</sup>.
245  static const double m_GravitationalConstant = 3.986005e+14;
246  // The spin rate of the Earth in radians/second.
247  static const double m_EarthRate = 7.292115e-5;
248  // dynamical form factor
249  static const double m_J2 = 1.08263e-3;
250  public:
252  static property double MajorRadius { double get() { return m_MajorRadius; } }
254  static property double Flattening { double get() { return m_Flattening; } }
256  static property double GravitationalConstant { double get() { return m_GravitationalConstant; } }
258  static property double EarthRate { double get() { return m_EarthRate; } }
260  static property double J2 { double get() { return m_J2; } }
261  };
262  };
263 
270  public ref class Utility
271  {
272  private:
273  // hide the constructor since all members of this class are static
274  Utility() {}
275  public:
288  static double FractionalYear( System::String^ s );
289  };
290 } // namespace NETGeographicLib
NETGeographicLib::Constants::GRS80::GRS80
GRS80()
Definition: NETGeographicLib.h:239
NETGeographicLib::Mask::DISTANCE
@ DISTANCE
NETGeographicLib::captype::CAP_C2
@ CAP_C2
NETGeographicLib::Constants::WGS84
WGS84 Parameters.
Definition: NETGeographicLib.h:204
NETGeographicLib::Utility::Utility
Utility()
Definition: NETGeographicLib.h:274
NETGeographicLib::Mask::LONG_UNROLL
@ LONG_UNROLL
NETGeographicLib::VersionInfo::VersionInfo
VersionInfo()
Definition: NETGeographicLib.h:109
s
RealScalar s
Definition: level1_cplx_impl.h:126
NETGeographicLib::StringConvert::StringConvert
StringConvert()
Definition: NETGeographicLib.h:150
NETGeographicLib::Constants::WGS72::WGS72
WGS72()
Definition: NETGeographicLib.h:177
NETGeographicLib::StringConvert
Definition: NETGeographicLib.h:148
NETGeographicLib::VersionInfo
The version information.
Definition: NETGeographicLib.h:106
NETGeographicLib::captype::CAP_C1p
@ CAP_C1p
NETGeographicLib::captype::CAP_C1
@ CAP_C1
NETGeographicLib::GeographicErr
Exception class for NETGeographicLib.
Definition: NETGeographicLib.h:132
NETGeographicLib::Mask::AREA
@ AREA
NETGeographicLib::Constants::Constants
Constants()
Definition: NETGeographicLib.h:168
NETGeographicLib::StringConvert::UnmanagedToManaged
static System::String UnmanagedToManaged(const std::string &s)
Definition: NETGeographicLib.h:153
NETGeographicLib::Constants::WGS72
WGS72 Parameters.
Definition: NETGeographicLib.h:174
NETGeographicLib::Mask::NONE
@ NONE
NETGeographicLib::Utility
Utility library.
Definition: NETGeographicLib.h:270
NETGeographicLib::captype::OUT_ALL
@ OUT_ALL
NETGeographicLib::captype::CAP_C4
@ CAP_C4
NETGeographicLib::captype
captype
Definition: NETGeographicLib.h:18
NETGeographicLib::Constants::WGS84::WGS84
WGS84()
Definition: NETGeographicLib.h:207
NETGeographicLib::captype::CAP_MASK
@ CAP_MASK
NETGeographicLib::GeographicErr::GeographicErr
GeographicErr(System::String^ msg)
Creates an exception using a managed string.
Definition: NETGeographicLib.h:145
NETGeographicLib::Mask::ALL
@ ALL
NETGeographicLib::Mask::AZIMUTH
@ AZIMUTH
NETGeographicLib::captype::CAP_C3
@ CAP_C3
NETGeographicLib::captype::CAP_ALL
@ CAP_ALL
NETGeographicLib::Mask::LONGITUDE
@ LONGITUDE
NETGeographicLib::captype::CAP_NONE
@ CAP_NONE
NETGeographicLib::Mask
Mask
Definition: NETGeographicLib.h:38
NETGeographicLib::Mask::REDUCEDLENGTH
@ REDUCEDLENGTH
NETGeographicLib::Constants
Physical constants.
Definition: NETGeographicLib.h:165
U
@ U
Definition: testDecisionTree.cpp:342
NETGeographicLib::Mask::DISTANCE_IN
@ DISTANCE_IN
NETGeographicLib::Mask::GEODESICSCALE
@ GEODESICSCALE
NETGeographicLib::captype::OUT_MASK
@ OUT_MASK
NETGeographicLib::GeographicErr::GeographicErr
GeographicErr(const char *msg)
Creates an exception using an unmanaged string.
Definition: NETGeographicLib.h:139
get
Container::iterator get(Container &c, Position position)
Definition: stdlist_overload.cpp:29
NETGeographicLib::Mask::LATITUDE
@ LATITUDE
NETGeographicLib::Constants::GRS80
GRS80 Parameters.
Definition: NETGeographicLib.h:236
NETGeographicLib
Definition: Accumulator.h:13
pybind11.msg
msg
Definition: wrap/pybind11/pybind11/__init__.py:6


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:12:23