10#if !defined(GEOGRAPHICLIB_GARS_HPP)
11#define GEOGRAPHICLIB_GARS_HPP 1
35 static const char*
const digits_;
36 static const char*
const letters_;
37 static constexpr int lonorig_ = -
Math::hd;
38 static constexpr int latorig_ = -
Math::qd;
39 static constexpr int baselon_ = 10;
40 static constexpr int baselat_ = 24;
41 static constexpr int lonlen_ = 3;
42 static constexpr int latlen_ = 2;
43 static constexpr int baselen_ = lonlen_ + latlen_;
44 static constexpr int mult1_ = 2;
45 static constexpr int mult2_ = 2;
46 static constexpr int mult3_ = 3;
47 static constexpr int m_ = mult1_ * mult2_ * mult3_;
48 static constexpr int maxprec_ = 2;
49 static constexpr int maxlen_ = baselen_ + maxprec_;
72 static void Forward(real lat, real lon,
int prec, std::string& gars);
94 static void Reverse(
const std::string& gars, real& lat, real& lon,
95 int& prec,
bool centerp =
true);
106 return 1/
real(prec <= 0 ? mult1_ : (prec == 1 ? mult1_ * mult2_ :
107 mult1_ * mult2_ * mult3_));
120 using std::fabs; res = fabs(res);
121 for (
int prec = 0; prec < maxprec_; ++prec)
Header for GeographicLib::Constants class.
#define GEOGRAPHICLIB_EXPORT
GeographicLib::Math::real real
static void Reverse(const std::string &gars, real &lat, real &lon, int &prec, bool centerp=true)
static Math::real Resolution(int prec)
static int Precision(real res)
static void Forward(real lat, real lon, int prec, std::string &gars)
static constexpr int qd
degrees per quarter turn
static constexpr int hd
degrees per half turn
Namespace for GeographicLib.