10 #if !defined(GEOGRAPHICLIB_RHUMB_HPP) 11 #define GEOGRAPHICLIB_RHUMB_HPP 1 16 #if !defined(GEOGRAPHICLIB_RHUMBAREA_ORDER) 21 # define GEOGRAPHICLIB_RHUMBAREA_ORDER \ 22 (GEOGRAPHICLIB_PRECISION == 2 ? 6 : \ 23 (GEOGRAPHICLIB_PRECISION == 1 ? 4 : 8)) 29 template <
class T>
class PolygonAreaT;
78 static real
gd(real
x)
94 return t != 0 ? 2 *
Math::atanh(t / (x + y)) / t : 1 /
x;
100 (2 * txy > -1 ? (1 + txy) *
Math::tand(d) : tx - ty) /
106 real
d = x -
y,
xy = x *
y;
108 (2 * xy > -1 ?
atan( d / (1 + xy) ) :
atan(x) -
atan(y)) / d :
113 real
d = (x -
y) / 2;
114 return cos((x + y)/2) * (d != 0 ?
sin(d) / d : 1);
118 real
d = (x -
y) / 2;
119 return cosh((x + y) / 2) * (d != 0 ?
sinh(d) / d : 1);
123 real
d = (x -
y) / 2;
124 return sinh((x + y) / 2) * (d != 0 ?
sinh(d) / d : 1);
129 return d != 0 ?
Math::asinh(x*y > 0 ? d * (x + y) / (x*hy + y*hx) :
135 return Datan(
sinh(x),
sinh(y)) * Dsinh(x, y);
139 {
return Dasinh(x, y) / Datan(x, y); }
143 real
t = x -
y,
d = 1 - _ell.
_e2 * x *
y;
147 real DE(real
x, real
y)
const;
149 real DRectifying(real latx, real laty)
const;
151 real DIsometric(real latx, real laty)
const;
154 static real SinCosSeries(
bool sinp,
155 real x, real y,
const real
c[],
int n);
157 real DConformalToRectifying(real chix, real chiy)
const;
159 real DRectifyingToConformal(real mux, real muy)
const;
163 real DIsometricToRectifying(real psix, real psiy)
const;
165 real DRectifyingToIsometric(real mux, real muy)
const;
167 real MeanSinXi(real psi1, real psi2)
const;
173 bool, real s12,
unsigned outmask,
174 real& lat2, real& lon2, real&, real&, real&, real&, real&,
176 GenDirect(lat1, lon1, azi12, s12, outmask, lat2, lon2, S12);
179 unsigned outmask, real& s12, real& azi12,
180 real&, real& , real& , real& , real& S12)
const {
181 GenInverse(lat1, lon1, lat2, lon2, outmask, s12, azi12, S12);
225 LONG_UNROLL = 1
U<<15,
247 Rhumb(real
a, real
f,
bool exact =
true);
271 void Direct(real lat1, real lon1, real azi12, real s12,
272 real& lat2, real& lon2, real& S12)
const {
273 GenDirect(lat1, lon1, azi12, s12,
274 LATITUDE | LONGITUDE | AREA, lat2, lon2, S12);
280 void Direct(real lat1, real lon1, real azi12, real s12,
281 real& lat2, real& lon2)
const {
283 GenDirect(lat1, lon1, azi12, s12, LATITUDE | LONGITUDE, lat2, lon2, t);
313 void GenDirect(real lat1, real lon1, real azi12, real s12,
314 unsigned outmask, real& lat2, real& lon2, real& S12)
const;
338 void Inverse(real lat1, real lon1, real lat2, real lon2,
339 real& s12, real& azi12, real& S12)
const {
340 GenInverse(lat1, lon1, lat2, lon2,
341 DISTANCE | AZIMUTH | AREA, s12, azi12, S12);
347 void Inverse(real lat1, real lon1, real lat2, real lon2,
348 real& s12, real& azi12)
const {
350 GenInverse(lat1, lon1, lat2, lon2, DISTANCE | AZIMUTH, s12, azi12, t);
373 void GenInverse(real lat1, real lon1, real lat2, real lon2,
375 real& s12, real& azi12, real& S12)
const;
392 RhumbLine Line(real lat1, real lon1, real azi12)
const;
416 static const Rhumb& WGS84();
443 real _lat1, _lon1, _azi12,
_salp, _calp, _mu1, _psi1, _r1;
512 void Position(real s12, real& lat2, real& lon2, real& S12)
const {
513 GenPosition(s12, LATITUDE | LONGITUDE | AREA, lat2, lon2, S12);
520 void Position(real s12, real& lat2, real& lon2)
const {
522 GenPosition(s12, LATITUDE | LONGITUDE, lat2, lon2, t);
553 void GenPosition(real s12,
unsigned outmask,
554 real& lat2, real& lon2, real& S12)
const;
590 #endif // GEOGRAPHICLIB_RHUMB_HPP
void Inverse(real lat1, real lon1, real lat2, real lon2, real &s12, real &azi12, real &S12) const
static real Dasinh(real x, real y)
#define GEOGRAPHICLIB_EXPORT
static real Dgd(real x, real y)
static real Dtan(real x, real y)
static real Dcosh(real x, real y)
EIGEN_DEVICE_FUNC const CoshReturnType cosh() const
static real Dlog(real x, real y)
void Position(real s12, real &lat2, real &lon2) const
#define GEOGRAPHICLIB_RHUMBAREA_ORDER
Math::real Latitude() const
static real Dsin(real x, real y)
Math::real MajorRadius() const
Math::real EllipsoidArea() const
EIGEN_DEVICE_FUNC const CosReturnType cos() const
EIGEN_DEVICE_FUNC const SinhReturnType sinh() const
Math::real MajorRadius() const
Math::real Azimuth() const
Math::real Longitude() const
EIGEN_DEVICE_FUNC const AtanReturnType atan() const
static real Datan(real x, real y)
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Namespace for GeographicLib.
#define GEOGRAPHICLIB_TRANSVERSEMERCATOR_ORDER
real Deatanhe(real x, real y) const
Header for GeographicLib::Ellipsoid class.
Math::real Flattening() const
Properties of an ellipsoid.
Math::real MajorRadius() const
static real Dgdinv(real x, real y)
Header for GeographicLib::Constants class.
Solve of the direct and inverse rhumb problems.
void GenInverse(real lat1, real lon1, real lat2, real lon2, unsigned outmask, real &s12, real &azi12, real &, real &, real &, real &, real &S12) const
void Inverse(real lat1, real lon1, real lat2, real lon2, real &s12, real &azi12) const
Find a sequence of points on a single rhumb line.
Math::real Flattening() const
EIGEN_DEVICE_FUNC const SinReturnType sin() const
void GenDirect(real lat1, real lon1, real azi12, bool, real s12, unsigned outmask, real &lat2, real &lon2, real &, real &, real &, real &, real &, real &S12) const
static T eatanhe(T x, T es)
void Direct(real lat1, real lon1, real azi12, real s12, real &lat2, real &lon2) const
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
Math::real Flattening() const
void Direct(real lat1, real lon1, real azi12, real s12, real &lat2, real &lon2, real &S12) const
static real Dsinh(real x, real y)
void Position(real s12, real &lat2, real &lon2, real &S12) const