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;
192 real tiny_, tol0_, tol1_, tol2_, tolb_, xthresh_;
207 static real SinCosSeries(
bool sinp,
211 real _a, _f, _f1, _e2, _ep2, _n, _b, _c2, _etol2;
212 real _aA3x[nA3x_], _cC3x[nC3x_], _cC4x[nC4x_];
217 real cbet1,
real cbet2,
unsigned outmask,
232 bool diffp,
real& dlam12,
real Ca[])
const;
234 unsigned outmask,
real& s12,
241 static void C1f(
real eps,
real c[]);
242 static void C1pf(
real eps,
real c[]);
244 static void C2f(
real eps,
real c[]);
274 LATITUDE = 1U<<7 | CAP_NONE,
279 LONGITUDE = 1U<<8 | CAP_C3,
286 AZIMUTH = 1U<<9 | CAP_NONE,
291 DISTANCE = 1U<<10 | CAP_C1,
297 STANDARD = LATITUDE | LONGITUDE | AZIMUTH | DISTANCE,
303 DISTANCE_IN = 1U<<11 | CAP_C1 | CAP_C1p,
308 REDUCEDLENGTH = 1U<<12 | CAP_C1 | CAP_C2,
313 GEODESICSCALE = 1U<<13 | CAP_C1 | CAP_C2,
318 AREA = 1U<<14 | CAP_C4,
323 LONG_UNROLL = 1U<<15,
329 ALL = OUT_ALL| CAP_ALL,
386 real& lat2, real& lon2, real& azi2,
387 real& m12, real& M12, real& M21, real& S12)
390 return GenDirect(lat1, lon1, azi1,
false, s12,
391 LATITUDE | LONGITUDE | AZIMUTH |
392 REDUCEDLENGTH | GEODESICSCALE | AREA,
393 lat2, lon2, azi2, t, m12, M12, M21, S12);
400 real& lat2, real& lon2)
403 return GenDirect(lat1, lon1, azi1,
false, s12,
404 LATITUDE | LONGITUDE,
405 lat2, lon2, t, t, t, t, t, t);
412 real& lat2, real& lon2, real& azi2)
415 return GenDirect(lat1, lon1, azi1,
false, s12,
416 LATITUDE | LONGITUDE | AZIMUTH,
417 lat2, lon2, azi2, t, t, t, t, t);
424 real& lat2, real& lon2, real& azi2, real& m12)
427 return GenDirect(lat1, lon1, azi1,
false, s12,
428 LATITUDE | LONGITUDE | AZIMUTH | REDUCEDLENGTH,
429 lat2, lon2, azi2, t, m12, t, t, t);
436 real& lat2, real& lon2, real& azi2,
437 real& M12, real& M21)
440 return GenDirect(lat1, lon1, azi1,
false, s12,
441 LATITUDE | LONGITUDE | AZIMUTH | GEODESICSCALE,
442 lat2, lon2, azi2, t, t, M12, M21, t);
449 real& lat2, real& lon2, real& azi2,
450 real& m12, real& M12, real& M21)
453 return GenDirect(lat1, lon1, azi1,
false, s12,
454 LATITUDE | LONGITUDE | AZIMUTH |
455 REDUCEDLENGTH | GEODESICSCALE,
456 lat2, lon2, azi2, t, m12, M12, M21, t);
497 void ArcDirect(real lat1, real lon1, real azi1, real a12,
498 real& lat2, real& lon2, real& azi2, real& s12,
499 real& m12, real& M12, real& M21, real& S12)
501 GenDirect(lat1, lon1, azi1,
true, a12,
502 LATITUDE | LONGITUDE | AZIMUTH | DISTANCE |
503 REDUCEDLENGTH | GEODESICSCALE | AREA,
504 lat2, lon2, azi2, s12, m12, M12, M21, S12);
510 void ArcDirect(real lat1, real lon1, real azi1, real a12,
511 real& lat2, real& lon2)
const {
513 GenDirect(lat1, lon1, azi1,
true, a12,
514 LATITUDE | LONGITUDE,
515 lat2, lon2, t, t, t, t, t, t);
521 void ArcDirect(real lat1, real lon1, real azi1, real a12,
522 real& lat2, real& lon2, real& azi2)
const {
524 GenDirect(lat1, lon1, azi1,
true, a12,
525 LATITUDE | LONGITUDE | AZIMUTH,
526 lat2, lon2, azi2, t, t, t, t, t);
532 void ArcDirect(real lat1, real lon1, real azi1, real a12,
533 real& lat2, real& lon2, real& azi2, real& s12)
536 GenDirect(lat1, lon1, azi1,
true, a12,
537 LATITUDE | LONGITUDE | AZIMUTH | DISTANCE,
538 lat2, lon2, azi2, s12, t, t, t, t);
544 void ArcDirect(real lat1, real lon1, real azi1, real a12,
545 real& lat2, real& lon2, real& azi2,
546 real& s12, real& m12)
const {
548 GenDirect(lat1, lon1, azi1,
true, a12,
549 LATITUDE | LONGITUDE | AZIMUTH | DISTANCE |
551 lat2, lon2, azi2, s12, m12, t, t, t);
557 void ArcDirect(real lat1, real lon1, real azi1, real a12,
558 real& lat2, real& lon2, real& azi2, real& s12,
559 real& M12, real& M21)
const {
561 GenDirect(lat1, lon1, azi1,
true, a12,
562 LATITUDE | LONGITUDE | AZIMUTH | DISTANCE |
564 lat2, lon2, azi2, s12, t, M12, M21, t);
570 void ArcDirect(real lat1, real lon1, real azi1, real a12,
571 real& lat2, real& lon2, real& azi2, real& s12,
572 real& m12, real& M12, real& M21)
const {
574 GenDirect(lat1, lon1, azi1,
true, a12,
575 LATITUDE | LONGITUDE | AZIMUTH | DISTANCE |
576 REDUCEDLENGTH | GEODESICSCALE,
577 lat2, lon2, azi2, s12, m12, M12, M21, t);
636 bool arcmode,
real s12_a12,
unsigned outmask,
681 real& s12, real& azi1, real& azi2, real& m12,
682 real& M12, real& M21, real& S12)
const {
683 return GenInverse(lat1, lon1, lat2, lon2,
685 REDUCEDLENGTH | GEODESICSCALE | AREA,
686 s12, azi1, azi2, m12, M12, M21, S12);
695 return GenInverse(lat1, lon1, lat2, lon2,
697 s12, t, t, t, t, t, t);
704 real& azi1, real& azi2)
const {
706 return GenInverse(lat1, lon1, lat2, lon2,
708 t, azi1, azi2, t, t, t, t);
715 real& s12, real& azi1, real& azi2)
718 return GenInverse(lat1, lon1, lat2, lon2,
720 s12, azi1, azi2, t, t, t, t);
727 real& s12, real& azi1, real& azi2, real& m12)
730 return GenInverse(lat1, lon1, lat2, lon2,
731 DISTANCE | AZIMUTH | REDUCEDLENGTH,
732 s12, azi1, azi2, m12, t, t, t);
739 real& s12, real& azi1, real& azi2,
740 real& M12, real& M21)
const {
742 return GenInverse(lat1, lon1, lat2, lon2,
743 DISTANCE | AZIMUTH | GEODESICSCALE,
744 s12, azi1, azi2, t, M12, M21, t);
751 real& s12, real& azi1, real& azi2, real& m12,
752 real& M12, real& M21)
const {
754 return GenInverse(lat1, lon1, lat2, lon2,
756 REDUCEDLENGTH | GEODESICSCALE,
757 s12, azi1, azi2, m12, M12, M21, t);
865 unsigned caps = ALL)
const;
888 unsigned caps = ALL)
const;
911 unsigned caps = ALL)
const;
937 bool arcmode,
real s12_a12,
938 unsigned caps = ALL)
const;
Header for GeographicLib::Constants class.
#define GEOGRAPHICLIB_EXPORT
GeographicLib::Math::real real
#define GEOGRAPHICLIB_GEODESIC_ORDER
Math::real Direct(real lat1, real lon1, real azi1, real s12, real &lat2, real &lon2, real &azi2, real &m12) const
Math::real Direct(real lat1, real lon1, real azi1, real s12, 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 &M21) 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
Math::real Flattening() const
void ArcDirect(real lat1, real lon1, real azi1, real a12, 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
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, real &azi2, real &m12, real &M12, real &M21, real &S12) const
Math::real EquatorialRadius() const
Math::real Inverse(real lat1, real lon1, real lat2, real lon2, real &s12, real &azi1, real &azi2, real &m12) const
void ArcDirect(real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2, real &azi2, real &s12) 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 Inverse(real lat1, real lon1, real lat2, real lon2, real &s12, real &azi1, real &azi2) const
Math::real Direct(real lat1, real lon1, real azi1, real s12, 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, real &S12) const
Math::real Inverse(real lat1, real lon1, real lat2, real lon2, real &azi1, real &azi2) const
Math::real Inverse(real lat1, real lon1, real lat2, real lon2, real &s12) const
void ArcDirect(real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2, real &azi2, real &s12, real &m12) const
Math::real EllipsoidArea() 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
void ArcDirect(real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2, real &azi2) 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
Namespace for GeographicLib.