Constants needed by GeographicLib
More...
#include <GeographicLib/Constants.hpp>
Constants needed by GeographicLib
Define constants specifying the WGS84 ellipsoid, the UTM and UPS projections, and various unit conversions.
Example of use:
#include <iostream>
#include <exception>
try {
cout << "WGS84 parameters:\n"
}
catch (const exception& e) {
cerr << "Caught exception: " << e.what() << "\n";
return 1;
}
}
int main(int argc, const char *const argv[])
Header for GeographicLib::Constants class.
Namespace for GeographicLib.
Definition at line 107 of file Constants.hpp.
◆ degree()
static Math::real GeographicLib::Constants::degree |
( |
| ) |
|
|
inlinestatic |
◆ arcminute()
static Math::real GeographicLib::Constants::arcminute |
( |
| ) |
|
|
inlinestatic |
◆ arcsecond()
static Math::real GeographicLib::Constants::arcsecond |
( |
| ) |
|
|
inlinestatic |
◆ WGS84_a()
template<typename T = real>
static T GeographicLib::Constants::WGS84_a |
( |
| ) |
|
|
inlinestatic |
- Template Parameters
-
T | the type of the returned value. |
- Returns
- the equatorial radius of WGS84 ellipsoid (6378137 m).
Definition at line 135 of file Constants.hpp.
Referenced by GeographicLib::AlbersEqualArea::AzimuthalEqualAreaNorth(), GeographicLib::AlbersEqualArea::AzimuthalEqualAreaSouth(), GeographicLib::AlbersEqualArea::CylindricalEqualArea(), GeographicLib::UTMUPS::EquatorialRadius(), GeographicLib::Geoid::EquatorialRadius(), GeographicLib::LambertConformalConic::Mercator(), GeographicLib::PolarStereographic::UPS(), GeographicLib::TransverseMercator::UTM(), GeographicLib::TransverseMercatorExact::UTM(), GeographicLib::Ellipsoid::WGS84(), GeographicLib::Geocentric::WGS84(), GeographicLib::Geodesic::WGS84(), GeographicLib::GeodesicExact::WGS84(), GeographicLib::NormalGravity::WGS84(), and GeographicLib::Rhumb::WGS84().
◆ WGS84_f()
template<typename T = real>
static T GeographicLib::Constants::WGS84_f |
( |
| ) |
|
|
inlinestatic |
- Template Parameters
-
T | the type of the returned value. |
- Returns
- the flattening of WGS84 ellipsoid (1/298.257223563).
Definition at line 141 of file Constants.hpp.
Referenced by GeographicLib::AlbersEqualArea::AzimuthalEqualAreaNorth(), GeographicLib::AlbersEqualArea::AzimuthalEqualAreaSouth(), GeographicLib::AlbersEqualArea::CylindricalEqualArea(), GeographicLib::UTMUPS::Flattening(), GeographicLib::Geoid::Flattening(), GeographicLib::LambertConformalConic::Mercator(), GeographicLib::PolarStereographic::UPS(), GeographicLib::TransverseMercator::UTM(), GeographicLib::TransverseMercatorExact::UTM(), GeographicLib::Ellipsoid::WGS84(), GeographicLib::Geocentric::WGS84(), GeographicLib::Geodesic::WGS84(), GeographicLib::GeodesicExact::WGS84(), GeographicLib::NormalGravity::WGS84(), and GeographicLib::Rhumb::WGS84().
◆ WGS84_GM()
template<typename T = real>
static T GeographicLib::Constants::WGS84_GM |
( |
| ) |
|
|
inlinestatic |
◆ WGS84_omega()
template<typename T = real>
static T GeographicLib::Constants::WGS84_omega |
( |
| ) |
|
|
inlinestatic |
◆ GRS80_a()
template<typename T = real>
static T GeographicLib::Constants::GRS80_a |
( |
| ) |
|
|
inlinestatic |
◆ GRS80_GM()
template<typename T = real>
static T GeographicLib::Constants::GRS80_GM |
( |
| ) |
|
|
inlinestatic |
◆ GRS80_omega()
template<typename T = real>
static T GeographicLib::Constants::GRS80_omega |
( |
| ) |
|
|
inlinestatic |
- Template Parameters
-
T | the type of the returned value. |
- Returns
- the angular velocity of the GRS80 ellipsoid, ω, in rad s−1.
This is about 2 π 366.25 / (365.25 × 24 × 3600) rad s−1. 365.25 is the number of days in a Julian year and 365.35/366.25 converts from solar days to sidereal days. Using the number of days in a Gregorian year (365.2425) results in a worse approximation (because the Gregorian year includes the precession of the earth's axis).
Definition at line 186 of file Constants.hpp.
Referenced by GeographicLib::NormalGravity::GRS80().
◆ GRS80_J2()
template<typename T = real>
static T GeographicLib::Constants::GRS80_J2 |
( |
| ) |
|
|
inlinestatic |
◆ UTM_k0()
template<typename T = real>
static T GeographicLib::Constants::UTM_k0 |
( |
| ) |
|
|
inlinestatic |
◆ UPS_k0()
template<typename T = real>
static T GeographicLib::Constants::UPS_k0 |
( |
| ) |
|
|
inlinestatic |
◆ meter()
template<typename T = real>
static T GeographicLib::Constants::meter |
( |
| ) |
|
|
inlinestatic |
- Template Parameters
-
T | the type of the returned value. |
- Returns
- the number of meters in a meter.
This is unity, but this lets the internal system of units be changed if necessary.
Definition at line 219 of file Constants.hpp.
◆ kilometer()
static Math::real GeographicLib::Constants::kilometer |
( |
| ) |
|
|
inlinestatic |
- Returns
- the number of meters in a kilometer.
Definition at line 223 of file Constants.hpp.
◆ nauticalmile()
static Math::real GeographicLib::Constants::nauticalmile |
( |
| ) |
|
|
inlinestatic |
- Returns
- the number of meters in a nautical mile (approximately 1 arc minute)
Definition at line 229 of file Constants.hpp.
◆ square_meter()
template<typename T = real>
static T GeographicLib::Constants::square_meter |
( |
| ) |
|
|
inlinestatic |
- Template Parameters
-
T | the type of the returned value. |
- Returns
- the number of square meters in a square meter.
This is unity, but this lets the internal system of units be changed if necessary.
Definition at line 239 of file Constants.hpp.
◆ hectare()
static Math::real GeographicLib::Constants::hectare |
( |
| ) |
|
|
inlinestatic |
- Returns
- the number of square meters in a hectare.
Definition at line 244 of file Constants.hpp.
◆ square_kilometer()
static Math::real GeographicLib::Constants::square_kilometer |
( |
| ) |
|
|
inlinestatic |
- Returns
- the number of square meters in a square kilometer.
Definition at line 249 of file Constants.hpp.
◆ square_nauticalmile()
static Math::real GeographicLib::Constants::square_nauticalmile |
( |
| ) |
|
|
inlinestatic |
- Returns
- the number of square meters in a square nautical mile.
Definition at line 254 of file Constants.hpp.
◆ foot()
static Math::real GeographicLib::Constants::foot |
( |
| ) |
|
|
inlinestatic |
- Returns
- the number of meters in an international foot.
Definition at line 264 of file Constants.hpp.
◆ yard()
static Math::real GeographicLib::Constants::yard |
( |
| ) |
|
|
inlinestatic |
- Returns
- the number of meters in a yard.
Definition at line 269 of file Constants.hpp.
◆ fathom()
static Math::real GeographicLib::Constants::fathom |
( |
| ) |
|
|
inlinestatic |
- Returns
- the number of meters in a fathom.
Definition at line 273 of file Constants.hpp.
◆ chain()
static Math::real GeographicLib::Constants::chain |
( |
| ) |
|
|
inlinestatic |
- Returns
- the number of meters in a chain.
Definition at line 277 of file Constants.hpp.
◆ furlong()
static Math::real GeographicLib::Constants::furlong |
( |
| ) |
|
|
inlinestatic |
- Returns
- the number of meters in a furlong.
Definition at line 281 of file Constants.hpp.
◆ mile()
static Math::real GeographicLib::Constants::mile |
( |
| ) |
|
|
inlinestatic |
- Returns
- the number of meters in a statute mile.
Definition at line 285 of file Constants.hpp.
◆ acre()
static Math::real GeographicLib::Constants::acre |
( |
| ) |
|
|
inlinestatic |
- Returns
- the number of square meters in an acre.
Definition at line 289 of file Constants.hpp.
◆ square_mile()
static Math::real GeographicLib::Constants::square_mile |
( |
| ) |
|
|
inlinestatic |
- Returns
- the number of square meters in a square statute mile.
Definition at line 293 of file Constants.hpp.
◆ surveyfoot()
static Math::real GeographicLib::Constants::surveyfoot |
( |
| ) |
|
|
inlinestatic |
- Returns
- the number of meters in a US survey foot.
Definition at line 302 of file Constants.hpp.
◆ GEOGRAPHICLIB_VERSION_NUM
#define GEOGRAPHICLIB_VERSION_NUM |
( |
|
a, |
|
|
|
b, |
|
|
|
c |
|
) |
| ((((a) * 10000 + (b)) * 100) + (c)) |
|
related |
Pack the version components into a single integer. Users should not rely on this particular packing of the components of the version number; see the documentation for GEOGRAPHICLIB_VERSION, below.
Definition at line 21 of file Constants.hpp.
◆ GEOGRAPHICLIB_VERSION
#define GEOGRAPHICLIB_VERSION |
|
related |
Value:
GEOGRAPHICLIB_VERSION_MINOR, \
GEOGRAPHICLIB_VERSION_PATCH)
#define GEOGRAPHICLIB_VERSION_NUM(a, b, c)
The version of GeographicLib as a single integer, packed as MMmmmmpp where MM is the major version, mmmm is the minor version, and pp is the patch level. Users should not rely on this particular packing of the components of the version number. Instead they should use a test such as
#if GEOGRAPHICLIB_VERSION >= GEOGRAPHICLIB_VERSION_NUM(1,37,0)
...
#endif
Definition at line 34 of file Constants.hpp.
The documentation for this class was generated from the following file: