10 #if !defined(GEOGRAPHICLIB_CONSTANTS_HPP) 11 #define GEOGRAPHICLIB_CONSTANTS_HPP 1 13 #include <GeographicLib/Config.h> 21 #define GEOGRAPHICLIB_VERSION_NUM(a,b,c) ((((a) * 10000 + (b)) * 100) + (c)) 34 #define GEOGRAPHICLIB_VERSION \ 35 GEOGRAPHICLIB_VERSION_NUM(GEOGRAPHICLIB_VERSION_MAJOR, \ 36 GEOGRAPHICLIB_VERSION_MINOR, \ 37 GEOGRAPHICLIB_VERSION_PATCH) 43 #if !defined(GEOGRAPHICLIB_HAS_STATIC_ASSERT) 44 # if __cplusplus >= 201103 || defined(__GXX_EXPERIMENTAL_CXX0X__) 45 # define GEOGRAPHICLIB_HAS_STATIC_ASSERT 1 46 # elif defined(_MSC_VER) && _MSC_VER >= 1600 61 # define GEOGRAPHICLIB_HAS_STATIC_ASSERT 1 63 # define GEOGRAPHICLIB_HAS_STATIC_ASSERT 0 71 #if !defined(GEOGRAPHICLIB_STATIC_ASSERT) 72 # if GEOGRAPHICLIB_HAS_STATIC_ASSERT 73 # define GEOGRAPHICLIB_STATIC_ASSERT static_assert 75 # define GEOGRAPHICLIB_STATIC_ASSERT(cond,reason) \ 76 { enum{ GEOGRAPHICLIB_STATIC_ASSERT_ENUM = 1/int(cond) }; } 80 #if defined(_MSC_VER) && defined(GEOGRAPHICLIB_SHARED_LIB) && \ 81 GEOGRAPHICLIB_SHARED_LIB 82 # if GEOGRAPHICLIB_SHARED_LIB > 1 83 # error GEOGRAPHICLIB_SHARED_LIB must be 0 or 1 84 # elif defined(GeographicLib_EXPORTS) 85 # define GEOGRAPHICLIB_EXPORT __declspec(dllexport) 87 # define GEOGRAPHICLIB_EXPORT __declspec(dllimport) 90 # define GEOGRAPHICLIB_EXPORT 98 # define GEOGRAPHICLIB_DEPRECATED(msg) __attribute__((deprecated(msg))) 100 # define GEOGRAPHICLIB_DEPRECATED(msg) __attribute__((deprecated)) 102 #elif defined(_MSC_VER) && _MSC_VER >= 1300 103 # define GEOGRAPHICLIB_DEPRECATED(msg) __declspec(deprecated(msg)) 105 # define GEOGRAPHICLIB_DEPRECATED(msg) 158 template<
typename T>
static inline T
WGS84_a()
159 {
return 6378137 * meter<T>(); }
168 template<
typename T>
static inline T
WGS84_f() {
172 return 1 / ( T(298257223563LL) / 1000000000 );
184 {
return T(3986004) * 100000000 + 41800000; }
195 {
return 7292115 / (T(1000000) * 100000); }
204 template<
typename T>
static inline T
GRS80_a()
205 {
return 6378137 * meter<T>(); }
216 {
return T(3986005) * 100000000; }
234 {
return 7292115 / (T(1000000) * 100000); }
245 {
return T(108263) / 100000000; }
254 template<
typename T>
static inline T
UTM_k0()
255 {
return T(9996) / 10000; }
264 template<
typename T>
static inline T
UPS_k0()
265 {
return T(994) / 1000; }
282 template<
typename T>
static inline T
meter() {
return T(1); }
291 {
return 1000 * meter<real>(); }
297 {
return 1852 * meter<real>(); }
307 {
return meter<real>() * meter<real>(); }
312 {
return square_meter<real>(); }
317 {
return 10000 * square_meter<real>(); }
322 {
return kilometer() * kilometer(); }
327 {
return nauticalmile() * nauticalmile(); }
337 {
return real(254 * 12) / 10000 * meter<real>(); }
375 {
return real(1200) / 3937 * meter<real>(); }
402 #endif // GEOGRAPHICLIB_CONSTANTS_HPP static Math::real arcminute()
static Math::real kilometer()
#define GEOGRAPHICLIB_EXPORT
static Math::real UPS_k0()
static Math::real square_nauticalmile()
static Math::real WGS84_omega()
GeographicLib::Math::real real
static Math::real nauticalmile()
static Math::real arcsecond()
static Math::real surveyfoot()
static Math::real furlong()
static Math::real hectare()
static Math::real GRS80_omega()
static Math::real meter()
static Math::real degree()
static Math::real fathom()
static Math::real UTM_k0()
Header for GeographicLib::Math class.
static Math::real chain()
Namespace for GeographicLib.
static Math::real WGS84_GM()
static Math::real square_meter()
Constants needed by GeographicLib
static Math::real WGS84_a()
Exception handling for GeographicLib.
static Math::real square_kilometer()
static Math::real GRS80_a()
static Math::real square_mile()
static Math::real GRS80_GM()
static Math::real GRS80_J2()
static Math::real WGS84_f()
GeographicErr(const std::string &msg)