src/AzimuthalEquidistant.cpp
Go to the documentation of this file.
1 
11 
12 namespace GeographicLib {
13 
14  using namespace std;
15 
17  : eps_(real(0.01) * sqrt(numeric_limits<real>::min()))
18  , _earth(earth) {}
19 
21  real& x, real& y,
22  real& azi, real& rk) const {
23  real sig, s, azi0, m;
24  sig = _earth.Inverse(lat0, lon0, lat, lon, s, azi0, azi, m);
25  Math::sincosd(azi0, x, y);
26  x *= s; y *= s;
27  rk = !(sig <= eps_) ? m / s : 1;
28  }
29 
31  real& lat, real& lon,
32  real& azi, real& rk) const {
33  real
34  azi0 = Math::atan2d(x, y),
35  s = Math::hypot(x, y);
36  real sig, m;
37  sig = _earth.Direct(lat0, lon0, azi0, s, lat, lon, azi, m);
38  rk = !(sig <= eps_) ? m / s : 1;
39  }
40 
41 } // namespace GeographicLib
Matrix3f m
Scalar * y
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
Definition: Geodesic.hpp:379
static const double lat
#define min(a, b)
Definition: datatypes.h:19
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
Definition: Geodesic.hpp:674
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
Definition: Half.h:150
static void sincosd(T x, T &sinx, T &cosx)
Definition: Math.hpp:558
void Reverse(real lat0, real lon0, real x, real y, real &lat, real &lon, real &azi, real &rk) const
AzimuthalEquidistant(const Geodesic &earth=Geodesic::WGS84())
static T hypot(T x, T y)
Definition: Math.hpp:243
const double lat0
static T atan2d(T y, T x)
Definition: Math.hpp:691
Namespace for GeographicLib.
RealScalar s
const double lon0
void Forward(real lat0, real lon0, real lat, real lon, real &x, real &y, real &azi, real &rk) const
static const double lon
Header for GeographicLib::AzimuthalEquidistant class.
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
Geodesic calculations
Definition: Geodesic.hpp:172


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:41:40