GeographicLib 2.1.2
|
Properties of an ellipsoid. More...
#include <GeographicLib/Ellipsoid.hpp>
Static Public Member Functions | |
static const Ellipsoid & | WGS84 () |
Eccentricity conversions. | |
static Math::real | SecondFlatteningToFlattening (real fp) |
static Math::real | FlatteningToSecondFlattening (real f) |
static Math::real | ThirdFlatteningToFlattening (real n) |
static Math::real | FlatteningToThirdFlattening (real f) |
static Math::real | EccentricitySqToFlattening (real e2) |
static Math::real | FlatteningToEccentricitySq (real f) |
static Math::real | SecondEccentricitySqToFlattening (real ep2) |
static Math::real | FlatteningToSecondEccentricitySq (real f) |
static Math::real | ThirdEccentricitySqToFlattening (real epp2) |
static Math::real | FlatteningToThirdEccentricitySq (real f) |
Friends | |
class | Rhumb |
class | RhumbLine |
Properties of an ellipsoid.
This class returns various properties of the ellipsoid and converts between various types of latitudes. The latitude conversions are also possible using the various projections supported by GeographicLib; but Ellipsoid provides more direct access (sometimes using private functions of the projection classes). Ellipsoid::RectifyingLatitude, Ellipsoid::InverseRectifyingLatitude, and Ellipsoid::MeridianDistance provide functionality which can be provided by the Geodesic class. However Geodesic uses a series approximation (valid for abs f < 1/150), whereas Ellipsoid computes these quantities using EllipticFunction which provides accurate results even when f is large. Use of this class should be limited to −3 < f < 3/4 (i.e., 1/4 < b/a < 4).
Example of use:
Definition at line 39 of file Ellipsoid.hpp.
GeographicLib::Ellipsoid::Ellipsoid | ( | real | a, |
real | f | ||
) |
Constructor for an ellipsoid with
[in] | a | equatorial radius (meters). |
[in] | f | flattening of ellipsoid. Setting f = 0 gives a sphere. Negative f gives a prolate ellipsoid. |
GeographicErr | if a or (1 − f) a is not positive. |
Definition at line 21 of file Ellipsoid.cpp.
|
inline |
Definition at line 80 of file Ellipsoid.hpp.
Referenced by GeographicLib::Rhumb::EquatorialRadius().
|
inline |
Definition at line 85 of file Ellipsoid.hpp.
Math::real GeographicLib::Ellipsoid::QuarterMeridian | ( | ) | const |
Definition at line 42 of file Ellipsoid.cpp.
References GeographicLib::EllipticFunction::E().
Referenced by GeographicLib::Rhumb::GenInverse(), GeographicLib::RhumbLine::GenPosition(), and RectifyingLatitude().
Math::real GeographicLib::Ellipsoid::Area | ( | ) | const |
Definition at line 45 of file Ellipsoid.cpp.
References GeographicLib::Math::pi(), and GeographicLib::Math::sq().
Referenced by GeographicLib::Rhumb::EllipsoidArea(), and main().
|
inline |
Definition at line 106 of file Ellipsoid.hpp.
References GeographicLib::Math::pi(), and GeographicLib::Math::sq().
|
inline |
Definition at line 120 of file Ellipsoid.hpp.
Referenced by GeographicLib::Rhumb::Flattening().
|
inline |
Definition at line 127 of file Ellipsoid.hpp.
|
inline |
Definition at line 134 of file Ellipsoid.hpp.
|
inline |
Definition at line 142 of file Ellipsoid.hpp.
|
inline |
Definition at line 150 of file Ellipsoid.hpp.
|
inline |
Definition at line 159 of file Ellipsoid.hpp.
Math::real GeographicLib::Ellipsoid::ParametricLatitude | ( | real | phi | ) | const |
[in] | phi | the geographic latitude (degrees). |
The geographic latitude, φ, is the angle between the equatorial plane and a vector normal to the surface of the ellipsoid.
The parametric latitude (also called the reduced latitude), β, allows the cartesian coordinated of a meridian to be expressed conveniently in parametric form as
where a and b are the equatorial radius and the polar semi-axis. For a sphere β = φ.
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold. The returned value β lies in [−90°, 90°].
Definition at line 53 of file Ellipsoid.cpp.
References GeographicLib::Math::atand(), GeographicLib::Math::LatFix(), and GeographicLib::Math::tand().
Referenced by MeridianDistance().
Math::real GeographicLib::Ellipsoid::InverseParametricLatitude | ( | real | beta | ) | const |
[in] | beta | the parametric latitude (degrees). |
β must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold. The returned value φ lies in [−90°, 90°].
Definition at line 56 of file Ellipsoid.cpp.
References GeographicLib::Math::atand(), GeographicLib::Math::LatFix(), and GeographicLib::Math::tand().
Referenced by InverseRectifyingLatitude().
Math::real GeographicLib::Ellipsoid::GeocentricLatitude | ( | real | phi | ) | const |
[in] | phi | the geographic latitude (degrees). |
The geocentric latitude, θ, is the angle between the equatorial plane and a line between the center of the ellipsoid and a point on the ellipsoid. For a sphere θ = φ.
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold. The returned value θ lies in [−90°, 90°].
Definition at line 59 of file Ellipsoid.cpp.
References GeographicLib::Math::atand(), GeographicLib::Math::LatFix(), and GeographicLib::Math::tand().
Math::real GeographicLib::Ellipsoid::InverseGeocentricLatitude | ( | real | theta | ) | const |
[in] | theta | the geocentric latitude (degrees). |
θ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold. The returned value φ lies in [−90°, 90°].
Definition at line 62 of file Ellipsoid.cpp.
References GeographicLib::Math::atand(), GeographicLib::Math::LatFix(), and GeographicLib::Math::tand().
Math::real GeographicLib::Ellipsoid::RectifyingLatitude | ( | real | phi | ) | const |
[in] | phi | the geographic latitude (degrees). |
The rectifying latitude, μ, has the property that the distance along a meridian of the ellipsoid between two points with rectifying latitudes μ1 and μ2 is equal to (μ2 - μ1) L / 90°, where L = QuarterMeridian(). For a sphere μ = φ.
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold. The returned value μ lies in [−90°, 90°].
Definition at line 65 of file Ellipsoid.cpp.
References MeridianDistance(), GeographicLib::Math::qd, and QuarterMeridian().
Math::real GeographicLib::Ellipsoid::InverseRectifyingLatitude | ( | real | mu | ) | const |
[in] | mu | the rectifying latitude (degrees). |
μ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold. The returned value φ lies in [−90°, 90°].
Definition at line 70 of file Ellipsoid.cpp.
References GeographicLib::Math::degree(), GeographicLib::EllipticFunction::E(), GeographicLib::EllipticFunction::Einv(), InverseParametricLatitude(), and GeographicLib::Math::qd.
Referenced by GeographicLib::RhumbLine::GenPosition().
Math::real GeographicLib::Ellipsoid::AuthalicLatitude | ( | real | phi | ) | const |
[in] | phi | the geographic latitude (degrees). |
The authalic latitude, ξ, has the property that the area of the ellipsoid between two circles with authalic latitudes ξ1 and ξ2 is equal to (sin ξ2 - sin ξ1) A / 2, where A = Area(). For a sphere ξ = φ.
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold. The returned value ξ lies in [−90°, 90°].
Definition at line 77 of file Ellipsoid.cpp.
References GeographicLib::Math::atand(), GeographicLib::Math::LatFix(), and GeographicLib::Math::tand().
Referenced by main().
Math::real GeographicLib::Ellipsoid::InverseAuthalicLatitude | ( | real | xi | ) | const |
[in] | xi | the authalic latitude (degrees). |
ξ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold. The returned value φ lies in [−90°, 90°].
Definition at line 80 of file Ellipsoid.cpp.
References GeographicLib::Math::atand(), GeographicLib::Math::LatFix(), and GeographicLib::Math::tand().
Math::real GeographicLib::Ellipsoid::ConformalLatitude | ( | real | phi | ) | const |
[in] | phi | the geographic latitude (degrees). |
The conformal latitude, χ, gives the mapping of the ellipsoid to a sphere which which is conformal (angles are preserved) and in which the equator of the ellipsoid maps to the equator of the sphere. For a sphere χ = φ.
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold. The returned value χ lies in [−90°, 90°].
Definition at line 83 of file Ellipsoid.cpp.
References GeographicLib::Math::atand(), GeographicLib::Math::LatFix(), GeographicLib::Math::tand(), and GeographicLib::Math::taupf().
Math::real GeographicLib::Ellipsoid::InverseConformalLatitude | ( | real | chi | ) | const |
[in] | chi | the conformal latitude (degrees). |
χ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold. The returned value φ lies in [−90°, 90°].
Definition at line 86 of file Ellipsoid.cpp.
References GeographicLib::Math::atand(), GeographicLib::Math::LatFix(), GeographicLib::Math::tand(), and GeographicLib::Math::tauf().
Math::real GeographicLib::Ellipsoid::IsometricLatitude | ( | real | phi | ) | const |
[in] | phi | the geographic latitude (degrees). |
The isometric latitude gives the mapping of the ellipsoid to a plane which which is conformal (angles are preserved) and in which the equator of the ellipsoid maps to a straight line of constant scale; this mapping defines the Mercator projection. For a sphere ψ = sinh−1 tan φ.
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold. The value returned for φ = ±90° is some (positive or negative) large but finite value, such that InverseIsometricLatitude returns the original value of φ.
Definition at line 89 of file Ellipsoid.cpp.
References GeographicLib::Math::degree(), GeographicLib::Math::LatFix(), GeographicLib::Math::tand(), and GeographicLib::Math::taupf().
Referenced by GeographicLib::Rhumb::GenInverse().
Math::real GeographicLib::Ellipsoid::InverseIsometricLatitude | ( | real | psi | ) | const |
[in] | psi | the isometric latitude (degrees). |
The returned value φ lies in [−90°, 90°]. For a sphere φ = tan−1 sinh ψ.
Definition at line 93 of file Ellipsoid.cpp.
References GeographicLib::Math::atand(), GeographicLib::Math::degree(), and GeographicLib::Math::tauf().
Math::real GeographicLib::Ellipsoid::CircleRadius | ( | real | phi | ) | const |
[in] | phi | the geographic latitude (degrees). |
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold.
Definition at line 96 of file Ellipsoid.cpp.
References GeographicLib::Math::LatFix(), GeographicLib::Math::qd, and GeographicLib::Math::tand().
Math::real GeographicLib::Ellipsoid::CircleHeight | ( | real | phi | ) | const |
[in] | phi | the geographic latitude (degrees). |
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold.
Definition at line 102 of file Ellipsoid.cpp.
References GeographicLib::Math::LatFix(), and GeographicLib::Math::tand().
Math::real GeographicLib::Ellipsoid::MeridianDistance | ( | real | phi | ) | const |
[in] | phi | the geographic latitude (degrees). |
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold.
Definition at line 109 of file Ellipsoid.cpp.
References GeographicLib::EllipticFunction::Ed(), and ParametricLatitude().
Referenced by RectifyingLatitude().
Math::real GeographicLib::Ellipsoid::MeridionalCurvatureRadius | ( | real | phi | ) | const |
[in] | phi | the geographic latitude (degrees). |
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold.
Definition at line 112 of file Ellipsoid.cpp.
References GeographicLib::Math::LatFix(), GeographicLib::Math::sind(), and GeographicLib::Math::sq().
Math::real GeographicLib::Ellipsoid::TransverseCurvatureRadius | ( | real | phi | ) | const |
[in] | phi | the geographic latitude (degrees). |
φ must lie in the range [−90°, 90°]; the result is undefined if this condition does not hold.
Definition at line 117 of file Ellipsoid.cpp.
References GeographicLib::Math::LatFix(), GeographicLib::Math::sind(), and GeographicLib::Math::sq().
Math::real GeographicLib::Ellipsoid::NormalCurvatureRadius | ( | real | phi, |
real | azi | ||
) | const |
[in] | phi | the geographic latitude (degrees). |
[in] | azi | the angle between the meridian and the normal section (degrees). |
φ must lie in the range [−90°, 90°]; the result is undefined this condition does not hold.
Definition at line 122 of file Ellipsoid.cpp.
References GeographicLib::Math::LatFix(), GeographicLib::Math::sincosd(), GeographicLib::Math::sind(), and GeographicLib::Math::sq().
|
inlinestatic |
[in] | fp | = f ' = (a − b) / b, the second flattening. |
f ' should lie in (−1, ∞). The returned value f lies in (−∞, 1).
Definition at line 416 of file Ellipsoid.hpp.
|
inlinestatic |
[in] | f | = (a − b) / a, the flattening. |
f should lie in (−∞, 1). The returned value f ' lies in (−1, ∞).
Definition at line 426 of file Ellipsoid.hpp.
|
inlinestatic |
[in] | n | = (a − b) / (a + b), the third flattening. |
n should lie in (−1, 1). The returned value f lies in (−∞, 1).
Definition at line 437 of file Ellipsoid.hpp.
|
inlinestatic |
[in] | f | = (a − b) / a, the flattening. |
f should lie in (−∞, 1). The returned value n lies in (−1, 1).
Definition at line 448 of file Ellipsoid.hpp.
|
inlinestatic |
[in] | e2 | = e2 = (a2 − b2) / a2, the eccentricity squared. |
e2 should lie in (−∞, 1). The returned value f lies in (−∞, 1).
Definition at line 460 of file Ellipsoid.hpp.
|
inlinestatic |
[in] | f | = (a − b) / a, the flattening. |
f should lie in (−∞, 1). The returned value e2 lies in (−∞, 1).
Definition at line 472 of file Ellipsoid.hpp.
|
inlinestatic |
[in] | ep2 | = e' 2 = (a2 − b2) / b2, the second eccentricity squared. |
e' 2 should lie in (−1, ∞). The returned value f lies in (−∞, 1).
Definition at line 484 of file Ellipsoid.hpp.
|
inlinestatic |
[in] | f | = (a − b) / a, the flattening. |
f should lie in (−∞, 1). The returned value e' 2 lies in (−1, ∞).
Definition at line 496 of file Ellipsoid.hpp.
References GeographicLib::Math::sq().
|
inlinestatic |
[in] | epp2 | = e'' 2 = (a2 − b2) / (a2 + b2), the third eccentricity squared. |
e'' 2 should lie in (−1, 1). The returned value f lies in (−∞, 1).
Definition at line 508 of file Ellipsoid.hpp.
|
inlinestatic |
[in] | f | = (a − b) / a, the flattening. |
f should lie in (−∞, 1). The returned value e'' 2 lies in (−1, 1).
Definition at line 522 of file Ellipsoid.hpp.
References GeographicLib::Math::sq().
|
static |
A global instantiation of Ellipsoid with the parameters for the WGS84 ellipsoid.
Definition at line 37 of file Ellipsoid.cpp.
References GeographicLib::Constants::WGS84_a(), and GeographicLib::Constants::WGS84_f().
|
friend |
Definition at line 54 of file Ellipsoid.hpp.
|
friend |
Definition at line 54 of file Ellipsoid.hpp.