10 #if !defined(GEOGRAPHICLIB_LAMBERTCONFORMALCONIC_HPP)
11 #define GEOGRAPHICLIB_LAMBERTCONFORMALCONIC_HPP 1
15 namespace GeographicLib {
60 real _a, _f, _fm, _e2, _e, _e2m;
61 real _sign, _n, _nc, _t0nm1, _scale, _lat0, _k0;
62 real _scbet0, _tchi0, _scchi0, _psi0, _nrho0, _drhomax;
63 static const real eps_;
64 static const real epsx_;
65 static const real tol_;
66 static const real ahypover_;
67 static const int numit_ = 5;
68 static inline real hyp(real x)
throw() {
return Math::hypot(
real(1), x); }
71 inline real eatanhe(real x)
const throw()
72 {
return _f >= 0 ? _e *
Math::atanh(_e * x) : - _e * std::atan(_e * x); }
90 static inline real Dhyp(real x, real y, real hx, real hy)
throw()
92 {
return (x + y) / (hx + hy); }
94 static inline real Dsn(real x, real y, real sx, real sy)
throw() {
97 return t > 0 ? (x + y) *
Math::sq( (sx * sy)/t ) / (sx + sy) :
98 (x - y != 0 ? (sx - sy) / (x - y) : 1);
101 static inline real Dlog1p(real x, real y)
throw() {
102 real t = x - y;
if (t < 0) { t = -t; y = x; }
103 return t != 0 ?
Math::log1p(t / (1 + y)) / t : 1 / (1 + x);
106 static inline real Dexp(real x, real y)
throw() {
108 return (t != 0 ? sinh(t)/t :
real(1)) * exp((x + y)/2);
114 static inline real Dsinh(real x, real y, real sx, real sy, real cx, real cy)
120 return (t != 0 ? sinh(t)/t :
real(1)) * sqrt((sx * sy + cx * cy + 1) /2);
124 static inline real Dasinh(real x, real y, real hx, real hy)
throw() {
128 Math::asinh(x*y > 0 ? t * (x+y) / (x*hy + y*hx) : x*hy - y*hx) / t :
132 inline real Deatanhe(real x, real y)
const throw() {
133 real t = x - y, d = 1 - _e2 * x * y;
134 return t != 0 ? eatanhe(t / d) / t : _e2 / d;
136 void Init(real sphi1, real cphi1, real sphi2, real cphi2, real k1)
throw();
203 real sinlat1, real coslat1,
204 real sinlat2, real coslat2,
216 void SetScale(real lat, real k =
real(1));
238 void Forward(real lon0, real lat, real lon,
239 real& x, real& y, real& gamma, real& k)
const throw();
260 void Reverse(real lon0, real x, real y,
261 real& lat, real& lon, real& gamma, real& k)
const throw();
268 real& x, real& y)
const throw() {
270 Forward(lon0, lat, lon, x, y, gamma, k);
278 real& lat, real& lon)
const throw() {
280 Reverse(lon0, x, y, lat, lon, gamma, k);
303 Math::real InverseFlattening()
const throw() {
return 1/_f; }
332 #endif // GEOGRAPHICLIB_LAMBERTCONFORMALCONIC_HPP
#define GEOGRAPHICLIB_EXPORT
GeographicLib::Math::real real
Header for GeographicLib::Constants class.