15 # pragma warning (disable: 4701 4127) 23 : eps0_(numeric_limits<real>::epsilon())
24 , eps_(real(0.01) * sqrt(eps0_))
26 , _a(_earth.EquatorialRadius())
27 , _f(_earth.Flattening())
31 real& x, real& y, real& azi, real& rk)
const {
33 _earth.GenInverse(lat0, lon0, lat, lon,
36 t, azi0, azi, m, M, t, t);
48 real& lat, real& lon, real& azi, real& rk)
const {
52 s = _a * atan(rho/_a);
53 bool little = rho <= _a;
61 int count = numit_, trip = 0;
62 real lat1, lon1, azi1, M;
65 line.Position(s, lat1, lon1, azi1, m, M, t);
70 real ds = little ? (m - rho * M) * M : (rho * m - M) * m;
73 if (!(abs(ds) >= eps_ * _a))
77 lat = lat1; lon = lon1; azi = azi1; rk = M;
GeodesicLine Line(real lat1, real lon1, real azi1, unsigned caps=ALL) const
Header for GeographicLib::Gnomonic class.
static T atan2d(T y, T x)
void Forward(real lat0, real lon0, real lat, real lon, real &x, real &y, real &azi, real &rk) const
Namespace for GeographicLib.
void Reverse(real lat0, real lon0, real x, real y, real &lat, real &lon, real &azi, real &rk) const
static void sincosd(T x, T &sinx, T &cosx)
Gnomonic(const Geodesic &earth=Geodesic::WGS84())
#define GEOGRAPHICLIB_PANIC