10#if !defined(GEOGRAPHICLIB_LOCALCARTESIAN_HPP)
11#define GEOGRAPHICLIB_LOCALCARTESIAN_HPP 1
41 static const size_t dim_ = 3;
42 static const size_t dim2_ = dim_ * dim_;
44 real _lat0, _lon0, _h0;
45 real _x0, _y0, _z0, _r[dim2_];
46 void IntForward(real lat, real lon, real h, real& x, real& y, real& z,
48 void IntReverse(real x, real y, real z, real& lat, real& lon, real& h,
50 void MatrixMultiply(real M[dim2_])
const;
67 { Reset(lat0, lon0, h0); }
104 void Forward(real lat, real lon, real h, real& x, real& y, real& z)
106 IntForward(lat, lon, h, x, y, z, NULL);
135 void Forward(real lat, real lon, real h, real& x, real& y, real& z,
136 std::vector<real>& M)
138 if (M.end() == M.begin() + dim2_) {
140 IntForward(lat, lon, h, x, y, z, t);
141 std::copy(t, t + dim2_, M.begin());
143 IntForward(lat, lon, h, x, y, z, NULL);
161 void Reverse(real x, real y, real z, real& lat, real& lon, real& h)
163 IntReverse(x, y, z, lat, lon, h, NULL);
191 void Reverse(real x, real y, real z, real& lat, real& lon, real& h,
192 std::vector<real>& M)
194 if (M.end() == M.begin() + dim2_) {
196 IntReverse(x, y, z, lat, lon, h, t);
197 std::copy(t, t + dim2_, M.begin());
199 IntReverse(x, y, z, lat, lon, h, NULL);
Header for GeographicLib::Constants class.
#define GEOGRAPHICLIB_EXPORT
Header for GeographicLib::Geocentric class.
GeographicLib::Math::real real
Math::real Flattening() const
Math::real EquatorialRadius() const
static const Geocentric & WGS84()
Local cartesian coordinates.
void Reverse(real x, real y, real z, real &lat, real &lon, real &h) const
void Forward(real lat, real lon, real h, real &x, real &y, real &z, std::vector< real > &M) const
Math::real HeightOrigin() const
Math::real LatitudeOrigin() const
void Reverse(real x, real y, real z, real &lat, real &lon, real &h, std::vector< real > &M) const
void Forward(real lat, real lon, real h, real &x, real &y, real &z) const
LocalCartesian(real lat0, real lon0, real h0=0, const Geocentric &earth=Geocentric::WGS84())
Math::real LongitudeOrigin() const
Math::real EquatorialRadius() const
Math::real Flattening() const
LocalCartesian(const Geocentric &earth=Geocentric::WGS84())
Namespace for GeographicLib.