23# pragma warning (disable: 4127 5055)
30 AuxLatitude::AuxLatitude(real a, real f)
31 : tol_( sqrt(numeric_limits<real>::epsilon()) )
32 , bmin_( log2(numeric_limits<real>::min()) )
33 , bmax_( log2(numeric_limits<real>::max()) )
38 , _e2( _f * (2 - _f) )
39 , _e2m1( _fm1 * _fm1 )
40 , _e12( _e2/(1 - _e2) )
43 , _e( sqrt(fabs(_e2)) )
44 , _e1( sqrt(fabs(_e12)) )
46 , _q( _e12p1 + (_f == 0 ? 1 : (_f > 0 ? asinh(_e1) : atan(_e)) / _e) )
48 if (!(isfinite(_a) && _a > 0))
50 if (!(isfinite(_b) && _b > 0))
53 numeric_limits<real>::quiet_NaN());
57 AuxLatitude::AuxLatitude(
const pair<real, real>& axes)
58 : tol_( sqrt(numeric_limits<
real>::epsilon()) )
59 , bmin_( log2(numeric_limits<
real>::min()) )
60 , bmax_( log2(numeric_limits<
real>::max()) )
63 , _f( (_a - _b) / _a )
65 , _e2( ((_a - _b) * (_a + _b)) / (_a * _a) )
66 , _e2m1( (_b * _b) / (_a * _a) )
67 , _e12( ((_a - _b) * (_a + _b)) / (_b * _b) )
68 , _e12p1( (_a * _a) / (_b * _b) )
69 , _n( (_a - _b) / (_a + _b) )
70 , _e( sqrt(fabs(_a - _b) * (_a + _b)) / _a )
71 , _e1( sqrt(fabs(_a - _b) * (_a + _b)) / _b )
73 , _q( _e12p1 + (_f == 0 ? 1 : (_f > 0 ? asinh(_e1) : atan(_e)) / _e) )
75 if (!(isfinite(_a) && _a > 0))
77 if (!(isfinite(_b) && _b > 0))
80 numeric_limits<real>::quiet_NaN());
90 if (diff) *diff = _fm1;
95 if (diff) *diff = _e2m1;
102 real sbeta = fabs(beta.
y()), cbeta = fabs(beta.
x());
103 real a = 1, b = _fm1, ka = _e2, kb = -_e12, ka1 = _e2m1, kb1 = _e12p1,
118 da2 = ka1 + ka * sb2,
125 + ka * sbeta / sqrt(da2) );
131 if (_f < 0) {
swap(smu, cmu);
swap(a, b); }
137 cmu = mu.
x(); cbeta = beta.
x();
138 *diff = _fm1 * b/mr *
Math::sq(cbeta / cmu) * (cbeta / cphi);
147 real tphi = fabs(phi.
tan()), tchi = tphi;
148 if ( !( !isfinite(tphi) || tphi == 0 || _f == 0 ) ) {
149 real scphi = sc(tphi),
150 sig = sinh(_e2 * atanhee(tphi) ),
153 tchi = tphi * scsig - sig * scphi;
161 real sigtphi = sig / tphi, tphimsig;
163 tphimsig = tphi - sig;
174 real em1 = _e2m1 / (1 + _e),
175 atanhs = asinh(tphi),
176 scbeta = sc(_fm1 * tphi),
177 scphibeta = sc(tphi) / scbeta,
178 atanhes = asinh(_e * tphi / scbeta),
179 t1 = (atanhs - _e * atanhes)/2,
180 t2 = asinh(em1 * (tphi * scphibeta)) / em1,
181 Dg = cosh((atanhs + _e * atanhes)/2) * (sinh(t1) / t1)
182 * ((atanhs + atanhes)/2 + (1 + _e)/2 * t2);
185 tchi = tphimsig * (1 + sigtphi) / (scsig + sigtphi * scphi);
194 *diff = _e2m1 * (cbeta / cchi) * (cbeta / cphi);
196 real ss = _f > 0 ? sinh(_e * asinh(_e1)) : sinh(-_e * atan(_e));
197 *diff = _f > 0 ? 1/( sc(ss) + ss ) : sc(ss) - ss;
205 real tphi = fabs(phi.
tan());
207 if ( !( !isfinite(tphi) || tphi == 0 || _f == 0 ) ) {
210 Dqm = (_q + qv) / (1 + fabs(phin.
y()));
211 xi =
AuxAngle( copysign(qv, phi.
y()), phin.
x() * sqrt(Dqp * Dqm) );
216 cxi = xi.normalized().x();
218 (2/_q) *
Math::sq(cbeta / cxi) * (cbeta / cxi) * (cbeta / phin.
x());
220 *diff = _e2m1 * sqrt(_q/2);
228 case GEOGRAPHIC:
if (diff) *diff = 1;
return phi;
break;
235 if (diff) *diff = numeric_limits<real>::quiet_NaN();
243 int n = 0;
if (niter) *niter = n;
253 case AUTHALIC : tphi *= cbrt(_fm1);
break;
258 real tzeta = fabs(zeta.
tan()), ltzeta = log2(tzeta);
259 if (!isfinite(ltzeta))
return zeta;
261 real ltphi = log2(tphi),
262 bmin = fmin(ltphi, bmin_), bmax = fmax(ltphi, bmax_);
263 for (
int sign = 0, osign = 0, ntrip = 0; n < numit_;) {
267 real tzeta1 = zeta1.
tan(), ltzeta1 = log2(tzeta1);
274 else if (tzeta1 > tzeta) {
281 real dltphi = -(ltzeta1 - ltzeta) / diff;
284 if (!(fabs(dltphi) >= tol_)) {
288 tphi -= (zeta1.
tan() - tzeta) / diff;
291 if ((sign * osign < 0 && n - ntrip > 2) ||
292 ltphi >= bmax || ltphi <= bmin) {
294 ltphi = (bmin + bmax) / 2;
298 if (niter) *niter = n;
305 int k = ind(auxout, auxin);
307 if (auxin == auxout)
return zeta;
309 if (auxin < 3 && auxout < 3)
311 return AuxAngle(zeta.
y() * real(pow(_fm1, auxout - auxin)), zeta.
x());
315 if ( isnan(_c[
Lmax * (k + 1) - 1]) ) fillcoeff(auxin, auxout, k);
341#if GEOGRAPHICLIB_AUXLATITUDE_ORDER == 4
342 static const real coeff[] = {1/real(64), 1/real(4), 1};
343#elif GEOGRAPHICLIB_AUXLATITUDE_ORDER == 6
344 static const real coeff[] = {1/real(256), 1/real(64), 1/real(4), 1};
345#elif GEOGRAPHICLIB_AUXLATITUDE_ORDER == 8
346 static const real coeff[] = {
347 25/real(16384), 1/real(256), 1/real(64), 1/real(4), 1
350#error "Unsupported value for GEOGRAPHICLIB_AUXLATITUDE_ORDER"
377#if GEOGRAPHICLIB_AUXLATITUDE_ORDER == 4
378 static const real coeff[] = {
379 4/real(315), 4/real(105), 4/real(15), -1/real(3), 1
381#elif GEOGRAPHICLIB_AUXLATITUDE_ORDER == 6
382 static const real coeff[] = {
383 4/real(1287), 4/real(693), 4/real(315), 4/real(105), 4/real(15),
386#elif GEOGRAPHICLIB_AUXLATITUDE_ORDER == 8
387 static const real coeff[] = {
388 4/real(3315), 4/real(2145), 4/real(1287), 4/real(693), 4/real(315),
389 4/real(105), 4/real(15), -1/real(3), 1
392#error "Unsupported value for GEOGRAPHICLIB_AUXLATITUDE_ORDER"
401 real s = _f <= 0 ? sn(tphi) : sn(_fm1 * tphi);
404 (_f < 0 ? atan( _e * s ) : asinh( _e1 * s )) / _e;
409 real scbeta = sc(_fm1 * tphi);
410 return atanhee(tphi) + (tphi / scbeta) * (sc(tphi) / scbeta);
414 real scphi = sc(tphi), sphi = sn(tphi),
416 d = tphi > 0 ? 1 / (scphi * scphi * (1 + sphi)) : 1 - sphi;
419 return (_q - q(tphi)) / d;
429 real scbeta = sc(_fm1 * tphi);
430 return (_f == 0 ? 1 :
431 (_f > 0 ? asinh(_e1 * d * scphi / scbeta) :
432 atan(_e * d / (1 - _e2 * sphi))) / (_e * d) ) +
434 ((scphi + _e2 * tphi) / (_e2m1 * scbeta)) * (scphi / scbeta) :
435 (1 + _e2 * sphi) / ((1 - _e2 * sphi*sphi) * _e2m1) );
440 void AuxLatitude::fillcoeff(
int auxin,
int auxout,
int k)
const {
441#if GEOGRAPHICLIB_AUXLATITUDE_ORDER == 4
442 static const real coeffs[] = {
546 -40457/
real(2419200),
591 -2917/
real(56700), 4463/
real(90720),
592 331799/
real(7257600),
600 static const int ptrs[] = {
601 0, 0, 6, 12, 18, 28, 38, 44, 44, 50, 56, 66, 76, 82, 88, 88, 94, 104,
602 114, 120, 126, 132, 132, 142, 152, 162, 172, 182, 192, 192, 202, 212,
603 222, 232, 242, 252, 252,
605#elif GEOGRAPHICLIB_AUXLATITUDE_ORDER == 6
606 static const real coeffs[] = {
637 28112932/
real(212837625), 60136/
real(467775), -2582/
real(14175),
639 251310128/
real(638512875), -21016/
real(51975), -11966/
real(14175),
641 -8797648/
real(10945935), -94388/
real(66825), 3802/
real(14175),
643 -1472637812/
real(638512875), 41072/
real(93555), 6059/
real(4725),
644 455935736/
real(638512875), 768272/
real(467775),
645 4210684958LL/
real(1915538625),
676 7947332/
real(212837625), 11824/
real(467775), -1082/
real(14175),
678 39946703/
real(638512875), -16672/
real(155925), -338/
real(2025),
680 -255454/
real(1563705), -101069/
real(467775), 1102/
real(14175),
682 -189032762/
real(638512875), 1786/
real(18711), 3161/
real(18900),
683 80274086/
real(638512875), 88868/
real(467775),
684 880980241/
real(3831077250LL),
715 216932/
real(2627625), 109042/
real(467775), -2102/
real(14175),
717 117952358/
real(638512875), -7256/
real(155925), 934/
real(14175),
719 -7391576/
real(54729675), -25286/
real(66825), 922/
real(14175),
721 -67048172/
real(638512875), 268/
real(18711), 719/
real(4725),
722 46774256/
real(638512875), 14354/
real(467775),
723 253129538/
real(1915538625),
752 6601661/
real(7257600), -179/
real(168), 49561/
real(161280),
753 -3418889/
real(1995840), 34729/
real(80640),
754 212378941/
real(319334400),
756 12674323/
real(851350500), -384229/
real(14968800), -1609/
real(28350),
758 -31621753811LL/
real(1307674368000LL), -431/
real(17325),
760 -32844781/
real(1751349600), 3746047/
real(119750400), 449/
real(28350),
762 10650637121LL/
real(326918592000LL), 629/
real(53460),
763 -40457/
real(2419200),
764 205072597/
real(20432412000LL), -1800439/
real(119750400),
765 -59109051671LL/
real(3923023104000LL),
794 108847/
real(3991680), -4583/
real(161280),
795 -20648693/
real(638668800),
798 -55271278/
real(212837625), 27128/
real(93555), -2312/
real(14175),
800 106691108/
real(638512875), -65864/
real(155925), 6079/
real(14175),
802 5921152/
real(54729675), -14246/
real(467775), 772/
real(14175),
804 75594328/
real(638512875), -5312/
real(467775), -167/
real(9450),
805 2837636/
real(638512875), -248/
real(13365),
806 -34761247/
real(1915538625),
810 -12467764/
real(212837625), -37192/
real(467775), -2482/
real(14175),
812 100320856/
real(1915538625), 54968/
real(467775), -898/
real(14175),
814 -5884124/
real(70945875), 24496/
real(467775), 6007/
real(14175),
815 -839792/
real(19348875), -23356/
real(66825),
816 570284222/
real(1915538625),
822 -661844/
real(1915538625), 7052/
real(467775), 2/
real(14175),
824 1425778/
real(212837625), 934/
real(467775), -797/
real(56700),
825 390088/
real(212837625), -3673/
real(467775),
826 -18623681/
real(3831077250LL),
828 -4286228/
real(42567525), -193082/
real(467775), 778/
real(4725),
830 -61623938/
real(70945875), 92696/
real(467775), 12338/
real(14175),
832 427003576/
real(1915538625), 612536/
real(467775), -1618/
real(14175),
834 427770788/
real(212837625), -8324/
real(66825), -5933/
real(14175),
835 -9153184/
real(70945875), -320044/
real(467775),
836 -1978771378/
real(1915538625),
838 -9292991/
real(302702400), 7764059/
real(239500800), 1297/
real(18900),
840 36019108271LL/
real(871782912000LL), 35474/
real(467775),
842 3026004511LL/
real(30648618000LL), -4306823/
real(59875200),
843 -2917/
real(56700), 4463/
real(90720),
844 -368661577/
real(4036032000LL), -102293/
real(1871100),
845 331799/
real(7257600),
846 -875457073/
real(13621608000LL), 11744233/
real(239500800),
847 453002260127LL/
real(7846046208000LL),
849 2706758/
real(42567525), -55222/
real(93555), 2458/
real(4725),
851 -340492279/
real(212837625), 516944/
real(467775), 3413/
real(14175),
853 4430783356LL/
real(1915538625), 206834/
real(467775), -15958/
real(14175),
855 62016436/
real(70945875), -832976/
real(467775), 16049/
real(28350),
856 -651151712/
real(212837625), 15602/
real(18711),
857 2561772812LL/
real(1915538625),
860 static const int ptrs[] = {
861 0, 0, 12, 24, 36, 57, 78, 90, 90, 102, 114, 135, 156, 168, 180, 180, 192,
862 213, 234, 246, 258, 270, 270, 291, 312, 333, 354, 375, 396, 396, 417,
863 438, 459, 480, 501, 522, 522,
865#elif GEOGRAPHICLIB_AUXLATITUDE_ORDER == 8
866 static const real coeffs[] = {
890 2514467/
real(245760), -15543/
real(2560), 1097/
real(512),
892 -5962461/
real(286720), 293393/
real(61440),
893 6459601/
real(860160),
894 332287993/
real(27525120),
900 -2363828/
real(31185), 98738/
real(14175), 73814/
real(2835),
902 14416399/
real(935550), 11763988/
real(155925), -399572/
real(14175),
904 258316372/
real(1216215), -2046082/
real(31185), -144838/
real(6237),
906 -2155215124LL/
real(14189175), -115444544/
real(2027025),
908 -170079376/
real(1216215), 38341552/
real(675675),
909 1383243703/
real(11351340),
911 -1683291094/
real(37574026875LL), 22947844/
real(1915538625),
912 28112932/
real(212837625), 60136/
real(467775), -2582/
real(14175),
914 -14351220203LL/
real(488462349375LL), 1228352/
real(3007125),
915 251310128/
real(638512875), -21016/
real(51975), -11966/
real(14175),
917 505559334506LL/
real(488462349375LL), 138128272/
real(147349125),
918 -8797648/
real(10945935), -94388/
real(66825), 3802/
real(14175),
920 973080708361LL/
real(488462349375LL), -45079184/
real(29469825),
921 -1472637812/
real(638512875), 41072/
real(93555), 6059/
real(4725),
922 -1385645336626LL/
real(488462349375LL), -550000184/
real(147349125),
923 455935736/
real(638512875), 768272/
real(467775),
924 -2939205114427LL/
real(488462349375LL), 443810768/
real(383107725),
925 4210684958LL/
real(1915538625),
926 101885255158LL/
real(54273594375LL), 387227992/
real(127702575),
927 1392441148867LL/
real(325641566250LL),
952 -28223/
real(18432), 3467/
real(7680),
953 -733437/
real(286720), 38081/
real(61440),
955 109167851/
real(82575360),
963 -637699/
real(85050), 2454416/
real(155925), -49877/
real(14175),
965 48124558/
real(1216215), -20989/
real(2835), -28244/
real(4455),
967 -16969807/
real(1091475), -2471888/
real(184275), 797222/
real(155925),
968 -1238578/
real(42525), 2199332/
real(225225),
969 87600385/
real(4540536),
971 -5946082372LL/
real(488462349375LL), 9708931/
real(1915538625),
972 7947332/
real(212837625), 11824/
real(467775), -1082/
real(14175),
974 190673521/
real(69780335625LL), 164328266/
real(1915538625),
975 39946703/
real(638512875), -16672/
real(155925), -338/
real(2025),
977 86402898356LL/
real(488462349375LL), 236067184/
real(1915538625),
978 -255454/
real(1563705), -101069/
real(467775), 1102/
real(14175),
980 110123070361LL/
real(488462349375LL), -98401826/
real(383107725),
981 -189032762/
real(638512875), 1786/
real(18711), 3161/
real(18900),
982 -200020620676LL/
real(488462349375LL), -802887278/
real(1915538625),
983 80274086/
real(638512875), 88868/
real(467775),
984 -296107325077LL/
real(488462349375LL), 66263486/
real(383107725),
985 880980241/
real(3831077250LL),
986 4433064236LL/
real(18091198125LL), 37151038/
real(127702575),
987 495248998393LL/
real(1302566265000LL),
1011 1155049/
real(737280), -4037/
real(7680), 283/
real(1536),
1012 -19465/
real(18432), 1301/
real(7680),
1013 -442269/
real(286720), 17089/
real(61440),
1014 198115/
real(516096),
1015 48689387/
real(82575360),
1026 -48965632/
real(4729725), -548752/
real(96525), 335882/
real(155925),
1027 -197456/
real(15795), 51368/
real(12285),
1028 1461335/
real(174636),
1030 -230886326/
real(6343666875LL), -189115382/
real(1915538625),
1031 216932/
real(2627625), 109042/
real(467775), -2102/
real(14175),
1033 -11696145869LL/
real(69780335625LL), 288456008/
real(1915538625),
1034 117952358/
real(638512875), -7256/
real(155925), 934/
real(14175),
1036 91546732346LL/
real(488462349375LL), 478700902/
real(1915538625),
1037 -7391576/
real(54729675), -25286/
real(66825), 922/
real(14175),
1039 218929662961LL/
real(488462349375LL), -67330724/
real(383107725),
1040 -67048172/
real(638512875), 268/
real(18711), 719/
real(4725),
1041 -129039188386LL/
real(488462349375LL), -117954842/
real(273648375),
1042 46774256/
real(638512875), 14354/
real(467775),
1043 -178084928947LL/
real(488462349375LL), 2114368/
real(34827975),
1044 253129538/
real(1915538625),
1045 6489189398LL/
real(54273594375LL), 13805944/
real(127702575),
1046 59983985827LL/
real(325641566250LL),
1055 109395/
real(262144),
1071 16617/
real(4096), -6037/
real(6144),
1073 -490925/
real(262144),
1076 -18975107/
real(50803200), 72161/
real(387072), 7891/
real(37800),
1078 148003883/
real(174182400), 13769/
real(28800), -1983433/
real(1935360),
1080 79682431/
real(79833600), -67102379/
real(29030400), 167603/
real(181440),
1082 -40176129013LL/
real(7664025600LL), 97445/
real(49896),
1083 6601661/
real(7257600), -179/
real(168), 49561/
real(161280),
1084 2605413599LL/
real(622702080), 14644087/
real(9123840),
1085 -3418889/
real(1995840), 34729/
real(80640),
1086 175214326799LL/
real(58118860800LL), -30705481/
real(10378368),
1087 212378941/
real(319334400),
1088 -16759934899LL/
real(3113510400LL), 1522256789/
real(1383782400),
1089 1424729850961LL/
real(743921418240LL),
1091 -375027460897LL/
real(125046361440000LL),
1092 7183403063LL/
real(560431872000LL), 12674323/
real(851350500),
1095 30410873385097LL/
real(2000741783040000LL),
1096 1117820213/
real(122594472000LL), -31621753811LL/
real(1307674368000LL),
1098 151567502183LL/
real(17863765920000LL),
1099 -116359346641LL/
real(3923023104000LL), -32844781/
real(1751349600),
1100 3746047/
real(119750400), 449/
real(28350), -1003/
real(45360),
1101 -317251099510901LL/
real(8002967132160000LL), -13060303/
real(766215450),
1102 10650637121LL/
real(326918592000LL), 629/
real(53460),
1103 -40457/
real(2419200),
1104 -2105440822861LL/
real(125046361440000LL),
1105 146875240637LL/
real(3923023104000LL), 205072597/
real(20432412000LL),
1106 -1800439/
real(119750400),
1107 91496147778023LL/
real(2000741783040000LL), 228253559/
real(24518894400LL),
1108 -59109051671LL/
real(3923023104000LL),
1109 126430355893LL/
real(13894040160000LL),
1110 -4255034947LL/
real(261534873600LL),
1111 -791820407649841LL/
real(42682491371520000LL),
1119 -1097407/
real(187110), 1077964/
real(155925), -24832/
real(14175),
1121 -12870194/
real(1216215), 1040/
real(567), 109598/
real(31185),
1123 -126463/
real(72765), -941912/
real(184275), 444337/
real(155925),
1124 3463678/
real(467775), -2405834/
real(675675),
1125 256663081/
real(56756700),
1136 210152/
real(4729725), -31232/
real(2027025), 149/
real(311850),
1137 30208/
real(6081075), -499/
real(225225),
1138 -68251/
real(113513400),
1149 40458083/
real(14189175), -299444/
real(675675), -90263/
real(155925),
1150 -3818498/
real(6081075), -8962/
real(12285),
1151 -4259027/
real(4365900),
1153 -7944359/
real(67737600), 5406467/
real(38707200), -96199/
real(604800),
1155 -24749483/
real(348364800), -51841/
real(1209600), 1118711/
real(3870720),
1157 6457463/
real(17740800), -9261899/
real(58060800), -5569/
real(90720),
1159 -324154477/
real(7664025600LL), -466511/
real(2494800),
1160 830251/
real(7257600), 11/
real(504), -4397/
real(161280),
1161 -22894433/
real(124540416), 8005831/
real(63866880), 108847/
real(3991680),
1163 2204645983LL/
real(12915302400LL), 16363163/
real(518918400),
1164 -20648693/
real(638668800),
1165 497323811/
real(12454041600LL), -219941297/
real(5535129600LL),
1166 -191773887257LL/
real(3719607091200LL),
1169 -17451293242LL/
real(488462349375LL), 308365186/
real(1915538625),
1170 -55271278/
real(212837625), 27128/
real(93555), -2312/
real(14175),
1172 -101520127208LL/
real(488462349375LL), 149984636/
real(1915538625),
1173 106691108/
real(638512875), -65864/
real(155925), 6079/
real(14175),
1175 10010741462LL/
real(37574026875LL), -99534832/
real(383107725),
1176 5921152/
real(54729675), -14246/
real(467775), 772/
real(14175),
1178 1615002539/
real(75148053750LL), -35573728/
real(273648375),
1179 75594328/
real(638512875), -5312/
real(467775), -167/
real(9450),
1180 -3358119706LL/
real(488462349375LL), 130601488/
real(1915538625),
1181 2837636/
real(638512875), -248/
real(13365),
1182 46771947158LL/
real(488462349375LL), -3196/
real(3553875),
1183 -34761247/
real(1915538625),
1184 -18696014/
real(18091198125LL), -2530364/
real(127702575),
1185 -14744861191LL/
real(651283132500LL),
1187 -88002076/
real(13956067125LL), -86728/
real(16372125),
1190 -2641983469LL/
real(488462349375LL), -895712/
real(147349125),
1191 -12467764/
real(212837625), -37192/
real(467775), -2482/
real(14175),
1193 8457703444LL/
real(488462349375LL), 240616/
real(4209975),
1194 100320856/
real(1915538625), 54968/
real(467775), -898/
real(14175),
1196 -4910552477LL/
real(97692469875LL), -4832848/
real(147349125),
1197 -5884124/
real(70945875), 24496/
real(467775), 6007/
real(14175),
1198 9393713176LL/
real(488462349375LL), 816824/
real(13395375),
1199 -839792/
real(19348875), -23356/
real(66825),
1200 -4532926649LL/
real(97692469875LL), 1980656/
real(54729675),
1201 570284222/
real(1915538625),
1202 -14848113968LL/
real(488462349375LL), -496894276/
real(1915538625),
1203 224557742191LL/
real(976924698750LL),
1205 29232878/
real(97692469875LL), -18484/
real(4343625), -70496/
real(8513505),
1207 -324943819/
real(488462349375LL), -4160804/
real(1915538625),
1210 -168643106/
real(488462349375LL), 237052/
real(383107725),
1211 -661844/
real(1915538625), 7052/
real(467775), 2/
real(14175),
1213 113042383/
real(97692469875LL), -2915326/
real(1915538625),
1214 1425778/
real(212837625), 934/
real(467775), -797/
real(56700),
1215 -558526274/
real(488462349375LL), 6064888/
real(1915538625),
1216 390088/
real(212837625), -3673/
real(467775),
1217 155665021/
real(97692469875LL), 41288/
real(29469825),
1218 -18623681/
real(3831077250LL),
1219 504234982/
real(488462349375LL), -6205669/
real(1915538625),
1220 -8913001661LL/
real(3907698795000LL),
1222 182466964/
real(8881133625LL), 53702182/
real(212837625),
1223 -4286228/
real(42567525), -193082/
real(467775), 778/
real(4725),
1225 367082779691LL/
real(488462349375LL), -32500616/
real(273648375),
1226 -61623938/
real(70945875), 92696/
real(467775), 12338/
real(14175),
1228 -42668482796LL/
real(488462349375LL), -663111728/
real(383107725),
1229 427003576/
real(1915538625), 612536/
real(467775), -1618/
real(14175),
1231 -327791986997LL/
real(97692469875LL), 421877252/
real(1915538625),
1232 427770788/
real(212837625), -8324/
real(66825), -5933/
real(14175),
1233 74612072536LL/
real(488462349375LL), 6024982024LL/
real(1915538625),
1234 -9153184/
real(70945875), -320044/
real(467775),
1235 489898512247LL/
real(97692469875LL), -46140784/
real(383107725),
1236 -1978771378/
real(1915538625),
1237 -42056042768LL/
real(488462349375LL), -2926201612LL/
real(1915538625),
1238 -2209250801969LL/
real(976924698750LL),
1240 39534358147LL/
real(2858202547200LL),
1241 -25359310709LL/
real(1743565824000LL), -9292991/
real(302702400),
1244 -13216941177599LL/
real(571640509440000LL),
1245 -14814966289LL/
real(245188944000LL), 36019108271LL/
real(871782912000LL),
1247 -27782109847927LL/
real(250092722880000LL),
1248 99871724539LL/
real(1569209241600LL), 3026004511LL/
real(30648618000LL),
1249 -4306823/
real(59875200), -2917/
real(56700), 4463/
real(90720),
1250 168979300892599LL/
real(1600593426432000LL),
1251 2123926699/
real(15324309000LL), -368661577/
real(4036032000LL),
1252 -102293/
real(1871100), 331799/
real(7257600),
1253 1959350112697LL/
real(9618950880000LL),
1254 -493031379277LL/
real(3923023104000LL), -875457073/
real(13621608000LL),
1255 11744233/
real(239500800),
1256 -145659994071373LL/
real(800296713216000LL),
1257 -793693009/
real(9807557760LL), 453002260127LL/
real(7846046208000LL),
1258 -53583096419057LL/
real(500185445760000LL),
1259 103558761539LL/
real(1426553856000LL),
1260 real(12272105438887727LL)/
real(128047474114560000LL),
1262 -64724382148LL/
real(97692469875LL), 16676974/
real(30405375),
1263 2706758/
real(42567525), -55222/
real(93555), 2458/
real(4725),
1265 85904355287LL/
real(37574026875LL), 158999572/
real(1915538625),
1266 -340492279/
real(212837625), 516944/
real(467775), 3413/
real(14175),
1268 2986003168LL/
real(37574026875LL), -7597644214LL/
real(1915538625),
1269 4430783356LL/
real(1915538625), 206834/
real(467775), -15958/
real(14175),
1271 -375566203/
real(39037950), 851209552/
real(174139875),
1272 62016436/
real(70945875), -832976/
real(467775), 16049/
real(28350),
1273 5106181018156LL/
real(488462349375LL), 3475643362LL/
real(1915538625),
1274 -651151712/
real(212837625), 15602/
real(18711),
1275 34581190223LL/
real(8881133625LL), -10656173804LL/
real(1915538625),
1276 2561772812LL/
real(1915538625),
1277 -5150169424688LL/
real(488462349375LL), 873037408/
real(383107725),
1278 7939103697617LL/
real(1953849397500LL),
1281 static const int ptrs[] = {
1282 0, 0, 20, 40, 60, 96, 132, 152, 152, 172, 192, 228, 264, 284, 304, 304,
1283 324, 360, 396, 416, 436, 456, 456, 492, 528, 564, 600, 636, 672, 672,
1284 708, 744, 780, 816, 852, 888, 888,
1287#error "Unsupported value for GEOGRAPHICLIB_AUXLATITUDE_ORDER"
1291 "Mismatch in size of ptrs array");
1292 static_assert(
sizeof(coeffs) /
sizeof(
real) ==
1297 "Mismatch in size of coeffs array");
1300 if (auxout == auxin)
1301 fill(_c +
Lmax * k, _c +
Lmax * (k + 1), 0);
1306 for (
int l = 0; l <
Lmax; ++l) {
1307 int m = (
Lmax - l - 1) / 2;
1313 for (
int l = 0; l <
Lmax; ++l) {
1314 int m = (
Lmax - l - 1);
1325 const real c[],
int K) {
1331 real u0 = 0, u1 = 0,
1332 x = 2 * (czeta - szeta) * (czeta + szeta);
1334 real t = x * u0 - u1 + c[--k];
1340 real f0 = sinp ? 2 * szeta * czeta : x / 2, fm1 = sinp ? 0 : 1;
1341 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)