10#if !defined(GEOGRAPHICLIB_GEODESICLINE_HPP)
11#define GEOGRAPHICLIB_GEODESICLINE_HPP 1
78 static const int nC1_ = Geodesic::nC1_;
79 static const int nC1p_ = Geodesic::nC1p_;
80 static const int nC2_ = Geodesic::nC2_;
81 static const int nC3_ = Geodesic::nC3_;
82 static const int nC4_ = Geodesic::nC4_;
85 real _lat1, _lon1, _azi1;
88 real _b, _c2, _f1, _salp0, _calp0, _k2,
89 _salp1, _calp1, _ssig1, _csig1, _dn1, _stau1, _ctau1, _somg1, _comg1,
90 _aA1m1, _aA2m1, _aA3c, _bB11, _bB21, _bB31, _aA4, _bB41;
93 real _cC1a[nC1_ + 1], _cC1pa[nC1p_ + 1], _cC2a[nC2_ + 1], _cC3a[nC3_],
100 real azi1, real salp1, real calp1,
103 real lat1, real lon1,
104 real azi1, real salp1, real calp1,
105 unsigned caps,
bool arcmode, real s13_a13);
107 static constexpr unsigned CAP_NONE = Geodesic::CAP_NONE;
108 static constexpr unsigned CAP_C1 = Geodesic::CAP_C1;
109 static constexpr unsigned CAP_C1p = Geodesic::CAP_C1p;
110 static constexpr unsigned CAP_C2 = Geodesic::CAP_C2;
111 static constexpr unsigned CAP_C3 = Geodesic::CAP_C3;
112 static constexpr unsigned CAP_C4 = Geodesic::CAP_C4;
113 static constexpr unsigned CAP_ALL = Geodesic::CAP_ALL;
114 static constexpr unsigned CAP_MASK = Geodesic::CAP_MASK;
115 static constexpr unsigned OUT_ALL = Geodesic::OUT_ALL;
116 static constexpr unsigned OUT_MASK = Geodesic::OUT_MASK;
131 NONE = Geodesic::NONE,
137 LATITUDE = Geodesic::LATITUDE,
142 LONGITUDE = Geodesic::LONGITUDE,
149 AZIMUTH = Geodesic::AZIMUTH,
154 DISTANCE = Geodesic::DISTANCE,
160 STANDARD = Geodesic::STANDARD,
166 DISTANCE_IN = Geodesic::DISTANCE_IN,
171 REDUCEDLENGTH = Geodesic::REDUCEDLENGTH,
176 GEODESICSCALE = Geodesic::GEODESICSCALE,
181 AREA = Geodesic::AREA,
186 LONG_UNROLL = Geodesic::LONG_UNROLL,
243 unsigned caps = ALL);
298 real& lat2, real& lon2, real& azi2,
299 real& m12, real& M12, real& M21,
302 return GenPosition(
false, s12,
303 LATITUDE | LONGITUDE | AZIMUTH |
304 REDUCEDLENGTH | GEODESICSCALE | AREA,
305 lat2, lon2, azi2, t, m12, M12, M21, S12);
313 return GenPosition(
false, s12,
314 LATITUDE | LONGITUDE,
315 lat2, lon2, t, t, t, t, t, t);
324 return GenPosition(
false, s12,
325 LATITUDE | LONGITUDE | AZIMUTH,
326 lat2, lon2, azi2, t, t, t, t, t);
333 real& azi2, real& m12)
const {
335 return GenPosition(
false, s12,
336 LATITUDE | LONGITUDE |
337 AZIMUTH | REDUCEDLENGTH,
338 lat2, lon2, azi2, t, m12, t, t, t);
345 real& azi2, real& M12, real& M21)
348 return GenPosition(
false, s12,
349 LATITUDE | LONGITUDE |
350 AZIMUTH | GEODESICSCALE,
351 lat2, lon2, azi2, t, t, M12, M21, t);
358 real& lat2, real& lon2, real& azi2,
359 real& m12, real& M12, real& M21)
362 return GenPosition(
false, s12,
363 LATITUDE | LONGITUDE | AZIMUTH |
364 REDUCEDLENGTH | GEODESICSCALE,
365 lat2, lon2, azi2, t, m12, M12, M21, t);
411 real& s12, real& m12, real& M12, real& M21,
413 GenPosition(
true, a12,
414 LATITUDE | LONGITUDE | AZIMUTH | DISTANCE |
415 REDUCEDLENGTH | GEODESICSCALE | AREA,
416 lat2, lon2, azi2, s12, m12, M12, M21, S12);
425 GenPosition(
true, a12,
426 LATITUDE | LONGITUDE,
427 lat2, lon2, t, t, t, t, t, t);
434 real& lat2, real& lon2, real& azi2)
437 GenPosition(
true, a12,
438 LATITUDE | LONGITUDE | AZIMUTH,
439 lat2, lon2, azi2, t, t, t, t, t);
448 GenPosition(
true, a12,
449 LATITUDE | LONGITUDE | AZIMUTH | DISTANCE,
450 lat2, lon2, azi2, s12, t, t, t, t);
457 real& s12, real& m12)
const {
459 GenPosition(
true, a12,
460 LATITUDE | LONGITUDE | AZIMUTH |
461 DISTANCE | REDUCEDLENGTH,
462 lat2, lon2, azi2, s12, m12, t, t, t);
469 real& s12, real& M12, real& M21)
472 GenPosition(
true, a12,
473 LATITUDE | LONGITUDE | AZIMUTH |
474 DISTANCE | GEODESICSCALE,
475 lat2, lon2, azi2, s12, t, M12, M21, t);
482 real& s12, real& m12, real& M12, real& M21)
485 GenPosition(
true, a12,
486 LATITUDE | LONGITUDE | AZIMUTH |
487 DISTANCE | REDUCEDLENGTH | GEODESICSCALE,
488 lat2, lon2, azi2, s12, m12, M12, M21, t);
553 Math::real GenPosition(
bool arcmode,
real s12_a12,
unsigned outmask,
572 void SetDistance(
real s13);
583 void SetArc(
real a13);
595 void GenSetDistance(
bool arcmode,
real s13_a13);
605 bool Init()
const {
return _caps != 0U; }
611 {
return Init() ? _lat1 : Math::NaN(); }
617 {
return Init() ? _lon1 : Math::NaN(); }
623 {
return Init() ? _azi1 : Math::NaN(); }
632 {
if (Init()) { sazi1 = _salp1; cazi1 = _calp1; } }
641 {
return Init() ? Math::atan2d(_salp0, _calp0) : Math::NaN(); }
650 {
if (Init()) { sazi0 = _salp0; cazi0 = _calp0; } }
659 return Init() ? Math::atan2d(_ssig1, _csig1) : Math::NaN();
667 {
return Init() ? _a : Math::NaN(); }
674 {
return Init() ? _f : Math::NaN(); }
680 bool Exact()
const {
return _exact; }
696 return (_caps & testcaps) == testcaps;
707 {
return Init() ? (arcmode ? _a13 : _s13) : Math::NaN(); }
Header for GeographicLib::Constants class.
#define GEOGRAPHICLIB_EXPORT
GeographicLib::Math::real real
Header for GeographicLib::GeodesicLineExact class.
Header for GeographicLib::Geodesic class.
void ArcPosition(real a12, real &lat2, real &lon2, real &azi2, real &s12, real &M12, real &M21) const
void ArcPosition(real a12, real &lat2, real &lon2, real &azi2, real &s12) const
Math::real Position(real s12, real &lat2, real &lon2, real &azi2, real &m12) const
Math::real Position(real s12, real &lat2, real &lon2, real &azi2, real &M12, real &M21) const
unsigned Capabilities() const
Math::real Position(real s12, real &lat2, real &lon2) const
Math::real Latitude() const
Math::real Distance() const
Math::real EquatorialAzimuth() const
void ArcPosition(real a12, real &lat2, real &lon2, real &azi2, real &s12, real &m12, real &M12, real &M21) const
Math::real Azimuth() const
void Azimuth(real &sazi1, real &cazi1) const
void ArcPosition(real a12, real &lat2, real &lon2, real &azi2, real &s12, real &m12, real &M12, real &M21, real &S12) const
Math::real Position(real s12, real &lat2, real &lon2, real &azi2, real &m12, real &M12, real &M21, real &S12) const
Math::real GenDistance(bool arcmode) const
void ArcPosition(real a12, real &lat2, real &lon2) const
Math::real Position(real s12, real &lat2, real &lon2, real &azi2, real &m12, real &M12, real &M21) const
Math::real EquatorialRadius() const
void ArcPosition(real a12, real &lat2, real &lon2, real &azi2, real &s12, real &m12) const
void EquatorialAzimuth(real &sazi0, real &cazi0) const
Math::real Position(real s12, real &lat2, real &lon2, real &azi2) const
bool Capabilities(unsigned testcaps) const
Math::real Longitude() const
Math::real EquatorialArc() const
Math::real Flattening() const
void ArcPosition(real a12, real &lat2, real &lon2, real &azi2) const
Namespace for GeographicLib.