10#include <unordered_map>
11#include <boost/optional.hpp>
20 static const std::unordered_map<std::string, std::pair<double,double>>
custom_ellipsoids = {
21 {
"wgs84", {6378137.0, 298.257223563}},
22 {
"grs80", {6378137.0, 298.257222101}},
23 {
"intl", {6378388.0, 297.0}},
24 {
"bessel", {6377397.155, 299.1528128}},
25 {
"clrk66", {6378206.4, 294.9786982138}},
26 {
"airy", {6377563.396, 299.3249646}},
27 {
"wgs72", {6378135.0, 298.26}},
28 {
"wgs66", {6378145.0, 298.25}},
29 {
"sphere", {6370997.0, std::numeric_limits<double>::infinity()}}
41 double f_inv = std::numeric_limits<double>::infinity();
47 return a * (1.0 -
f());
51 return f() * (2.0 -
f());
54 return e2() / (1.0 -
e2());
95 return Location{
static_cast<float>(x_rot),
static_cast<float>(y_rot),
static_cast<float>(location.
z +
offset_z)};
108 return Location{
static_cast<float>(
x),
static_cast<float>(
y),
static_cast<float>(location.
z -
offset_z)};
116 return !(*
this == rhs);
Ellipsoid(double a, double f_inv)
bool operator==(const Ellipsoid &rhs) const
bool operator!=(const Ellipsoid &rhs) const
bool operator!=(const TransverseMercatorParams &rhs) const
TransverseMercatorParams()=default
bool operator==(const TransverseMercatorParams &rhs) const
TransverseMercatorParams(double lat_0, double lon_0, double k, double x_0, double y_0, Ellipsoid ellps)
UniversalTransverseMercatorParams()=default
bool operator==(const UniversalTransverseMercatorParams &rhs) const
bool operator!=(const UniversalTransverseMercatorParams &rhs) const
UniversalTransverseMercatorParams(int zone, bool north, Ellipsoid ellps, boost::optional< OffsetTransform > offset=boost::none)
boost::optional< OffsetTransform > offset
bool operator==(const WebMercatorParams &rhs) const
bool operator!=(const WebMercatorParams &rhs) const
WebMercatorParams(Ellipsoid ellps)
WebMercatorParams()=default
static const std::unordered_map< std::string, std::pair< double, double > > custom_ellipsoids
This file contains definitions of common data structures used in traffic manager.