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
static const double lat
#define min(a, b)
Definition: datatypes.h:19
void Forward(real lat0, real lon0, real lat, real lon, real &x, real &y, real &azi, real &rk) const
Definition: BFloat16.h:88
static void sincosd(T x, T &sinx, T &cosx)
Definition: Math.hpp:558
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
Definition: main.h:100
Namespace for GeographicLib.
RealScalar s
void Reverse(real lat0, real lon0, real x, real y, real &lat, real &lon, real &azi, real &rk) const
const double lon0
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 lon
Jet< T, N > sqrt(const Jet< T, N > &f)
Definition: jet.h:418
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
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


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:33:56