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); }
90 void Reset(real lat0, real lon0, real h0 = 0);
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);
159 void Reverse(real x, real y, real z, real& lat, real& lon, real& h)
161 IntReverse(x, y, z, lat, lon, h, NULL);
189 void Reverse(real x, real y, real z, real& lat, real& lon, real& h,
190 std::vector<real>& M)
192 if (M.end() == M.begin() + dim2_) {
194 IntReverse(x, y, z, lat, lon, h, t);
195 std::copy(t, t + dim2_, M.begin());
197 IntReverse(x, y, z, lat, lon, h, NULL);
236 #endif // GEOGRAPHICLIB_LOCALCARTESIAN_HPP
Math::real HeightOrigin() const
Math::real LongitudeOrigin() const
LocalCartesian(real lat0, real lon0, real h0=0, const Geocentric &earth=Geocentric::WGS84())
#define GEOGRAPHICLIB_EXPORT
Math::real Flattening() const
GeographicLib::Math::real real
static const Geocentric & WGS84()
void Forward(real lat, real lon, real h, real &x, real &y, real &z, std::vector< real > &M) const
Namespace for GeographicLib.
LocalCartesian(const Geocentric &earth=Geocentric::WGS84())
Header for GeographicLib::Geocentric class.
Math::real Flattening() const
Math::real LatitudeOrigin() const
Local cartesian coordinates.
void Forward(real lat, real lon, real h, real &x, real &y, real &z) const
Header for GeographicLib::Constants class.
Math::real MajorRadius() const
void Reverse(real x, real y, real z, real &lat, real &lon, real &h) const
Math::real MajorRadius() const
void Reverse(real x, real y, real z, real &lat, real &lon, real &h, std::vector< real > &M) const