13#if !defined(GEOGRAPHICLIB_JACOBICONFORMAL_HPP)
14#define GEOGRAPHICLIB_JACOBICONFORMAL_HPP 1
19namespace experimental {
47 real _a, _b, _c, _ab2, _bc2, _ac2;
49 static void norm(real&
x, real&
y) {
51 real z = hypot(
x,
y);
x /= z;
y /= z;
67 , _ab2((_a - _b) * (_a + _b))
68 , _bc2((_b - _c) * (_b + _c))
69 , _ac2((_a - _c) * (_a + _c))
70 , _ex(_ab2 / _ac2 *
Math::sq(_c / _b), -_ab2 /
Math::sq(_b),
71 _bc2 / _ac2 *
Math::sq(_a / _b),
Math::sq(_a / _b))
72 , _ey(_bc2 / _ac2 *
Math::sq(_a / _b), +_bc2 /
Math::sq(_b),
73 _ab2 / _ac2 *
Math::sq(_c / _b),
Math::sq(_c / _b))
76 if (!(isfinite(_a) && _a >= _b && _b >= _c && _c > 0))
77 throw GeographicErr(
"JacobiConformal: axes are not in order");
80 (
"JacobiConformal: use alternate constructor for sphere");
98 , _ab2(ab * (_a + _b))
99 , _bc2(bc * (_b + _c))
101 , _ex(_ab2 / _ac2 *
Math::sq(_c / _b),
102 -(_a - _b) * (_a + _b) /
Math::sq(_b),
103 _bc2 / _ac2 *
Math::sq(_a / _b),
Math::sq(_a / _b))
104 , _ey(_bc2 / _ac2 *
Math::sq(_a / _b),
105 +(_b - _c) * (_b + _c) /
Math::sq(_b),
106 _ab2 / _ac2 *
Math::sq(_c / _b),
Math::sq(_c / _b))
109 if (!(isfinite(_a) && _a >= _b && _b >= _c && _c > 0 &&
111 throw GeographicErr(
"JacobiConformal: axes are not in order");
112 if (!(ab + bc > 0 && isfinite(_ac2)))
113 throw GeographicErr(
"JacobiConformal: ab + bc must be positive");
127 real somg1 = _b * somg, comg1 = _a * comg; norm(somg1, comg1);
129 * _ex.
Pi(somg1, comg1, _ex.
Delta(somg1, comg1));
156 real sbet1 = _b * sbet, cbet1 = _c * cbet; norm(sbet1, cbet1);
158 * _ey.
Pi(sbet1, cbet1, _ey.
Delta(sbet1, cbet1));
Header for GeographicLib::EllipticFunction class.
Elliptic integrals and functions.
Math::real Delta(real sn, real cn) const
Exception handling for GeographicLib.
Mathematical functions needed by GeographicLib.
static void sincosd(T x, T &sinx, T &cosx)
Namespace for GeographicLib.