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 : \
22 (GEOGRAPHICLIB_PRECISION == 1 ? 4 : 8))
25 namespace GeographicLib {
84 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];
89 static inline real overflow() {
92 overflow = 1 /
Math::sq(std::numeric_limits<real>::epsilon());
96 static inline real tanx(real x) {
101 (!(t < 0) ? t : overflow()) :
102 (!(t >= 0) ? t : -overflow());
106 inline real eatanhe(real x)
const {
108 return _f >= 0 ? _e *
Math::atanh(_e * x) : - _e * atan(_e * x);
110 real taupf(real tau)
const;
111 real tauf(real taup)
const;
144 void Forward(real lon0, real lat, real lon,
145 real& x, real& y, real& gamma, real& k)
const;
162 void Reverse(real lon0, real x, real y,
163 real& lat, real& lon, real& gamma, real& k)
const;
168 void Forward(real lon0, real lat, real lon,
169 real& x, real& y)
const {
171 Forward(lon0, lat, lon, x, y, gamma, k);
177 void Reverse(real lon0, real x, real y,
178 real& lat, real& lon)
const {
180 Reverse(lon0, x, y, lat, lon, gamma, k);
203 Math::real InverseFlattening()
const {
return 1/_f; }
223 #endif // GEOGRAPHICLIB_TRANSVERSEMERCATOR_HPP