10 #if !defined(GEOGRAPHICLIB_GEODESIC_HPP) 11 #define GEOGRAPHICLIB_GEODESIC_HPP 1 15 #if !defined(GEOGRAPHICLIB_GEODESIC_ORDER) 20 # define GEOGRAPHICLIB_GEODESIC_ORDER \ 21 (GEOGRAPHICLIB_PRECISION == 2 ? 6 : \ 22 (GEOGRAPHICLIB_PRECISION == 1 ? 3 : \ 23 (GEOGRAPHICLIB_PRECISION == 3 ? 7 : 8))) 182 static const int nA3x_ = nA3_;
184 static const int nC3x_ = (nC3_ * (nC3_ - 1)) / 2;
186 static const int nC4x_ = (nC4_ * (nC4_ + 1)) / 2;
190 static const unsigned maxit1_ = 20;
207 static real SinCosSeries(
bool sinp,
208 real sinx, real cosx,
const real
c[],
int n);
209 static real Astroid(real
x, real
y);
211 real _a, _f, _f1, _e2, _ep2,
_n, _b, _c2, _etol2;
212 real _A3x[nA3x_], _C3x[nC3x_], _C4x[nC4x_];
214 void Lengths(real eps, real sig12,
215 real ssig1, real csig1, real dn1,
216 real ssig2, real csig2, real dn2,
217 real cbet1, real cbet2,
unsigned outmask,
218 real& s12s, real& m12a, real& m0,
219 real& M12, real& M21, real Ca[])
const;
220 real InverseStart(real sbet1, real cbet1, real dn1,
221 real sbet2, real cbet2, real dn2,
222 real lam12, real slam12, real clam12,
223 real& salp1, real& calp1,
224 real& salp2, real& calp2, real& dnm,
226 real Lambda12(real sbet1, real cbet1, real dn1,
227 real sbet2, real cbet2, real dn2,
228 real salp1, real calp1, real slam120, real clam120,
229 real& salp2, real& calp2, real& sig12,
230 real& ssig1, real& csig1, real& ssig2, real& csig2,
231 real& eps, real& domg12,
232 bool diffp, real& dlam12, real Ca[])
const;
233 real GenInverse(real lat1, real lon1, real lat2, real lon2,
234 unsigned outmask, real& s12,
235 real& salp1, real& calp1, real& salp2, real& calp2,
236 real& m12, real& M12, real& M21, real& S12)
const;
240 static real A1m1f(real eps);
241 static void C1f(real eps, real
c[]);
242 static void C1pf(real eps, real
c[]);
243 static real A2m1f(real eps);
244 static void C2f(real eps, real
c[]);
247 real A3f(real eps)
const;
249 void C3f(real eps, real
c[])
const;
251 void C4f(real k2, real
c[])
const;
274 LATITUDE = 1
U<<7 | CAP_NONE,
279 LONGITUDE = 1
U<<8 | CAP_C3,
286 AZIMUTH = 1
U<<9 | CAP_NONE,
291 DISTANCE = 1
U<<10 | CAP_C1,
297 DISTANCE_IN = 1
U<<11 | CAP_C1 | CAP_C1p,
302 REDUCEDLENGTH = 1
U<<12 | CAP_C1 | CAP_C2,
307 GEODESICSCALE = 1
U<<13 | CAP_C1 | CAP_C2,
312 AREA = 1
U<<14 | CAP_C4,
317 LONG_UNROLL = 1
U<<15,
323 ALL = OUT_ALL| CAP_ALL,
380 real& lat2, real& lon2, real& azi2,
381 real& m12, real& M12, real& M21, real& S12)
384 return GenDirect(lat1, lon1, azi1,
false, s12,
385 LATITUDE | LONGITUDE | AZIMUTH |
386 REDUCEDLENGTH | GEODESICSCALE | AREA,
387 lat2, lon2, azi2, t, m12, M12, M21, S12);
394 real& lat2, real& lon2)
397 return GenDirect(lat1, lon1, azi1,
false, s12,
398 LATITUDE | LONGITUDE,
399 lat2, lon2, t, t, t, t, t, t);
406 real& lat2, real& lon2, real& azi2)
409 return GenDirect(lat1, lon1, azi1,
false, s12,
410 LATITUDE | LONGITUDE | AZIMUTH,
411 lat2, lon2, azi2, t, t, t, t, t);
418 real& lat2, real& lon2, real& azi2, real& m12)
421 return GenDirect(lat1, lon1, azi1,
false, s12,
422 LATITUDE | LONGITUDE | AZIMUTH | REDUCEDLENGTH,
423 lat2, lon2, azi2, t, m12, t, t, t);
430 real& lat2, real& lon2, real& azi2,
431 real& M12, real& M21)
434 return GenDirect(lat1, lon1, azi1,
false, s12,
435 LATITUDE | LONGITUDE | AZIMUTH | GEODESICSCALE,
436 lat2, lon2, azi2, t, t, M12, M21, t);
443 real& lat2, real& lon2, real& azi2,
444 real& m12, real& M12, real& M21)
447 return GenDirect(lat1, lon1, azi1,
false, s12,
448 LATITUDE | LONGITUDE | AZIMUTH |
449 REDUCEDLENGTH | GEODESICSCALE,
450 lat2, lon2, azi2, t, m12, M12, M21, t);
491 void ArcDirect(real lat1, real lon1, real azi1, real a12,
492 real& lat2, real& lon2, real& azi2, real& s12,
493 real& m12, real& M12, real& M21, real& S12)
495 GenDirect(lat1, lon1, azi1,
true, a12,
496 LATITUDE | LONGITUDE | AZIMUTH | DISTANCE |
497 REDUCEDLENGTH | GEODESICSCALE | AREA,
498 lat2, lon2, azi2, s12, m12, M12, M21, S12);
504 void ArcDirect(real lat1, real lon1, real azi1, real a12,
505 real& lat2, real& lon2)
const {
507 GenDirect(lat1, lon1, azi1,
true, a12,
508 LATITUDE | LONGITUDE,
509 lat2, lon2, t, t, t, t, t, t);
515 void ArcDirect(real lat1, real lon1, real azi1, real a12,
516 real& lat2, real& lon2, real& azi2)
const {
518 GenDirect(lat1, lon1, azi1,
true, a12,
519 LATITUDE | LONGITUDE | AZIMUTH,
520 lat2, lon2, azi2, t, t, t, t, t);
526 void ArcDirect(real lat1, real lon1, real azi1, real a12,
527 real& lat2, real& lon2, real& azi2, real& s12)
530 GenDirect(lat1, lon1, azi1,
true, a12,
531 LATITUDE | LONGITUDE | AZIMUTH | DISTANCE,
532 lat2, lon2, azi2, s12, t, t, t, t);
538 void ArcDirect(real lat1, real lon1, real azi1, real a12,
539 real& lat2, real& lon2, real& azi2,
540 real& s12, real& m12)
const {
542 GenDirect(lat1, lon1, azi1,
true, a12,
543 LATITUDE | LONGITUDE | AZIMUTH | DISTANCE |
545 lat2, lon2, azi2, s12, m12, t, t, t);
551 void ArcDirect(real lat1, real lon1, real azi1, real a12,
552 real& lat2, real& lon2, real& azi2, real& s12,
553 real& M12, real& M21)
const {
555 GenDirect(lat1, lon1, azi1,
true, a12,
556 LATITUDE | LONGITUDE | AZIMUTH | DISTANCE |
558 lat2, lon2, azi2, s12, t, M12, M21, t);
564 void ArcDirect(real lat1, real lon1, real azi1, real a12,
565 real& lat2, real& lon2, real& azi2, real& s12,
566 real& m12, real& M12, real& M21)
const {
568 GenDirect(lat1, lon1, azi1,
true, a12,
569 LATITUDE | LONGITUDE | AZIMUTH | DISTANCE |
570 REDUCEDLENGTH | GEODESICSCALE,
571 lat2, lon2, azi2, s12, m12, M12, M21, t);
629 Math::real GenDirect(real lat1, real lon1, real azi1,
630 bool arcmode, real s12_a12,
unsigned outmask,
631 real& lat2, real& lon2, real& azi2,
632 real& s12, real& m12, real& M12, real& M21,
675 real& s12, real& azi1, real& azi2, real& m12,
676 real& M12, real& M21, real& S12)
const {
677 return GenInverse(lat1, lon1, lat2, lon2,
679 REDUCEDLENGTH | GEODESICSCALE | AREA,
680 s12, azi1, azi2, m12, M12, M21, S12);
689 return GenInverse(lat1, lon1, lat2, lon2,
691 s12, t, t, t, t, t, t);
698 real& azi1, real& azi2)
const {
700 return GenInverse(lat1, lon1, lat2, lon2,
702 t, azi1, azi2, t, t, t, t);
709 real& s12, real& azi1, real& azi2)
712 return GenInverse(lat1, lon1, lat2, lon2,
714 s12, azi1, azi2, t, t, t, t);
721 real& s12, real& azi1, real& azi2, real& m12)
724 return GenInverse(lat1, lon1, lat2, lon2,
725 DISTANCE | AZIMUTH | REDUCEDLENGTH,
726 s12, azi1, azi2, m12, t, t, t);
733 real& s12, real& azi1, real& azi2,
734 real& M12, real& M21)
const {
736 return GenInverse(lat1, lon1, lat2, lon2,
737 DISTANCE | AZIMUTH | GEODESICSCALE,
738 s12, azi1, azi2, t, M12, M21, t);
745 real& s12, real& azi1, real& azi2, real& m12,
746 real& M12, real& M21)
const {
748 return GenInverse(lat1, lon1, lat2, lon2,
750 REDUCEDLENGTH | GEODESICSCALE,
751 s12, azi1, azi2, m12, M12, M21, t);
791 Math::real GenInverse(real lat1, real lon1, real lat2, real lon2,
793 real& s12, real& azi1, real& azi2,
794 real& m12, real& M12, real& M21, real& S12)
const;
837 GeodesicLine Line(real lat1, real lon1, real azi1,
unsigned caps = ALL)
858 GeodesicLine InverseLine(real lat1, real lon1, real lat2, real lon2,
859 unsigned caps = ALL)
const;
881 GeodesicLine DirectLine(real lat1, real lon1, real azi1, real s12,
882 unsigned caps = ALL)
const;
904 GeodesicLine ArcDirectLine(real lat1, real lon1, real azi1, real a12,
905 unsigned caps = ALL)
const;
930 GeodesicLine GenDirectLine(real lat1, real lon1, real azi1,
931 bool arcmode, real s12_a12,
932 unsigned caps = ALL)
const;
971 #endif // GEOGRAPHICLIB_GEODESIC_HPP
void ArcDirect(real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2, real &azi2, real &s12, real &M12, real &M21) const
#define GEOGRAPHICLIB_EXPORT
void ArcDirect(real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2, real &azi2, real &s12, real &m12) const
Math::real Direct(real lat1, real lon1, real azi1, real s12, real &lat2, real &lon2, real &azi2, real &m12, real &M12, real &M21, real &S12) const
Math::real Direct(real lat1, real lon1, real azi1, real s12, real &lat2, real &lon2, real &azi2, real &m12) const
Math::real Inverse(real lat1, real lon1, real lat2, real lon2, real &s12, real &azi1, real &azi2, real &m12, real &M12, real &M21, real &S12) const
Math::real MajorRadius() const
void ArcDirect(real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2) const
void ArcDirect(real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2, real &azi2, real &s12, real &m12, real &M12, real &M21) const
Math::real Direct(real lat1, real lon1, real azi1, real s12, real &lat2, real &lon2) const
Math::real Inverse(real lat1, real lon1, real lat2, real lon2, real &s12, real &azi1, real &azi2, real &M12, real &M21) const
Math::real Inverse(real lat1, real lon1, real lat2, real lon2, real &s12, real &azi1, real &azi2, real &m12) const
Math::real Direct(real lat1, real lon1, real azi1, real s12, real &lat2, real &lon2, real &azi2, real &m12, real &M12, real &M21) const
Math::real Inverse(real lat1, real lon1, real lat2, real lon2, real &s12, real &azi1, real &azi2) const
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Namespace for GeographicLib.
Math::real Inverse(real lat1, real lon1, real lat2, real lon2, real &s12) const
Math::real EllipsoidArea() const
void ArcDirect(real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2, real &azi2) const
void ArcDirect(real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2, real &azi2, real &s12, real &m12, real &M12, real &M21, real &S12) const
Math::real Inverse(real lat1, real lon1, real lat2, real lon2, real &s12, real &azi1, real &azi2, real &m12, real &M12, real &M21) const
Header for GeographicLib::Constants class.
Math::real Inverse(real lat1, real lon1, real lat2, real lon2, real &azi1, real &azi2) const
void ArcDirect(real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2, real &azi2, real &s12) const
#define GEOGRAPHICLIB_GEODESIC_ORDER
Math::real Direct(real lat1, real lon1, real azi1, real s12, real &lat2, real &lon2, real &azi2) const
Math::real Direct(real lat1, real lon1, real azi1, real s12, real &lat2, real &lon2, real &azi2, real &M12, real &M21) const
Math::real Flattening() const
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x