14# pragma warning (disable: 5055)
23 : stol_(
real(0.01) * sqrt(numeric_limits<
real>::epsilon()))
28 , _e12(_e2 / (1 - _e2))
31 , _rm(_aux.RectifyingRadius(true))
32 , _c2(_aux.AuthalicRadiusSquared(true))
37 static const Ellipsoid wgs84(Constants::WGS84_a(), Constants::WGS84_f());
42 {
return Math::pi()/2 * _rm; }
45 {
return 4 * Math::pi() * _c2; }
47 Math::real Ellipsoid::ParametricLatitude(real phi)
const {
48 return _aux.Convert(AuxLatitude::PHI, AuxLatitude::BETA,
49 Math::LatFix(phi),
true);
52 Math::real Ellipsoid::InverseParametricLatitude(real beta)
const {
53 return _aux.Convert(AuxLatitude::BETA, AuxLatitude::PHI,
54 Math::LatFix(beta),
true);
57 Math::real Ellipsoid::GeocentricLatitude(real phi)
const {
58 return _aux.Convert(AuxLatitude::PHI, AuxLatitude::THETA,
59 Math::LatFix(phi),
true);
62 Math::real Ellipsoid::InverseGeocentricLatitude(real theta)
const {
63 return _aux.Convert(AuxLatitude::THETA, AuxLatitude::PHI,
64 Math::LatFix(theta),
true);
67 Math::real Ellipsoid::RectifyingLatitude(real phi)
const {
68 return _aux.Convert(AuxLatitude::PHI, AuxLatitude::MU,
69 Math::LatFix(phi),
true);
72 Math::real Ellipsoid::InverseRectifyingLatitude(real mu)
const {
73 return _aux.Convert(AuxLatitude::MU, AuxLatitude::PHI,
74 Math::LatFix(mu),
true);
78 return _aux.Convert(AuxLatitude::PHI, AuxLatitude::XI,
79 Math::LatFix(phi),
true);
82 Math::real Ellipsoid::InverseAuthalicLatitude(real xi)
const {
83 return _aux.Convert(AuxLatitude::XI, AuxLatitude::PHI,
84 Math::LatFix(xi),
true);
87 Math::real Ellipsoid::ConformalLatitude(real phi)
const {
88 return _aux.Convert(AuxLatitude::PHI, AuxLatitude::CHI,
89 Math::LatFix(phi),
true);
92 Math::real Ellipsoid::InverseConformalLatitude(real chi)
const {
93 return _aux.Convert(AuxLatitude::CHI, AuxLatitude::PHI,
94 Math::LatFix(chi),
true);
97 Math::real Ellipsoid::IsometricLatitude(real phi)
const {
98 return _aux.Convert(AuxLatitude::PHI, AuxLatitude::CHI,
99 AuxAngle::degrees(Math::LatFix(phi)),
true).lamd();
102 Math::real Ellipsoid::InverseIsometricLatitude(real psi)
const {
103 return _aux.Convert(AuxLatitude::CHI, AuxLatitude::PHI,
104 AuxAngle::lamd(psi),
true).degrees();
109 AuxAngle beta(_aux.Convert(AuxLatitude::PHI, AuxLatitude::BETA,
110 AuxAngle::degrees(Math::LatFix(phi)),
112 return _a * beta.
x();
117 AuxAngle beta(_aux.Convert(AuxLatitude::PHI, AuxLatitude::BETA,
118 AuxAngle::degrees(Math::LatFix(phi)),
120 return _b * beta.
y();
124 return _rm * _aux.Convert(AuxLatitude::PHI, AuxLatitude::MU,
125 AuxAngle::degrees(Math::LatFix(phi)),
129 Math::real Ellipsoid::MeridionalCurvatureRadius(real phi)
const {
130 real v = 1 - _e2 * Math::sq(Math::sind(Math::LatFix(phi)));
131 return _a * (1 - _e2) / (v * sqrt(v));
134 Math::real Ellipsoid::TransverseCurvatureRadius(real phi)
const {
135 real v = 1 - _e2 * Math::sq(Math::sind(Math::LatFix(phi)));
139 Math::real Ellipsoid::NormalCurvatureRadius(real phi, real azi)
const {
141 v = 1 - _e2 * Math::sq(Math::sind(Math::LatFix(phi)));
142 Math::sincosd(azi, salp, calp);
143 return _a / (sqrt(v) * (Math::sq(calp) * v / (1 - _e2) + Math::sq(salp)));
Header for GeographicLib::Ellipsoid class.
GeographicLib::Math::real real
An accurate representation of angles.
Properties of an ellipsoid.
Ellipsoid(real a, real f)
Namespace for GeographicLib.