10 #if !defined(GEOGRAPHICLIB_LOCALCARTESIAN_HPP)
11 #define GEOGRAPHICLIB_LOCALCARTESIAN_HPP 1
16 namespace GeographicLib {
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,
47 real M[dim2_])
const throw();
48 void IntReverse(real x, real y, real z, real& lat, real& lon, real& h,
49 real M[dim2_])
const throw();
50 void MatrixMultiply(real M[dim2_])
const throw();
68 { Reset(lat0, lon0, h0); }
108 void Forward(real lat, real lon, real h, real& x, real& y, real& z)
110 IntForward(lat, lon, h, x, y, z, NULL);
140 void Forward(real lat, real lon, real h, real& x, real& y, real& z,
141 std::vector<real>& M)
143 if (M.end() == M.begin() + dim2_) {
145 IntForward(lat, lon, h, x, y, z, t);
146 copy(t, t + dim2_, M.begin());
148 IntForward(lat, lon, h, x, y, z, NULL);
164 void Reverse(real x, real y, real z, real& lat, real& lon, real& h)
166 IntReverse(x, y, z, lat, lon, h, NULL);
194 void Reverse(real x, real y, real z, real& lat, real& lon, real& h,
195 std::vector<real>& M)
197 if (M.end() == M.begin() + dim2_) {
199 IntReverse(x, y, z, lat, lon, h, t);
200 copy(t, t + dim2_, M.begin());
202 IntReverse(x, y, z, lat, lon, h, NULL);
243 {
return _earth.InverseFlattening(); }
249 #endif // GEOGRAPHICLIB_LOCALCARTESIAN_HPP
#define GEOGRAPHICLIB_EXPORT
LocalCartesian(real lat0, real lon0, real h0=0, const Geocentric &earth=Geocentric::WGS84)
GeographicLib::Math::real real
LocalCartesian(const Geocentric &earth=Geocentric::WGS84)
Math::real Flattening() const
void Reverse(real x, real y, real z, real &lat, real &lon, real &h) const
Math::real LongitudeOrigin() const
static const Geocentric WGS84
Math::real MajorRadius() const
Header for GeographicLib::Geocentric class.
Math::real HeightOrigin() const
Local cartesian coordinates.
void Forward(real lat, real lon, real h, real &x, real &y, real &z, std::vector< real > &M) const
Header for GeographicLib::Constants class.
Math::real LatitudeOrigin() const
void Reverse(real x, real y, real z, real &lat, real &lon, real &h, std::vector< real > &M) const