10#if !defined(GEOGRAPHICLIB_LAMBERTCONFORMALCONIC_HPP)
11#define GEOGRAPHICLIB_LAMBERTCONFORMALCONIC_HPP 1
66 real eps_, epsx_, ahypover_;
67 real _a, _f, _fm, _e2, _es;
68 real _sign, _n, _nc, _t0nm1, _scale, _lat0, _k0;
69 real _scbet0, _tchi0, _scchi0, _psi0, _nrho0, _drhomax;
70 static const int numit_ = 5;
71 static real hyp(real x) {
73 return hypot(
real(1), x);
92 static real Dhyp(real x, real y, real hx, real hy)
94 {
return (x + y) / (hx + hy); }
96 static real Dsn(real x, real y, real sx, real sy) {
99 return t > 0 ? (x + y) *
Math::sq( (sx * sy)/t ) / (sx + sy) :
100 (x - y != 0 ? (sx - sy) / (x - y) : 1);
103 static real Dlog1p(real x, real y) {
105 real t = x - y;
if (t < 0) { t = -t; y = x; }
106 return t != 0 ? log1p(t / (1 + y)) / t : 1 / (1 + x);
109 static real Dexp(real x, real y) {
110 using std::sinh;
using std::exp;
112 return (t != 0 ? sinh(t)/t : 1) * exp((x + y)/2);
118 static real Dsinh(real x, real y, real sx, real sy, real cx, real cy)
123 using std::sinh;
using std::sqrt;
125 return (t != 0 ? sinh(t)/t : 1) * sqrt((sx * sy + cx * cy + 1) /2);
129 static real Dasinh(real x, real y, real hx, real hy) {
134 asinh(x*y > 0 ? t * (x + y) / (x*hy + y*hx) : x*hy - y*hx) / t :
138 real Deatanhe(real x, real y)
const {
139 real t = x - y, d = 1 - _e2 * x * y;
142 void Init(real sphi1, real cphi1, real sphi2, real cphi2, real k1);
206 real sinlat1, real coslat1,
207 real sinlat2, real coslat2,
219 void SetScale(real lat, real k =
real(1));
240 void Forward(real lon0, real lat, real lon,
241 real& x, real& y, real& gamma, real& k)
const;
260 void Reverse(real lon0, real x, real y,
261 real& lat, real& lon, real& gamma, real& k)
const;
268 real& x, real& y)
const {
270 Forward(lon0, lat, lon, x, y, gamma, k);
278 real& lat, real& lon)
const {
280 Reverse(lon0, x, y, lat, lon, gamma, k);
Header for GeographicLib::Constants class.
#define GEOGRAPHICLIB_EXPORT
GeographicLib::Math::real real
static T eatanhe(T x, T es)
Namespace for GeographicLib.