Go to the documentation of this file.
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
63 # define GEOGRAPHICLIB_HAS_STATIC_ASSERT 1
65 # define GEOGRAPHICLIB_HAS_STATIC_ASSERT 0
73 #if !defined(GEOGRAPHICLIB_STATIC_ASSERT)
74 # if GEOGRAPHICLIB_HAS_STATIC_ASSERT
75 # define GEOGRAPHICLIB_STATIC_ASSERT static_assert
77 # define GEOGRAPHICLIB_STATIC_ASSERT(cond,reason) \
78 { enum{ GEOGRAPHICLIB_STATIC_ASSERT_ENUM = 1/int(cond) }; }
82 #if defined(_MSC_VER) && defined(GEOGRAPHICLIB_SHARED_LIB) && \
83 GEOGRAPHICLIB_SHARED_LIB
84 # if GEOGRAPHICLIB_SHARED_LIB > 1
85 # error GEOGRAPHICLIB_SHARED_LIB must be 0 or 1
86 # elif defined(GeographicLib_SHARED_EXPORTS)
87 # define GEOGRAPHICLIB_EXPORT __declspec(dllexport)
89 # define GEOGRAPHICLIB_EXPORT __declspec(dllimport)
92 # define GEOGRAPHICLIB_EXPORT
100 # define GEOGRAPHICLIB_DEPRECATED(msg) __attribute__((deprecated(msg)))
102 # define GEOGRAPHICLIB_DEPRECATED(msg) __attribute__((deprecated))
104 #elif defined(_MSC_VER) && _MSC_VER >= 1300
105 # define GEOGRAPHICLIB_DEPRECATED(msg) __declspec(deprecated(msg))
107 # define GEOGRAPHICLIB_DEPRECATED(msg)
161 {
return 6378137 * meter<T>(); }
174 return 1 / ( T(298257223563LL) / 1000000000 );
186 {
return T(3986004) * 100000000 + 41800000; }
197 {
return 7292115 / (T(1000000) * 100000); }
207 {
return 6378137 * meter<T>(); }
218 {
return T(3986005) * 100000000; }
236 {
return 7292115 / (T(1000000) * 100000); }
247 {
return T(108263) / 100000000; }
257 {
return T(9996) / 10000; }
267 {
return T(994) / 1000; }
284 template<
typename T>
static T
meter() {
return T(1); }
293 {
return 1000 * meter<real>(); }
299 {
return 1852 * meter<real>(); }
309 {
return meter<real>() * meter<real>(); }
314 {
return square_meter<real>(); }
319 {
return 10000 * square_meter<real>(); }
324 {
return kilometer() * kilometer(); }
329 {
return nauticalmile() * nauticalmile(); }
339 {
return real(254 * 12) / 10000 * meter<real>(); }
377 {
return real(1200) / 3937 * meter<real>(); }
404 #endif // GEOGRAPHICLIB_CONSTANTS_HPP
GeographicLib::Math::real real
static Math::real kilometer()
static Math::real WGS84_omega()
Namespace for GeographicLib.
static Math::real furlong()
static Math::real WGS84_a()
static Math::real arcsecond()
static Math::real square_kilometer()
#define GEOGRAPHICLIB_EXPORT
Exception handling for GeographicLib.
static Math::real chain()
static Math::real hectare()
static Math::real WGS84_GM()
static Math::real GRS80_J2()
static Math::real UPS_k0()
static Math::real arcminute()
static Math::real nauticalmile()
static Math::real meter()
GeographicErr(const std::string &msg)
Header for GeographicLib::Math class.
static Math::real square_meter()
static Math::real square_nauticalmile()
static Math::real GRS80_a()
static Math::real degree()
static Math::real WGS84_f()
static Math::real GRS80_omega()
static Math::real square_mile()
static Math::real surveyfoot()
static Math::real GRS80_GM()
static Math::real fathom()
static Math::real UTM_k0()
Constants needed by GeographicLib