25# pragma warning (disable: 4127 5055)
32 AuxLatitude::AuxLatitude(real a, real f)
33 : tol_( sqrt(numeric_limits<real>::epsilon()) )
34 , bmin_( log2(numeric_limits<real>::min()) )
35 , bmax_( log2(numeric_limits<real>::max()) )
40 , _e2( _f * (2 - _f) )
41 , _e2m1( _fm1 * _fm1 )
42 , _e12( _e2/(1 - _e2) )
45 , _e( sqrt(fabs(_e2)) )
46 , _e1( sqrt(fabs(_e12)) )
48 , _q( _e12p1 + (_f == 0 ? 1 : (_f > 0 ? asinh(_e1) : atan(_e)) / _e) )
50 if (!(isfinite(_a) && _a > 0))
52 if (!(isfinite(_b) && _b > 0))
55 numeric_limits<real>::quiet_NaN());
59 AuxLatitude::AuxLatitude(
const pair<real, real>& axes)
60 : tol_( sqrt(numeric_limits<
real>::epsilon()) )
61 , bmin_( log2(numeric_limits<
real>::min()) )
62 , bmax_( log2(numeric_limits<
real>::max()) )
65 , _f( (_a - _b) / _a )
67 , _e2( ((_a - _b) * (_a + _b)) / (_a * _a) )
68 , _e2m1( (_b * _b) / (_a * _a) )
69 , _e12( ((_a - _b) * (_a + _b)) / (_b * _b) )
70 , _e12p1( (_a * _a) / (_b * _b) )
71 , _n( (_a - _b) / (_a + _b) )
72 , _e( sqrt(fabs(_a - _b) * (_a + _b)) / _a )
73 , _e1( sqrt(fabs(_a - _b) * (_a + _b)) / _b )
75 , _q( _e12p1 + (_f == 0 ? 1 : (_f > 0 ? asinh(_e1) : atan(_e)) / _e) )
77 if (!(isfinite(_a) && _a > 0))
79 if (!(isfinite(_b) && _b > 0))
82 numeric_limits<real>::quiet_NaN());
92 if (diff) *diff = _fm1;
97 if (diff) *diff = _e2m1;
104 real sbeta = fabs(beta.
y()), cbeta = fabs(beta.
x());
105 real a = 1, b = _fm1, ka = _e2, kb = -_e12, ka1 = _e2m1, kb1 = _e12p1,
120 da2 = ka1 + ka * sb2,
127 + ka * sbeta / sqrt(da2) );
133 if (_f < 0) {
swap(smu, cmu);
swap(a, b); }
139 cmu = mu.
x(); cbeta = beta.
x();
140 *diff = _fm1 * b/mr *
Math::sq(cbeta / cmu) * (cbeta / cphi);
149 real tphi = fabs(phi.
tan()), tchi = tphi;
150 if ( !( !isfinite(tphi) || tphi == 0 || _f == 0 ) ) {
151 real scphi = sc(tphi),
152 sig = sinh(_e2 * atanhee(tphi) ),
155 tchi = tphi * scsig - sig * scphi;
163 real sigtphi = sig / tphi, tphimsig;
165 tphimsig = tphi - sig;
176 real em1 = _e2m1 / (1 + _e),
177 atanhs = asinh(tphi),
178 scbeta = sc(_fm1 * tphi),
179 scphibeta = sc(tphi) / scbeta,
180 atanhes = asinh(_e * tphi / scbeta),
181 t1 = (atanhs - _e * atanhes)/2,
182 t2 = asinh(em1 * (tphi * scphibeta)) / em1,
183 Dg = cosh((atanhs + _e * atanhes)/2) * (sinh(t1) / t1)
184 * ((atanhs + atanhes)/2 + (1 + _e)/2 * t2);
187 tchi = tphimsig * (1 + sigtphi) / (scsig + sigtphi * scphi);
196 *diff = _e2m1 * (cbeta / cchi) * (cbeta / cphi);
198 real ss = _f > 0 ? sinh(_e * asinh(_e1)) : sinh(-_e * atan(_e));
199 *diff = _f > 0 ? 1/( sc(ss) + ss ) : sc(ss) - ss;
207 real tphi = fabs(phi.
tan());
209 if ( !( !isfinite(tphi) || tphi == 0 || _f == 0 ) ) {
212 Dqm = (_q + qv) / (1 + fabs(phin.
y()));
213 xi =
AuxAngle( copysign(qv, phi.
y()), phin.
x() * sqrt(Dqp * Dqm) );
218 cxi = xi.normalized().x();
220 (2/_q) *
Math::sq(cbeta / cxi) * (cbeta / cxi) * (cbeta / phin.
x());
222 *diff = _e2m1 * sqrt(_q/2);
230 case GEOGRAPHIC:
if (diff) *diff = 1;
return phi;
break;
237 if (diff) *diff = numeric_limits<real>::quiet_NaN();
245 int n = 0;
if (niter) *niter = n;
255 case AUTHALIC : tphi *= cbrt(_fm1);
break;
260 real tzeta = fabs(zeta.
tan()), ltzeta = log2(tzeta);
261 if (!isfinite(ltzeta))
return zeta;
263 real ltphi = log2(tphi),
264 bmin = fmin(ltphi, bmin_), bmax = fmax(ltphi, bmax_);
265 for (
int sign = 0, osign = 0, ntrip = 0; n < numit_;) {
269 real tzeta1 = zeta1.
tan(), ltzeta1 = log2(tzeta1);
276 else if (tzeta1 > tzeta) {
283 real dltphi = -(ltzeta1 - ltzeta) / diff;
286 if (!(fabs(dltphi) >= tol_)) {
290 tphi -= (zeta1.
tan() - tzeta) / diff;
293 if ((sign * osign < 0 && n - ntrip > 2) ||
294 ltphi >= bmax || ltphi <= bmin) {
296 ltphi = (bmin + bmax) / 2;
300 if (niter) *niter = n;
307 int k = ind(auxout, auxin);
309 if (auxin == auxout)
return zeta;
311 if (auxin < 3 && auxout < 3)
313 return AuxAngle(zeta.
y() * real(pow(_fm1, auxout - auxin)), zeta.
x());
317 if ( isnan(_c[
Lmax * (k + 1) - 1]) ) fillcoeff(auxin, auxout, k);
343#if GEOGRAPHICLIB_AUXLATITUDE_ORDER == 4
344 static const real coeff[] = {1/real(64), 1/real(4), 1};
345#elif GEOGRAPHICLIB_AUXLATITUDE_ORDER == 6
346 static const real coeff[] = {1/real(256), 1/real(64), 1/real(4), 1};
347#elif GEOGRAPHICLIB_AUXLATITUDE_ORDER == 8
348 static const real coeff[] = {
349 25/real(16384), 1/real(256), 1/real(64), 1/real(4), 1
352#error "Unsupported value for GEOGRAPHICLIB_AUXLATITUDE_ORDER"
379#if GEOGRAPHICLIB_AUXLATITUDE_ORDER == 4
380 static const real coeff[] = {
381 4/real(315), 4/real(105), 4/real(15), -1/real(3), 1
383#elif GEOGRAPHICLIB_AUXLATITUDE_ORDER == 6
384 static const real coeff[] = {
385 4/real(1287), 4/real(693), 4/real(315), 4/real(105), 4/real(15),
388#elif GEOGRAPHICLIB_AUXLATITUDE_ORDER == 8
389 static const real coeff[] = {
390 4/real(3315), 4/real(2145), 4/real(1287), 4/real(693), 4/real(315),
391 4/real(105), 4/real(15), -1/real(3), 1
394#error "Unsupported value for GEOGRAPHICLIB_AUXLATITUDE_ORDER"
403 real s = _f <= 0 ? sn(tphi) : sn(_fm1 * tphi);
406 (_f < 0 ? atan( _e * s ) : asinh( _e1 * s )) / _e;
411 real scbeta = sc(_fm1 * tphi);
412 return atanhee(tphi) + (tphi / scbeta) * (sc(tphi) / scbeta);
416 real scphi = sc(tphi), sphi = sn(tphi),
418 d = tphi > 0 ? 1 / (scphi * scphi * (1 + sphi)) : 1 - sphi;
421 return (_q - q(tphi)) / d;
431 real scbeta = sc(_fm1 * tphi);
432 return (_f == 0 ? 1 :
433 (_f > 0 ? asinh(_e1 * d * scphi / scbeta) :
434 atan(_e * d / (1 - _e2 * sphi))) / (_e * d) ) +
436 ((scphi + _e2 * tphi) / (_e2m1 * scbeta)) * (scphi / scbeta) :
437 (1 + _e2 * sphi) / ((1 - _e2 * sphi*sphi) * _e2m1) );
442 void AuxLatitude::fillcoeff(
int auxin,
int auxout,
int k)
const {
443#if GEOGRAPHICLIB_AUXLATITUDE_ORDER == 4
444 static const real coeffs[] = {
548 -40457/
real(2419200),
593 -2917/
real(56700), 4463/
real(90720),
594 331799/
real(7257600),
602 static const int ptrs[] = {
603 0, 0, 6, 12, 18, 28, 38, 44, 44, 50, 56, 66, 76, 82, 88, 88, 94, 104,
604 114, 120, 126, 132, 132, 142, 152, 162, 172, 182, 192, 192, 202, 212,
605 222, 232, 242, 252, 252,
607#elif GEOGRAPHICLIB_AUXLATITUDE_ORDER == 6
608 static const real coeffs[] = {
639 28112932/
real(212837625), 60136/
real(467775), -2582/
real(14175),
641 251310128/
real(638512875), -21016/
real(51975), -11966/
real(14175),
643 -8797648/
real(10945935), -94388/
real(66825), 3802/
real(14175),
645 -1472637812/
real(638512875), 41072/
real(93555), 6059/
real(4725),
646 455935736/
real(638512875), 768272/
real(467775),
647 4210684958LL/
real(1915538625),
678 7947332/
real(212837625), 11824/
real(467775), -1082/
real(14175),
680 39946703/
real(638512875), -16672/
real(155925), -338/
real(2025),
682 -255454/
real(1563705), -101069/
real(467775), 1102/
real(14175),
684 -189032762/
real(638512875), 1786/
real(18711), 3161/
real(18900),
685 80274086/
real(638512875), 88868/
real(467775),
686 880980241/
real(3831077250LL),
717 216932/
real(2627625), 109042/
real(467775), -2102/
real(14175),
719 117952358/
real(638512875), -7256/
real(155925), 934/
real(14175),
721 -7391576/
real(54729675), -25286/
real(66825), 922/
real(14175),
723 -67048172/
real(638512875), 268/
real(18711), 719/
real(4725),
724 46774256/
real(638512875), 14354/
real(467775),
725 253129538/
real(1915538625),
754 6601661/
real(7257600), -179/
real(168), 49561/
real(161280),
755 -3418889/
real(1995840), 34729/
real(80640),
756 212378941/
real(319334400),
758 12674323/
real(851350500), -384229/
real(14968800), -1609/
real(28350),
760 -31621753811LL/
real(1307674368000LL), -431/
real(17325),
762 -32844781/
real(1751349600), 3746047/
real(119750400), 449/
real(28350),
764 10650637121LL/
real(326918592000LL), 629/
real(53460),
765 -40457/
real(2419200),
766 205072597/
real(20432412000LL), -1800439/
real(119750400),
767 -59109051671LL/
real(3923023104000LL),
796 108847/
real(3991680), -4583/
real(161280),
797 -20648693/
real(638668800),
800 -55271278/
real(212837625), 27128/
real(93555), -2312/
real(14175),
802 106691108/
real(638512875), -65864/
real(155925), 6079/
real(14175),
804 5921152/
real(54729675), -14246/
real(467775), 772/
real(14175),
806 75594328/
real(638512875), -5312/
real(467775), -167/
real(9450),
807 2837636/
real(638512875), -248/
real(13365),
808 -34761247/
real(1915538625),
812 -12467764/
real(212837625), -37192/
real(467775), -2482/
real(14175),
814 100320856/
real(1915538625), 54968/
real(467775), -898/
real(14175),
816 -5884124/
real(70945875), 24496/
real(467775), 6007/
real(14175),
817 -839792/
real(19348875), -23356/
real(66825),
818 570284222/
real(1915538625),
824 -661844/
real(1915538625), 7052/
real(467775), 2/
real(14175),
826 1425778/
real(212837625), 934/
real(467775), -797/
real(56700),
827 390088/
real(212837625), -3673/
real(467775),
828 -18623681/
real(3831077250LL),
830 -4286228/
real(42567525), -193082/
real(467775), 778/
real(4725),
832 -61623938/
real(70945875), 92696/
real(467775), 12338/
real(14175),
834 427003576/
real(1915538625), 612536/
real(467775), -1618/
real(14175),
836 427770788/
real(212837625), -8324/
real(66825), -5933/
real(14175),
837 -9153184/
real(70945875), -320044/
real(467775),
838 -1978771378/
real(1915538625),
840 -9292991/
real(302702400), 7764059/
real(239500800), 1297/
real(18900),
842 36019108271LL/
real(871782912000LL), 35474/
real(467775),
844 3026004511LL/
real(30648618000LL), -4306823/
real(59875200),
845 -2917/
real(56700), 4463/
real(90720),
846 -368661577/
real(4036032000LL), -102293/
real(1871100),
847 331799/
real(7257600),
848 -875457073/
real(13621608000LL), 11744233/
real(239500800),
849 453002260127LL/
real(7846046208000LL),
851 2706758/
real(42567525), -55222/
real(93555), 2458/
real(4725),
853 -340492279/
real(212837625), 516944/
real(467775), 3413/
real(14175),
855 4430783356LL/
real(1915538625), 206834/
real(467775), -15958/
real(14175),
857 62016436/
real(70945875), -832976/
real(467775), 16049/
real(28350),
858 -651151712/
real(212837625), 15602/
real(18711),
859 2561772812LL/
real(1915538625),
862 static const int ptrs[] = {
863 0, 0, 12, 24, 36, 57, 78, 90, 90, 102, 114, 135, 156, 168, 180, 180, 192,
864 213, 234, 246, 258, 270, 270, 291, 312, 333, 354, 375, 396, 396, 417,
865 438, 459, 480, 501, 522, 522,
867#elif GEOGRAPHICLIB_AUXLATITUDE_ORDER == 8
868 static const real coeffs[] = {
892 2514467/
real(245760), -15543/
real(2560), 1097/
real(512),
894 -5962461/
real(286720), 293393/
real(61440),
895 6459601/
real(860160),
896 332287993/
real(27525120),
902 -2363828/
real(31185), 98738/
real(14175), 73814/
real(2835),
904 14416399/
real(935550), 11763988/
real(155925), -399572/
real(14175),
906 258316372/
real(1216215), -2046082/
real(31185), -144838/
real(6237),
908 -2155215124LL/
real(14189175), -115444544/
real(2027025),
910 -170079376/
real(1216215), 38341552/
real(675675),
911 1383243703/
real(11351340),
913 -1683291094/
real(37574026875LL), 22947844/
real(1915538625),
914 28112932/
real(212837625), 60136/
real(467775), -2582/
real(14175),
916 -14351220203LL/
real(488462349375LL), 1228352/
real(3007125),
917 251310128/
real(638512875), -21016/
real(51975), -11966/
real(14175),
919 505559334506LL/
real(488462349375LL), 138128272/
real(147349125),
920 -8797648/
real(10945935), -94388/
real(66825), 3802/
real(14175),
922 973080708361LL/
real(488462349375LL), -45079184/
real(29469825),
923 -1472637812/
real(638512875), 41072/
real(93555), 6059/
real(4725),
924 -1385645336626LL/
real(488462349375LL), -550000184/
real(147349125),
925 455935736/
real(638512875), 768272/
real(467775),
926 -2939205114427LL/
real(488462349375LL), 443810768/
real(383107725),
927 4210684958LL/
real(1915538625),
928 101885255158LL/
real(54273594375LL), 387227992/
real(127702575),
929 1392441148867LL/
real(325641566250LL),
954 -28223/
real(18432), 3467/
real(7680),
955 -733437/
real(286720), 38081/
real(61440),
957 109167851/
real(82575360),
965 -637699/
real(85050), 2454416/
real(155925), -49877/
real(14175),
967 48124558/
real(1216215), -20989/
real(2835), -28244/
real(4455),
969 -16969807/
real(1091475), -2471888/
real(184275), 797222/
real(155925),
970 -1238578/
real(42525), 2199332/
real(225225),
971 87600385/
real(4540536),
973 -5946082372LL/
real(488462349375LL), 9708931/
real(1915538625),
974 7947332/
real(212837625), 11824/
real(467775), -1082/
real(14175),
976 190673521/
real(69780335625LL), 164328266/
real(1915538625),
977 39946703/
real(638512875), -16672/
real(155925), -338/
real(2025),
979 86402898356LL/
real(488462349375LL), 236067184/
real(1915538625),
980 -255454/
real(1563705), -101069/
real(467775), 1102/
real(14175),
982 110123070361LL/
real(488462349375LL), -98401826/
real(383107725),
983 -189032762/
real(638512875), 1786/
real(18711), 3161/
real(18900),
984 -200020620676LL/
real(488462349375LL), -802887278/
real(1915538625),
985 80274086/
real(638512875), 88868/
real(467775),
986 -296107325077LL/
real(488462349375LL), 66263486/
real(383107725),
987 880980241/
real(3831077250LL),
988 4433064236LL/
real(18091198125LL), 37151038/
real(127702575),
989 495248998393LL/
real(1302566265000LL),
1013 1155049/
real(737280), -4037/
real(7680), 283/
real(1536),
1014 -19465/
real(18432), 1301/
real(7680),
1015 -442269/
real(286720), 17089/
real(61440),
1016 198115/
real(516096),
1017 48689387/
real(82575360),
1028 -48965632/
real(4729725), -548752/
real(96525), 335882/
real(155925),
1029 -197456/
real(15795), 51368/
real(12285),
1030 1461335/
real(174636),
1032 -230886326/
real(6343666875LL), -189115382/
real(1915538625),
1033 216932/
real(2627625), 109042/
real(467775), -2102/
real(14175),
1035 -11696145869LL/
real(69780335625LL), 288456008/
real(1915538625),
1036 117952358/
real(638512875), -7256/
real(155925), 934/
real(14175),
1038 91546732346LL/
real(488462349375LL), 478700902/
real(1915538625),
1039 -7391576/
real(54729675), -25286/
real(66825), 922/
real(14175),
1041 218929662961LL/
real(488462349375LL), -67330724/
real(383107725),
1042 -67048172/
real(638512875), 268/
real(18711), 719/
real(4725),
1043 -129039188386LL/
real(488462349375LL), -117954842/
real(273648375),
1044 46774256/
real(638512875), 14354/
real(467775),
1045 -178084928947LL/
real(488462349375LL), 2114368/
real(34827975),
1046 253129538/
real(1915538625),
1047 6489189398LL/
real(54273594375LL), 13805944/
real(127702575),
1048 59983985827LL/
real(325641566250LL),
1057 109395/
real(262144),
1073 16617/
real(4096), -6037/
real(6144),
1075 -490925/
real(262144),
1078 -18975107/
real(50803200), 72161/
real(387072), 7891/
real(37800),
1080 148003883/
real(174182400), 13769/
real(28800), -1983433/
real(1935360),
1082 79682431/
real(79833600), -67102379/
real(29030400), 167603/
real(181440),
1084 -40176129013LL/
real(7664025600LL), 97445/
real(49896),
1085 6601661/
real(7257600), -179/
real(168), 49561/
real(161280),
1086 2605413599LL/
real(622702080), 14644087/
real(9123840),
1087 -3418889/
real(1995840), 34729/
real(80640),
1088 175214326799LL/
real(58118860800LL), -30705481/
real(10378368),
1089 212378941/
real(319334400),
1090 -16759934899LL/
real(3113510400LL), 1522256789/
real(1383782400),
1091 1424729850961LL/
real(743921418240LL),
1093 -375027460897LL/
real(125046361440000LL),
1094 7183403063LL/
real(560431872000LL), 12674323/
real(851350500),
1097 30410873385097LL/
real(2000741783040000LL),
1098 1117820213/
real(122594472000LL), -31621753811LL/
real(1307674368000LL),
1100 151567502183LL/
real(17863765920000LL),
1101 -116359346641LL/
real(3923023104000LL), -32844781/
real(1751349600),
1102 3746047/
real(119750400), 449/
real(28350), -1003/
real(45360),
1103 -317251099510901LL/
real(8002967132160000LL), -13060303/
real(766215450),
1104 10650637121LL/
real(326918592000LL), 629/
real(53460),
1105 -40457/
real(2419200),
1106 -2105440822861LL/
real(125046361440000LL),
1107 146875240637LL/
real(3923023104000LL), 205072597/
real(20432412000LL),
1108 -1800439/
real(119750400),
1109 91496147778023LL/
real(2000741783040000LL), 228253559/
real(24518894400LL),
1110 -59109051671LL/
real(3923023104000LL),
1111 126430355893LL/
real(13894040160000LL),
1112 -4255034947LL/
real(261534873600LL),
1113 -791820407649841LL/
real(42682491371520000LL),
1121 -1097407/
real(187110), 1077964/
real(155925), -24832/
real(14175),
1123 -12870194/
real(1216215), 1040/
real(567), 109598/
real(31185),
1125 -126463/
real(72765), -941912/
real(184275), 444337/
real(155925),
1126 3463678/
real(467775), -2405834/
real(675675),
1127 256663081/
real(56756700),
1138 210152/
real(4729725), -31232/
real(2027025), 149/
real(311850),
1139 30208/
real(6081075), -499/
real(225225),
1140 -68251/
real(113513400),
1151 40458083/
real(14189175), -299444/
real(675675), -90263/
real(155925),
1152 -3818498/
real(6081075), -8962/
real(12285),
1153 -4259027/
real(4365900),
1155 -7944359/
real(67737600), 5406467/
real(38707200), -96199/
real(604800),
1157 -24749483/
real(348364800), -51841/
real(1209600), 1118711/
real(3870720),
1159 6457463/
real(17740800), -9261899/
real(58060800), -5569/
real(90720),
1161 -324154477/
real(7664025600LL), -466511/
real(2494800),
1162 830251/
real(7257600), 11/
real(504), -4397/
real(161280),
1163 -22894433/
real(124540416), 8005831/
real(63866880), 108847/
real(3991680),
1165 2204645983LL/
real(12915302400LL), 16363163/
real(518918400),
1166 -20648693/
real(638668800),
1167 497323811/
real(12454041600LL), -219941297/
real(5535129600LL),
1168 -191773887257LL/
real(3719607091200LL),
1171 -17451293242LL/
real(488462349375LL), 308365186/
real(1915538625),
1172 -55271278/
real(212837625), 27128/
real(93555), -2312/
real(14175),
1174 -101520127208LL/
real(488462349375LL), 149984636/
real(1915538625),
1175 106691108/
real(638512875), -65864/
real(155925), 6079/
real(14175),
1177 10010741462LL/
real(37574026875LL), -99534832/
real(383107725),
1178 5921152/
real(54729675), -14246/
real(467775), 772/
real(14175),
1180 1615002539/
real(75148053750LL), -35573728/
real(273648375),
1181 75594328/
real(638512875), -5312/
real(467775), -167/
real(9450),
1182 -3358119706LL/
real(488462349375LL), 130601488/
real(1915538625),
1183 2837636/
real(638512875), -248/
real(13365),
1184 46771947158LL/
real(488462349375LL), -3196/
real(3553875),
1185 -34761247/
real(1915538625),
1186 -18696014/
real(18091198125LL), -2530364/
real(127702575),
1187 -14744861191LL/
real(651283132500LL),
1189 -88002076/
real(13956067125LL), -86728/
real(16372125),
1192 -2641983469LL/
real(488462349375LL), -895712/
real(147349125),
1193 -12467764/
real(212837625), -37192/
real(467775), -2482/
real(14175),
1195 8457703444LL/
real(488462349375LL), 240616/
real(4209975),
1196 100320856/
real(1915538625), 54968/
real(467775), -898/
real(14175),
1198 -4910552477LL/
real(97692469875LL), -4832848/
real(147349125),
1199 -5884124/
real(70945875), 24496/
real(467775), 6007/
real(14175),
1200 9393713176LL/
real(488462349375LL), 816824/
real(13395375),
1201 -839792/
real(19348875), -23356/
real(66825),
1202 -4532926649LL/
real(97692469875LL), 1980656/
real(54729675),
1203 570284222/
real(1915538625),
1204 -14848113968LL/
real(488462349375LL), -496894276/
real(1915538625),
1205 224557742191LL/
real(976924698750LL),
1207 29232878/
real(97692469875LL), -18484/
real(4343625), -70496/
real(8513505),
1209 -324943819/
real(488462349375LL), -4160804/
real(1915538625),
1212 -168643106/
real(488462349375LL), 237052/
real(383107725),
1213 -661844/
real(1915538625), 7052/
real(467775), 2/
real(14175),
1215 113042383/
real(97692469875LL), -2915326/
real(1915538625),
1216 1425778/
real(212837625), 934/
real(467775), -797/
real(56700),
1217 -558526274/
real(488462349375LL), 6064888/
real(1915538625),
1218 390088/
real(212837625), -3673/
real(467775),
1219 155665021/
real(97692469875LL), 41288/
real(29469825),
1220 -18623681/
real(3831077250LL),
1221 504234982/
real(488462349375LL), -6205669/
real(1915538625),
1222 -8913001661LL/
real(3907698795000LL),
1224 182466964/
real(8881133625LL), 53702182/
real(212837625),
1225 -4286228/
real(42567525), -193082/
real(467775), 778/
real(4725),
1227 367082779691LL/
real(488462349375LL), -32500616/
real(273648375),
1228 -61623938/
real(70945875), 92696/
real(467775), 12338/
real(14175),
1230 -42668482796LL/
real(488462349375LL), -663111728/
real(383107725),
1231 427003576/
real(1915538625), 612536/
real(467775), -1618/
real(14175),
1233 -327791986997LL/
real(97692469875LL), 421877252/
real(1915538625),
1234 427770788/
real(212837625), -8324/
real(66825), -5933/
real(14175),
1235 74612072536LL/
real(488462349375LL), 6024982024LL/
real(1915538625),
1236 -9153184/
real(70945875), -320044/
real(467775),
1237 489898512247LL/
real(97692469875LL), -46140784/
real(383107725),
1238 -1978771378/
real(1915538625),
1239 -42056042768LL/
real(488462349375LL), -2926201612LL/
real(1915538625),
1240 -2209250801969LL/
real(976924698750LL),
1242 39534358147LL/
real(2858202547200LL),
1243 -25359310709LL/
real(1743565824000LL), -9292991/
real(302702400),
1246 -13216941177599LL/
real(571640509440000LL),
1247 -14814966289LL/
real(245188944000LL), 36019108271LL/
real(871782912000LL),
1249 -27782109847927LL/
real(250092722880000LL),
1250 99871724539LL/
real(1569209241600LL), 3026004511LL/
real(30648618000LL),
1251 -4306823/
real(59875200), -2917/
real(56700), 4463/
real(90720),
1252 168979300892599LL/
real(1600593426432000LL),
1253 2123926699/
real(15324309000LL), -368661577/
real(4036032000LL),
1254 -102293/
real(1871100), 331799/
real(7257600),
1255 1959350112697LL/
real(9618950880000LL),
1256 -493031379277LL/
real(3923023104000LL), -875457073/
real(13621608000LL),
1257 11744233/
real(239500800),
1258 -145659994071373LL/
real(800296713216000LL),
1259 -793693009/
real(9807557760LL), 453002260127LL/
real(7846046208000LL),
1260 -53583096419057LL/
real(500185445760000LL),
1261 103558761539LL/
real(1426553856000LL),
1262 real(12272105438887727LL)/
real(128047474114560000LL),
1264 -64724382148LL/
real(97692469875LL), 16676974/
real(30405375),
1265 2706758/
real(42567525), -55222/
real(93555), 2458/
real(4725),
1267 85904355287LL/
real(37574026875LL), 158999572/
real(1915538625),
1268 -340492279/
real(212837625), 516944/
real(467775), 3413/
real(14175),
1270 2986003168LL/
real(37574026875LL), -7597644214LL/
real(1915538625),
1271 4430783356LL/
real(1915538625), 206834/
real(467775), -15958/
real(14175),
1273 -375566203/
real(39037950), 851209552/
real(174139875),
1274 62016436/
real(70945875), -832976/
real(467775), 16049/
real(28350),
1275 5106181018156LL/
real(488462349375LL), 3475643362LL/
real(1915538625),
1276 -651151712/
real(212837625), 15602/
real(18711),
1277 34581190223LL/
real(8881133625LL), -10656173804LL/
real(1915538625),
1278 2561772812LL/
real(1915538625),
1279 -5150169424688LL/
real(488462349375LL), 873037408/
real(383107725),
1280 7939103697617LL/
real(1953849397500LL),
1283 static const int ptrs[] = {
1284 0, 0, 20, 40, 60, 96, 132, 152, 152, 172, 192, 228, 264, 284, 304, 304,
1285 324, 360, 396, 416, 436, 456, 456, 492, 528, 564, 600, 636, 672, 672,
1286 708, 744, 780, 816, 852, 888, 888,
1289#error "Unsupported value for GEOGRAPHICLIB_AUXLATITUDE_ORDER"
1293 "Mismatch in size of ptrs array");
1294 static_assert(
sizeof(coeffs) /
sizeof(
real) ==
1299 "Mismatch in size of coeffs array");
1302 if (auxout == auxin)
1303 fill(_c +
Lmax * k, _c +
Lmax * (k + 1), 0);
1308 for (
int l = 0; l <
Lmax; ++l) {
1309 int m = (
Lmax - l - 1) / 2;
1315 for (
int l = 0; l <
Lmax; ++l) {
1316 int m = (
Lmax - l - 1);
1327 const real c[],
int K) {
1333 real u0 = 0, u1 = 0,
1334 x = 2 * (czeta - szeta) * (czeta + szeta);
1336 real t = x * u0 - u1 + c[--k];
1342 real f0 = sinp ? 2 * szeta * czeta : x / 2, fm1 = sinp ? 0 : 1;
1343 return f0 * u0 - fm1 * u1;
Header for the GeographicLib::AuxLatitude class.
Header for GeographicLib::EllipticFunction class.
GeographicLib::Math::real real
An accurate representation of angles.
Math::real radians() const
AuxAngle normalized() const
Math::real degrees() const
AuxAngle copyquadrant(const AuxAngle &p) const
Conversions between auxiliary latitudes.
AuxAngle Conformal(const AuxAngle &phi, real *diff=nullptr) const
AuxAngle Convert(int auxin, int auxout, const AuxAngle &zeta, bool exact=false) const
Math::real AuthalicRadiusSquared(bool exact=false) const
AuxAngle FromAuxiliary(int auxin, const AuxAngle &zeta, int *niter=nullptr) const
AuxAngle ToAuxiliary(int auxout, const AuxAngle &phi, real *diff=nullptr) const
Math::real RectifyingRadius(bool exact=false) const
AuxAngle Authalic(const AuxAngle &phi, real *diff=nullptr) const
AuxAngle Geocentric(const AuxAngle &phi, real *diff=nullptr) const
AuxAngle Parametric(const AuxAngle &phi, real *diff=nullptr) const
static Math::real Clenshaw(bool sinp, real szeta, real czeta, const real c[], int K)
static const AuxLatitude & WGS84()
AuxAngle Rectifying(const AuxAngle &phi, real *diff=nullptr) const
static real RG(real x, real y, real z)
static real RD(real x, real y, real z)
static real RF(real x, real y, real z)
Exception handling for GeographicLib.
static T polyval(int N, const T p[], T x)
Namespace for GeographicLib.
void swap(GeographicLib::NearestNeighbor< dist_t, pos_t, distfun_t > &a, GeographicLib::NearestNeighbor< dist_t, pos_t, distfun_t > &b)