#include <simgear/constants.h>
#include <simgear/math/point3d.hxx>
#include "SGMath.hxx"
Go to the source code of this file.
Functions | |
| double | sgGeodAltFromCart (const Point3D &p) |
| Find the Altitude above the Ellipsoid (WGS84) given the Earth Centered Cartesian coordinate vector Distances are specified in meters. | |
| Point3D | sgPolarToCart3d (const Point3D &p) |
| Convert a polar coordinate to a cartesian coordinate. | |
| Point3D | sgCartToPolar3d (const Point3D &p) |
| Convert a cartesian coordinate to polar coordinates (lon/lat specified in radians. | |
| Point3D | calc_gc_lon_lat (const Point3D &orig, double course, double dist) |
| Calculate new lon/lat given starting lon/lat, and offset radial, and distance. | |
| void | calc_gc_course_dist (const Point3D &start, const Point3D &dest, double *course, double *dist) |
| Calculate course/dist given two spherical points. | |
Definition in file polar3d.hxx.
| void calc_gc_course_dist | ( | const Point3D & | start, | |
| const Point3D & | dest, | |||
| double * | course, | |||
| double * | dist | |||
| ) |
Calculate course/dist given two spherical points.
| start | starting point | |
| dest | ending point | |
| course | resulting course | |
| dist | resulting distance |
Definition at line 81 of file polar3d.cxx.
References SG_EPSILON, SG_NM_TO_METER, SG_RAD_TO_NM, SGD_2PI, Point3D::x(), and Point3D::y().
Calculate new lon/lat given starting lon/lat, and offset radial, and distance.
NOTE: starting point is specifed in radians, distance is specified in meters (and converted internally to radians) ... assumes a spherical world.
| orig | specified in polar coordinates | |
| course | offset radial | |
| dist | offset distance |
Definition at line 43 of file polar3d.cxx.
References Point3D::setx(), Point3D::sety(), SG_EPSILON, SG_METER_TO_NM, SG_NM_TO_RAD, SGD_2PI, Point3D::x(), and Point3D::y().
Convert a cartesian coordinate to polar coordinates (lon/lat specified in radians.
Distances are specified in meters.
| cp | point specified in cartesian coordinates |
Definition at line 77 of file polar3d.hxx.
References Point3D::fromSGGeoc(), SGGeodesy::SGCartToGeoc(), Point3D::x(), Point3D::y(), and Point3D::z().
| double sgGeodAltFromCart | ( | const Point3D & | p | ) | [inline] |
Find the Altitude above the Ellipsoid (WGS84) given the Earth Centered Cartesian coordinate vector Distances are specified in meters.
| cp | point specified in cartesian coordinates |
Definition at line 48 of file polar3d.hxx.
References SGGeod::getElevationM(), SGGeodesy::SGCartToGeod(), Point3D::x(), Point3D::y(), and Point3D::z().
Convert a polar coordinate to a cartesian coordinate.
Lon and Lat must be specified in radians. The SG convention is for distances to be specified in meters
| p | point specified in polar coordinates |
Definition at line 63 of file polar3d.hxx.
References SGGeoc::fromRadM(), Point3D::fromSGVec3(), Point3D::lat(), Point3D::lon(), Point3D::radius(), and SGGeodesy::SGGeocToCart().
1.5.1