GeographicLib 2.1.2
|
Conversions between auxiliary latitudes. More...
#include <AuxLatitude.hpp>
Public Types | |
enum | aux { GEOGRAPHIC , PARAMETRIC , GEOCENTRIC , RECTIFYING , CONFORMAL , AUTHALIC , AUXNUMBER , COMMON , GEODETIC , REDUCED } |
typedef T | real |
typedef AuxAngle< real > | angle |
Public Member Functions | |
AuxLatitude (real f) | |
AuxLatitude (real a, real b) | |
angle | Convert (int auxin, int auxout, const angle &zeta, bool series=false) const |
angle | ToAuxiliary (int auxout, const angle &phi, real *diff=nullptr) const |
angle | FromAuxiliary (int auxin, const angle &zeta, int *niter=nullptr) const |
real | Flattening () const |
Static Public Attributes | |
static const int | Lmax |
Conversions between auxiliary latitudes.
This class is an implementation of the methods described in
The provides accurate conversions between geographic (phi, φ), parametric (beta, β), geocentric (theta, θ), rectifying (mu, μ), conformal (chi, χ), and authalic (xi, ξ) latitudes for an ellipsoid of revolution. A latitude is represented by an AuxAngle in order to maintain precision close to the poles.
The class implements two methods for the conversion:
The series method is the preferred method of conversion for any conversion involving μ, χ, or ξ, with abs(f) ≤ 1/150. The equations for the conversions between φ, β, and θ are sufficiently simple that the exact method should be used for such conversions and also for conversions with with abs(f) > 1/150.
T | the floating-point type to use. |
Example of use:
For more information on this projection, see Auxiliary latitudes.
Definition at line 271 of file AuxLatitude.hpp.
typedef T GeographicLib::AuxLatitude< T >::real |
The floating-point type for real numbers. This just connects to the template parameters for the class.
Definition at line 277 of file AuxLatitude.hpp.
typedef AuxAngle<real> GeographicLib::AuxLatitude< T >::angle |
The type used to represent angles.
Definition at line 281 of file AuxLatitude.hpp.
enum GeographicLib::AuxLatitude::aux |
The different auxiliary latitudes.
Definition at line 285 of file AuxLatitude.hpp.
GeographicLib::AuxLatitude< T >::AuxLatitude | ( | real | f | ) |
Constructor
[in] | f | flattening of ellipsoid. Setting f = 0 gives a sphere. Negative f gives a prolate ellipsoid. |
Definition at line 90 of file AuxLatitude.cpp.
References GeographicLib::AuxLatitude< T >::AUXNUMBER, and GeographicLib::AuxLatitude< T >::Lmax.
GeographicLib::AuxLatitude< T >::AuxLatitude | ( | real | a, |
real | b | ||
) |
Constructor
[in] | a | equatorial radius. |
[in] | b | polar semi-axis. |
Definition at line 123 of file AuxLatitude.cpp.
References GeographicLib::AuxLatitude< T >::AUXNUMBER, and GeographicLib::AuxLatitude< T >::Lmax.
AuxAngle< T > GeographicLib::AuxLatitude< T >::Convert | ( | int | auxin, |
int | auxout, | ||
const angle & | zeta, | ||
bool | series = false |
||
) | const |
Convert between any two auxiliary latitudes.
[in] | auxin | an AuxLatitude::aux indicating the type of auxiliary latitude zeta. |
[in] | auxout | an AuxLatitude::aux indicating the type of auxiliary latitude eta. |
[in] | zeta | the input auxiliary latitude. |
[in] | series | if true use the Taylor series instead of the exact equations [default false]. |
With series = true, the Fourier coefficients for a specific auxin and auxout are computed and saved on the first call; the saved coefficients are used on subsequent calls. The series method is accurate for abs(f) ≤ 1/150; for other f, the exact method should be used
Definition at line 416 of file AuxLatitude.cpp.
References GeographicLib::AuxAngle< T >::normalized(), GeographicLib::AuxAngle< T >::x(), and GeographicLib::AuxAngle< T >::y().
AuxAngle< T > GeographicLib::AuxLatitude< T >::ToAuxiliary | ( | int | auxout, |
const angle & | phi, | ||
real * | diff = nullptr |
||
) | const |
Convert geographic latitude to an auxiliary latitude eta.
[in] | auxout | an AuxLatitude::aux indicating the auxiliary latitude returned. |
[in] | phi | the geographic latitude. |
[out] | diff | optional pointer to the derivative d tan(eta) / d tan(phi). |
This uses the exact equations.
Definition at line 304 of file AuxLatitude.cpp.
AuxAngle< T > GeographicLib::AuxLatitude< T >::FromAuxiliary | ( | int | auxin, |
const angle & | zeta, | ||
int * | niter = nullptr |
||
) | const |
Convert an auxiliary latitude zeta to geographic latitude.
[in] | auxin | an AuxLatitude::aux indicating the type of auxiliary latitude zeta. |
[in] | zeta | the input auxiliary latitude. |
[out] | niter | optional pointer to the number of iterations. |
This uses the exact equations.
Definition at line 321 of file AuxLatitude.cpp.
References GeographicLib::AuxAngle< T >::copyquadrant(), GeographicLib::AuxAngle< T >::tan(), GeographicLib::AuxAngle< T >::x(), and GeographicLib::AuxAngle< T >::y().
|
inline |
Definition at line 409 of file AuxLatitude.hpp.
|
static |
The order of the series expansions. This is set at compile time to either 4, 6, or 8, by the preprocessor macro GEOGRAPHICLIB_AUXLATITUDE_ORDER.
Definition at line 416 of file AuxLatitude.hpp.
Referenced by GeographicLib::AuxLatitude< T >::AuxLatitude().