GeographicLib::LocalCartesian Class Reference

Local Cartesian coordinates. More...

#include <GeographicLib/LocalCartesian.hpp>

List of all members.

Public Member Functions

 LocalCartesian (real lat0, real lon0, real h0=0, const Geocentric &earth=Geocentric::WGS84) throw ()
 LocalCartesian (const Geocentric &earth=Geocentric::WGS84) throw ()
void Reset (real lat0, real lon0, real h0=0) throw ()
void Forward (real lat, real lon, real h, real &x, real &y, real &z) const throw ()
void Reverse (real x, real y, real z, real &lat, real &lon, real &h) const throw ()
Math::real LatitudeOrigin () const throw ()
Math::real LongitudeOrigin () const throw ()
Math::real HeightOrigin () const throw ()
Math::real MajorRadius () const throw ()
Math::real InverseFlattening () const throw ()

Detailed Description

Local Cartesian coordinates.

Convert between geodetic coordinates latitude = lat, longitude = lon, height = h (measured vertically from the surface of the ellipsoid) to local cartesian coordinates (x, y, z). The origin of local cartesian coordinate system is at lat = lat0, lon = lon0, h = h0. The z axis is normal to the ellipsoid; the y axis points due north. The plane z = - h0 is tangent to the ellipsoid.

The conversions all take place via geocentric coordinates using a GeographicLib::Geocentric object (by default GeographicLib::Geocentric::WGS84).

Definition at line 33 of file LocalCartesian.hpp.


Constructor & Destructor Documentation

GeographicLib::LocalCartesian::LocalCartesian ( real  lat0,
real  lon0,
real  h0 = 0,
const Geocentric earth = Geocentric::WGS84 
) throw () [inline]

Constructor setting the origin to latitude = lat0, longitude = lon0 (degrees), height = h0 (meters). The optional earth argument (default Geocentric::WGS84) specifies the Geocentric object to use for the transformation.

Definition at line 50 of file LocalCartesian.hpp.

References Reset().

GeographicLib::LocalCartesian::LocalCartesian ( const Geocentric earth = Geocentric::WGS84  )  throw () [inline, explicit]

Default constructor sets the origin to lat0 = 0, lon0 = 0, h0 = 0. The optional earth argument (default Geocentric::WGS84) specifies the Geocentric object to use for the transformation.

Definition at line 60 of file LocalCartesian.hpp.

References Reset().


Member Function Documentation

void GeographicLib::LocalCartesian::Reset ( real  lat0,
real  lon0,
real  h0 = 0 
) throw ()

Change the origin to latitude = lat0, longitude = lon0 (degrees), height = h0 (meters).

Definition at line 21 of file LocalCartesian.cpp.

Referenced by LocalCartesian().

void GeographicLib::LocalCartesian::Forward ( real  lat,
real  lon,
real  h,
real &  x,
real &  y,
real &  z 
) const throw ()

Convert from geodetic coordinates lat, lon (degrees), h (meters) to local cartesian coordinates x, y, z (meters). lat should be in the range [-90, 90]; lon and lon0 should be in the range [-180, 360].

Definition at line 41 of file LocalCartesian.cpp.

void GeographicLib::LocalCartesian::Reverse ( real  x,
real  y,
real  z,
real &  lat,
real &  lon,
real &  h 
) const throw ()

Convert from local cartesian x, y, z (meters) to geodetic coordinates lat, lon (degrees), h (meters). The value of lon returned is in the range [-180, 180).

Definition at line 51 of file LocalCartesian.cpp.

Math::real GeographicLib::LocalCartesian::LatitudeOrigin (  )  const throw () [inline]

Return the latitude of the origin (degrees).

Definition at line 92 of file LocalCartesian.hpp.

Math::real GeographicLib::LocalCartesian::LongitudeOrigin (  )  const throw () [inline]

Return the longitude of the origin (degrees).

Definition at line 97 of file LocalCartesian.hpp.

Math::real GeographicLib::LocalCartesian::HeightOrigin (  )  const throw () [inline]

Return the height of the origin (meters).

Definition at line 102 of file LocalCartesian.hpp.

Math::real GeographicLib::LocalCartesian::MajorRadius (  )  const throw () [inline]

The major radius of the ellipsoid (meters). This is that value of a inherited from the Geocentric object used in the constructor.

Definition at line 108 of file LocalCartesian.hpp.

References GeographicLib::Geocentric::MajorRadius().

Math::real GeographicLib::LocalCartesian::InverseFlattening (  )  const throw () [inline]

The inverse flattening of the ellipsoid. This is that value of r inherited from the Geocentric object used in the constructor. A value of 0 is returned for a sphere (infinite inverse flattening).

Definition at line 115 of file LocalCartesian.hpp.

References GeographicLib::Geocentric::InverseFlattening().


The documentation for this class was generated from the following files:

Generated on 21 May 2010 for GeographicLib by  doxygen 1.6.1