35# pragma warning (disable: 4701 4127 5055 5054)
43 : maxit2_(maxit1_ +
Math::digits() + 10)
47 , tiny_(sqrt(numeric_limits<real>::min()))
48 , tol0_(numeric_limits<real>::epsilon())
55 , xthresh_(1000 * tol2_)
60 , _ep2(_e2 /
Math::sq(_f1))
68 (_f > 0 ? asinh(sqrt(_ep2)) : atan(sqrt(-_e2))) /
80 , _etol2(real(0.1) * tol2_ /
81 sqrt( fmax(real(0.001), fabs(_f)) * fmin(real(1), 1 - _f/2) / 2 ))
83 if (!(isfinite(_a) && _a > 0))
85 if (!(isfinite(_b) && _b > 0))
299 static const int ndiv = 100;
319#if GEOGRAPHICLIB_PRECISION == 1
320 static const unsigned char narr[2*ndiv+1] = {
321 19,18,16,15,14,13,13,13,12,12,11,11,11,11,10,10,10,10,9,9,9,9,9,9,9,9,8,
322 8,8,8,8,8,8,7,7,7,7,7,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,
323 5,5,5,5,5,5,5,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,
324 2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,
325 4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,
326 6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8
328#elif GEOGRAPHICLIB_PRECISION == 2
329 static const unsigned char narr[2*ndiv+1] = {
330 22,21,19,18,17,17,16,15,15,15,14,14,14,13,13,13,13,13,13,12,12,12,12,12,
331 12,11,11,11,11,11,11,11,11,11,11,10,10,10,10,10,10,10,10,9,9,9,9,9,9,9,9,
332 9,9,9,9,9,9,8,8,8,8,8,8,8,8,8,8,7,7,7,7,7,7,7,7,7,7,7,7,7,7,6,6,6,6,6,6,
333 6,6,5,5,5,5,5,5,5,5,4,4,3,2,3,4,4,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,7,7,
334 7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,
335 9,9,9,9,9,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,12,12,
336 12,12,12,13,13,13,13,13,14,14,15,15,16,17,18,19
338#elif GEOGRAPHICLIB_PRECISION == 3
339 static const unsigned char narr[2*ndiv+1] = {
340 23,22,20,19,18,17,17,16,16,15,15,15,15,14,14,14,14,13,13,13,13,13,13,13,
341 12,12,12,12,12,12,11,11,11,11,11,11,11,11,11,11,11,10,10,10,10,10,10,10,
342 10,10,10,9,9,9,9,9,9,9,9,9,9,9,9,9,9,8,8,8,8,8,8,8,8,8,8,8,7,7,7,7,7,7,7,
343 7,7,7,7,7,6,6,6,6,6,6,5,5,5,5,5,4,2,4,5,5,5,5,5,6,6,6,6,6,6,6,7,7,7,7,7,
344 7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
345 10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,12,12,12,
346 12,12,12,13,13,13,13,13,13,13,14,14,14,15,15,15,16,16,17,18,19,20
348#elif GEOGRAPHICLIB_PRECISION == 4
349 static const unsigned char narr[2*ndiv+1] = {
350 25,24,22,21,20,19,19,18,18,17,17,17,17,16,16,16,15,15,15,15,15,15,15,14,
351 14,14,14,14,14,13,13,13,13,13,13,13,13,13,13,13,13,12,12,12,12,12,12,12,
352 12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,10,10,10,10,10,10,
353 10,10,10,9,9,9,9,9,9,9,9,9,9,9,9,9,8,8,8,8,8,8,7,7,7,7,7,6,2,6,7,7,7,7,7,
354 8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,
355 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,
356 12,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,15,15,15,15,15,15,
357 15,16,16,16,17,17,17,17,18,18,19,20,21,23,24
359#elif GEOGRAPHICLIB_PRECISION == 5
360 static const unsigned char narr[2*ndiv+1] = {
361 27,26,24,23,22,22,21,21,20,20,20,19,19,19,19,18,18,18,18,18,17,17,17,17,
362 17,17,17,17,16,16,16,16,16,16,16,15,15,15,15,15,15,15,15,15,15,15,15,14,
363 14,14,14,14,14,14,14,14,14,14,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
364 12,12,12,12,12,12,12,12,12,12,11,11,11,11,11,11,11,11,11,11,11,10,10,10,
365 10,9,9,9,2,9,9,9,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,12,12,12,
366 12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,
367 14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16,
368 16,16,16,16,17,17,17,17,17,17,17,17,18,18,18,18,18,19,19,19,19,20,20,21,
372#error "Bad value for GEOGRAPHICLIB_PRECISION"
375 int j = ndiv + int(n < 0 ? floor(n) : ceil(n));
376 int N = int(narr[j]);
378 N = (N % 2 == 0 ? 2 : 3) * (1 << (N/2));
379#if GEOGRAPHICLIB_PRECISION == 5
384 while (N < M) N = N % 3 == 0 ? 4*N/3 : 3*N/2;
398 unsigned caps)
const {
403 bool arcmode, real s12_a12,
405 real& lat2, real& lon2, real& azi2,
406 real& s12, real& m12,
407 real& M12, real& M21,
413 GenPosition(arcmode, s12_a12, outmask,
414 lat2, lon2, azi2, s12, m12, M12, M21, S12);
419 bool arcmode, real s12_a12,
420 unsigned caps)
const {
428 caps, arcmode, s12_a12);
433 unsigned caps)
const {
439 unsigned caps)
const {
445 unsigned outmask,
real& s12,
456 int lonsign = signbit(lon12) ? -1 : 1;
457 lon12 *= lonsign; lon12s *= lonsign;
464 lon12s = (
Math::hd - lon12) - lon12s;
471 int swapp = fabs(lat1) < fabs(lat2) || isnan(lat2) ? -1 : 1;
477 int latsign = signbit(lat1) ? 1 : -1;
492 real sbet1, cbet1, sbet2, cbet2, s12x, m12x;
495 EllipticFunction E(-_ep2);
500 Math::norm(sbet1, cbet1); cbet1 = fmax(tiny_, cbet1);
504 Math::norm(sbet2, cbet2); cbet2 = fmax(tiny_, cbet2);
514 if (cbet1 < -sbet1) {
516 sbet2 = copysign(sbet1, sbet2);
518 if (fabs(sbet2) == -sbet1)
523 dn1 = (_f >= 0 ? sqrt(1 + _ep2 *
Math::sq(sbet1)) :
524 sqrt(1 - _e2 * Math::sq(cbet1)) / _f1),
525 dn2 = (_f >= 0 ? sqrt(1 + _ep2 * Math::sq(sbet2)) :
526 sqrt(1 - _e2 * Math::sq(cbet2)) / _f1);
530 bool meridian = lat1 == -
Math::qd || slam12 == 0;
537 calp1 = clam12; salp1 = slam12;
538 calp2 = 1; salp2 = 0;
542 ssig1 = sbet1, csig1 = calp1 * cbet1,
543 ssig2 = sbet2, csig2 = calp2 * cbet2;
546 sig12 = atan2(fmax(
real(0), csig1 * ssig2 - ssig1 * csig2),
547 csig1 * csig2 + ssig1 * ssig2);
550 Lengths(E, sig12, ssig1, csig1, dn1, ssig2, csig2, dn2,
552 s12x, m12x, dummy, M12, M21);
561 if (sig12 < 1 || m12x >= 0) {
563 if (sig12 < 3 * tiny_ ||
565 (sig12 < tol0_ && (s12x < 0 || m12x < 0)))
566 sig12 = m12x = s12x = 0;
576 real omg12 = 0, somg12 = 2, comg12 = 0;
579 (_f <= 0 || lon12s >= _f *
Math::hd)) {
582 calp1 = calp2 = 0; salp1 = salp2 = 1;
584 sig12 = omg12 = lam12 / _f1;
585 m12x = _b * sin(sig12);
587 M12 = M21 = cos(sig12);
590 }
else if (!meridian) {
597 sig12 = InverseStart(E, sbet1, cbet1, dn1, sbet2, cbet2, dn2,
598 lam12, slam12, clam12,
599 salp1, calp1, salp2, calp2, dnm);
603 s12x = sig12 * _b * dnm;
604 m12x =
Math::sq(dnm) * _b * sin(sig12 / dnm);
606 M12 = M21 = cos(sig12 / dnm);
608 omg12 = lam12 / (_f1 * dnm);
624 real ssig1 = 0, csig1 = 0, ssig2 = 0, csig2 = 0, domg12 = 0;
627 real salp1a = tiny_, calp1a = 1, salp1b = tiny_, calp1b = -1;
628 for (
bool tripn =
false, tripb =
false;; ++numit) {
651 real v = Lambda12(sbet1, cbet1, dn1, sbet2, cbet2, dn2, salp1, calp1,
653 salp2, calp2, sig12, ssig1, csig1, ssig2, csig2,
654 E, domg12, numit < maxit1_, dv);
657 !(fabs(v) >= (tripn ? 8 : 1) * tol0_) ||
662 if (v > 0 && (numit > maxit1_ || calp1/salp1 > calp1b/salp1b))
663 { salp1b = salp1; calp1b = calp1; }
664 else if (v < 0 && (numit > maxit1_ || calp1/salp1 < calp1a/salp1a))
665 { salp1a = salp1; calp1a = calp1; }
666 if (numit < maxit1_ && dv > 0) {
674 sdalp1 = sin(dalp1), cdalp1 = cos(dalp1),
675 nsalp1 = salp1 * cdalp1 + calp1 * sdalp1;
677 calp1 = calp1 * cdalp1 - salp1 * sdalp1;
683 tripn = fabs(v) <= 16 * tol0_;
696 salp1 = (salp1a + salp1b)/2;
697 calp1 = (calp1a + calp1b)/2;
700 tripb = (fabs(salp1a - salp1) + (calp1a - calp1) < tolb_ ||
701 fabs(salp1 - salp1b) + (calp1 - calp1b) < tolb_);
705 Lengths(E, sig12, ssig1, csig1, dn1, ssig2, csig2, dn2,
706 cbet1, cbet2, outmask, s12x, m12x, dummy, M12, M21);
711 if (outmask &
AREA) {
713 real sdomg12 = sin(domg12), cdomg12 = cos(domg12);
714 somg12 = slam12 * cdomg12 - clam12 * sdomg12;
715 comg12 = clam12 * cdomg12 + slam12 * sdomg12;
721 s12 =
real(0) + s12x;
724 m12 =
real(0) + m12x;
726 if (outmask &
AREA) {
729 salp0 = salp1 * cbet1,
730 calp0 = hypot(calp1, salp1 * sbet1);
733 A4 =
Math::sq(_a) * calp0 * salp0 * _e2;
738 ssig1 = sbet1, csig1 = calp1 * cbet1,
739 ssig2 = sbet2, csig2 = calp2 * cbet2;
742 I4Integrand i4(_ep2, k2);
743 vector<real> C4a(_nC4);
745 S12 = A4 *
DST::integral(ssig1, csig1, ssig2, csig2, C4a.data(), _nC4);
750 if (!meridian && somg12 == 2) {
751 somg12 = sin(omg12); comg12 = cos(omg12);
756 comg12 > -
real(0.7071) &&
757 sbet2 - sbet1 <
real(1.75)) {
761 real domg12 = 1 + comg12, dbet1 = 1 + cbet1, dbet2 = 1 + cbet2;
762 alp12 = 2 * atan2( somg12 * ( sbet1 * dbet2 + sbet2 * dbet1 ),
763 domg12 * ( sbet1 * sbet2 + dbet1 * dbet2 ) );
767 salp12 = salp2 * calp1 - calp2 * salp1,
768 calp12 = calp2 * calp1 + salp2 * salp1;
773 if (salp12 == 0 && calp12 < 0) {
774 salp12 = tiny_ * calp1;
777 alp12 = atan2(salp12, calp12);
780 S12 *= swapp * lonsign * latsign;
793 salp1 *= swapp * lonsign; calp1 *= swapp * latsign;
794 salp2 *= swapp * lonsign; calp2 *= swapp * latsign;
801 real lat2, real lon2,
803 real& s12, real& azi1, real& azi2,
804 real& m12, real& M12, real& M21,
807 real salp1, calp1, salp2, calp2,
808 a12 = GenInverse(lat1, lon1, lat2, lon2,
809 outmask, s12, salp1, calp1, salp2, calp2,
819 real lat2, real lon2,
820 unsigned caps)
const {
821 real t, salp1, calp1, salp2, calp2,
822 a12 = GenInverse(lat1, lon1, lat2, lon2,
824 0u, t, salp1, calp1, salp2, calp2,
837 real cbet1,
real cbet2,
unsigned outmask,
854 (sig12 + (E.
deltaE(ssig2, csig2, dn2) - E.
deltaE(ssig1, csig1, dn1)));
859 (sig12 + (E.
deltaD(ssig2, csig2, dn2) - E.
deltaD(ssig1, csig1, dn1)));
865 m12b = dn2 * (csig1 * ssig2) - dn1 * (ssig1 * csig2) -
869 real csig12 = csig1 * csig2 + ssig1 * ssig2;
870 real t = _ep2 * (cbet1 - cbet2) * (cbet1 + cbet2) / (dn1 + dn2);
871 M12 = csig12 + (t * ssig2 - csig2 * J12) * ssig1 / dn1;
872 M21 = csig12 - (t * ssig1 - csig1 * J12) * ssig2 / dn2;
885 if ( !(q == 0 && r <= 0) ) {
894 disc = S * (S + 2 * r3);
901 T3 += T3 < 0 ? -sqrt(disc) : sqrt(disc);
905 u += T + (T != 0 ? r2 / T : 0);
908 real ang = atan2(sqrt(-disc), -(S + r3));
911 u += 2 * r * cos(ang / 3);
916 uv = u < 0 ? q / (v - u) : u + v,
917 w = (uv - q) / (2 * v);
920 k = uv / (sqrt(uv +
Math::sq(w)) + w);
929 Math::real GeodesicExact::InverseStart(EllipticFunction& E,
944 sbet12 = sbet2 * cbet1 - cbet2 * sbet1,
945 cbet12 = cbet2 * cbet1 + sbet2 * sbet1;
946 real sbet12a = sbet2 * cbet1 + cbet2 * sbet1;
947 bool shortline = cbet12 >= 0 && sbet12 <
real(0.5) &&
948 cbet2 * lam12 <
real(0.5);
954 sbetm2 /= sbetm2 +
Math::sq(cbet1 + cbet2);
955 dnm = sqrt(1 + _ep2 * sbetm2);
956 real omg12 = lam12 / (_f1 * dnm);
957 somg12 = sin(omg12); comg12 = cos(omg12);
959 somg12 = slam12; comg12 = clam12;
962 salp1 = cbet2 * somg12;
963 calp1 = comg12 >= 0 ?
964 sbet12 + cbet2 * sbet1 *
Math::sq(somg12) / (1 + comg12) :
965 sbet12a - cbet2 * sbet1 *
Math::sq(somg12) / (1 - comg12);
968 ssig12 = hypot(salp1, calp1),
969 csig12 = sbet1 * sbet2 + cbet1 * cbet2 * comg12;
971 if (shortline && ssig12 < _etol2) {
973 salp2 = cbet1 * somg12;
974 calp2 = sbet12 - cbet1 * sbet2 *
975 (comg12 >= 0 ?
Math::sq(somg12) / (1 + comg12) : 1 - comg12);
978 sig12 = atan2(ssig12, csig12);
979 }
else if (fabs(_n) >
real(0.1) ||
986 real x, y, lamscale, betscale;
987 real lam12x = atan2(-slam12, -clam12);
992 E.Reset(-k2, -_ep2, 1 + k2, 1 + _ep2);
993 lamscale = _e2/_f1 * cbet1 * 2 * E.H();
995 betscale = lamscale * cbet1;
997 x = lam12x / lamscale;
998 y = sbet12a / betscale;
1002 cbet12a = cbet2 * cbet1 - sbet2 * sbet1,
1003 bet12a = atan2(sbet12a, cbet12a);
1004 real m12b, m0, dummy;
1008 sbet1, -cbet1, dn1, sbet2, cbet2, dn2,
1009 cbet1, cbet2,
REDUCEDLENGTH, dummy, m12b, m0, dummy, dummy);
1010 x = -1 + m12b / (cbet1 * cbet2 * m0 *
Math::pi());
1011 betscale = x < -
real(0.01) ? sbet12a / x :
1013 lamscale = betscale / cbet1;
1014 y = lam12x / lamscale;
1017 if (y > -tol1_ && x > -1 - xthresh_) {
1021 salp1 = fmin(
real(1), -x); calp1 = - sqrt(1 -
Math::sq(salp1));
1023 calp1 = fmax(
real(x > -tol1_ ? 0 : -1), x);
1061 real k = Astroid(x, y);
1063 omg12a = lamscale * ( _f >= 0 ? -x * k/(1 + k) : -y * (1 + k)/k );
1064 somg12 = sin(omg12a); comg12 = -cos(omg12a);
1066 salp1 = cbet2 * somg12;
1067 calp1 = sbet12a - cbet2 * sbet1 *
Math::sq(somg12) / (1 - comg12);
1074 salp1 = 1; calp1 = 0;
1087 EllipticFunction& E,
1089 bool diffp,
real& dlam12)
const
1092 if (sbet1 == 0 && calp1 == 0)
1099 salp0 = salp1 * cbet1,
1100 calp0 = hypot(calp1, salp1 * sbet1);
1102 real somg1, comg1, somg2, comg2, somg12, comg12, cchi1, cchi2, lam12;
1105 ssig1 = sbet1; somg1 = salp0 * sbet1;
1106 csig1 = comg1 = calp1 * cbet1;
1108 cchi1 = _f1 * dn1 * comg1;
1117 salp2 = cbet2 != cbet1 ? salp0 / cbet2 : salp1;
1122 calp2 = cbet2 != cbet1 || fabs(sbet2) != -sbet1 ?
1125 (cbet2 - cbet1) * (cbet1 + cbet2) :
1126 (sbet1 - sbet2) * (sbet1 + sbet2))) / cbet2 :
1130 ssig2 = sbet2; somg2 = salp0 * sbet2;
1131 csig2 = comg2 = calp2 * cbet2;
1133 cchi2 = _f1 * dn2 * comg2;
1139 sig12 = atan2(fmax(
real(0), csig1 * ssig2 - ssig1 * csig2),
1140 csig1 * csig2 + ssig1 * ssig2);
1143 somg12 = fmax(
real(0), comg1 * somg2 - somg1 * comg2);
1144 comg12 = comg1 * comg2 + somg1 * somg2;
1146 E.Reset(-k2, -_ep2, 1 + k2, 1 + _ep2);
1149 schi12 = fmax(
real(0), cchi1 * somg2 - somg1 * cchi2),
1150 cchi12 = cchi1 * cchi2 + somg1 * somg2;
1152 real eta = atan2(schi12 * clam120 - cchi12 * slam120,
1153 cchi12 * clam120 + schi12 * slam120);
1154 real deta12 = -_e2/_f1 * salp0 * E.H() / (
Math::pi() / 2) *
1155 (sig12 + (E.deltaH(ssig2, csig2, dn2) - E.deltaH(ssig1, csig1, dn1)));
1156 lam12 = eta + deta12;
1158 domg12 = deta12 + atan2(schi12 * comg12 - cchi12 * somg12,
1159 cchi12 * comg12 + schi12 * somg12);
1162 dlam12 = - 2 * _f1 * dn1 / sbet1;
1165 Lengths(E, sig12, ssig1, csig1, dn1, ssig2, csig2, dn2,
1167 dummy, dlam12, dummy, dummy, dummy);
1168 dlam12 *= _f1 / (calp2 * cbet2);
1177 using std::sqrt;
using std::asinh;
using std::asin;
1179 (x > 0 ? asinh(sqrt(x))/sqrt(x) :
1180 asin(sqrt(-x))/sqrt(-x));
1190 return x + (sqrt(1 + x) * asinhsqrt(x) - 1);
1195 return x == 0 ? 4/
real(3) :
1197 1 + (1 - asinhsqrt(x) / sqrt(1+x)) / (2*x);
1218 using std::sqrt;
using std::fabs;
using std::asinh;
using std::asin;
1219 if (X == y)
return tdX;
1220 if (X * y <= 0)
return ( tX - t(y) ) / (X - y);
1222 sy = sqrt(fabs(y)), sy1 = sqrt(1 + y),
1223 z = (X - y) / (sX * sy1 + sy * sX1),
1225 d2 = 2 * (X * sy * sy1 + y * sXX1);
1227 ( 1 + (asinh(z)/z) / d1 - (asinhsX + asinh(sy)) / d2 ) :
1229 ( 1 - (asin (z)/z) / d1 - (asinhsX + asin (sy)) / d2 );
1231 GeodesicExact::I4Integrand::I4Integrand(
real ep2,
real k2)
1237 using std::fabs;
using std::sqrt;
using std::asinh;
using std::asin;
1241 asinhsX = X > 0 ? asinh(sX) : asin(sX);
1243 Math::real GeodesicExact::I4Integrand::operator()(
real sig)
const {
1245 real ssig = sin(sig);
1246 return - DtX(_k2 *
Math::sq(ssig)) * ssig/2;
GeographicLib::Math::real real
Header for GeographicLib::GeodesicExact class.
Header for GeographicLib::GeodesicLineExact class.
void transform(std::function< real(real)> f, real F[]) const
static real integral(real sinx, real cosx, const real F[], int N)
Elliptic integrals and functions.
Math::real deltaE(real sn, real cn, real dn) const
Math::real deltaD(real sn, real cn, real dn) const
Exact geodesic calculations.
GeodesicLineExact InverseLine(real lat1, real lon1, real lat2, real lon2, unsigned caps=ALL) const
GeodesicLineExact GenDirectLine(real lat1, real lon1, real azi1, bool arcmode, real s12_a12, unsigned caps=ALL) const
GeodesicLineExact DirectLine(real lat1, real lon1, real azi1, real s12, unsigned caps=ALL) const
Math::real GenDirect(real lat1, real lon1, real azi1, bool arcmode, real s12_a12, unsigned outmask, real &lat2, real &lon2, real &azi2, real &s12, real &m12, real &M12, real &M21, real &S12) const
friend class GeodesicLineExact
GeodesicLineExact Line(real lat1, real lon1, real azi1, unsigned caps=ALL) const
GeodesicExact(real a, real f)
static const GeodesicExact & WGS84()
GeodesicLineExact ArcDirectLine(real lat1, real lon1, real azi1, real a12, unsigned caps=ALL) const
Exception handling for GeographicLib.
Mathematical functions needed by GeographicLib.
static void sincosd(T x, T &sinx, T &cosx)
static T atan2d(T y, T x)
static void norm(T &x, T &y)
static T AngNormalize(T x)
static void sincosde(T x, T t, T &sinx, T &cosx)
static T AngDiff(T x, T y, T &e)
@ hd
degrees per half turn
@ qd
degrees per quarter turn
Namespace for GeographicLib.
void swap(GeographicLib::NearestNeighbor< dist_t, pos_t, distfun_t > &a, GeographicLib::NearestNeighbor< dist_t, pos_t, distfun_t > &b)