10 #if !defined(GEOGRAPHICLIB_TRANSVERSEMERCATOR_HPP)
11 #define GEOGRAPHICLIB_TRANSVERSEMERCATOR_HPP 1
15 #if !defined(GEOGRAPHICLIB_TRANSVERSEMERCATOR_ORDER)
20 # define GEOGRAPHICLIB_TRANSVERSEMERCATOR_ORDER \
21 (GEOGRAPHICLIB_PRECISION == 2 ? 6 : (GEOGRAPHICLIB_PRECISION == 1 ? 4 : 8))
24 namespace GeographicLib {
83 static const real tol_;
84 static const real overflow_;
85 static const int numit_ = 5;
86 real _a, _f, _k0, _e2, _e, _e2m, _c, _n;
88 real _a1, _b1, _alp[maxpow_ + 1], _bet[maxpow_ + 1];
90 static inline real tanx(real x)
throw() {
93 return x >= 0 ? (!(t < 0) ? t : overflow_) : (!(t >= 0) ? t : -overflow_);
97 inline real eatanhe(real x)
const throw() {
98 return _f >= 0 ? _e *
Math::atanh(_e * x) : - _e * std::atan(_e * x);
100 real taupf(real tau)
const throw();
101 real tauf(real taup)
const throw();
134 void Forward(real lon0, real lat, real lon,
135 real& x, real& y, real& gamma, real& k)
const throw();
152 void Reverse(real lon0, real x, real y,
153 real& lat, real& lon, real& gamma, real& k)
const throw();
158 void Forward(real lon0, real lat, real lon,
159 real& x, real& y)
const throw() {
161 Forward(lon0, lat, lon, x, y, gamma, k);
167 void Reverse(real lon0, real x, real y,
168 real& lat, real& lon)
const throw() {
170 Reverse(lon0, x, y, lat, lon, gamma, k);
193 Math::real InverseFlattening()
const throw() {
return 1/_f; }
213 #endif // GEOGRAPHICLIB_TRANSVERSEMERCATOR_HPP