10 #if !defined(GEOGRAPHICLIB_LAMBERTCONFORMALCONIC_HPP)
11 #define GEOGRAPHICLIB_LAMBERTCONFORMALCONIC_HPP 1
15 namespace GeographicLib {
60 real eps_, epsx_, ahypover_;
61 real _a, _f, _fm, _e2, _es;
62 real _sign, _n, _nc, _t0nm1, _scale, _lat0, _k0;
63 real _scbet0, _tchi0, _scchi0, _psi0, _nrho0, _drhomax;
64 static const int numit_ = 5;
83 static inline real Dhyp(real x, real y, real hx, real hy)
85 {
return (x + y) / (hx + hy); }
87 static inline real Dsn(real x, real y, real sx, real sy) {
90 return t > 0 ? (x + y) *
Math::sq( (sx * sy)/t ) / (sx + sy) :
91 (x - y != 0 ? (sx - sy) / (x - y) : 1);
94 static inline real Dlog1p(real x, real y) {
95 real t = x - y;
if (t < 0) { t = -t; y = x; }
96 return t ?
Math::log1p(t / (1 + y)) / t : 1 / (1 + x);
99 static inline real Dexp(real x, real y) {
100 using std::sinh;
using std::exp;
102 return (t ? sinh(t)/t : 1) * exp((x + y)/2);
108 static inline real Dsinh(real x, real y, real sx, real sy, real cx, real cy)
113 using std::sinh;
using std::sqrt;
115 return (t ? sinh(t)/t : 1) * sqrt((sx * sy + cx * cy + 1) /2);
119 static inline real Dasinh(real x, real y, real hx, real hy) {
123 Math::asinh(x*y > 0 ? t * (x+y) / (x*hy + y*hx) : x*hy - y*hx) / t :
127 inline real Deatanhe(real x, real y)
const {
128 real t = x - y, d = 1 - _e2 * x * y;
131 void Init(real sphi1, real cphi1, real sphi2, real cphi2, real k1);
198 real sinlat1, real coslat1,
199 real sinlat2, real coslat2,
211 void SetScale(real lat, real k =
real(1));
233 void Forward(real lon0, real lat, real lon,
234 real& x, real& y, real& gamma, real& k)
const;
255 void Reverse(real lon0, real x, real y,
256 real& lat, real& lon, real& gamma, real& k)
const;
263 real& x, real& y)
const {
265 Forward(lon0, lat, lon, x, y, gamma, k);
273 real& lat, real& lon)
const {
275 Reverse(lon0, x, y, lat, lon, gamma, k);
298 Math::real InverseFlattening()
const {
return 1/_f; }
327 #endif // GEOGRAPHICLIB_LAMBERTCONFORMALCONIC_HPP
#define GEOGRAPHICLIB_EXPORT
GeographicLib::Math::real real
static T eatanhe(T x, T es)
Header for GeographicLib::Constants class.