head 1.4; access; symbols; locks; strict; comment @# @; 1.4 date 2002.09.07.01.50.39; author curt; state Exp; branches; next 1.3; 1.3 date 2002.08.31.19.01.56; author curt; state Exp; branches; next 1.2; 1.2 date 2002.08.31.18.54.02; author curt; state Exp; branches; next 1.1; 1.1 date 2002.02.15.17.21.58; author curt; state Exp; branches; next ; desc @@ 1.4 log @Updated doxygen docs. @ text @
Main Page Class Hierarchy Compound List File List Compound Members File Members

# polar3d.hxx File Reference

Routines to deal with polar math and transformations. More...

`#include <math.h>`
`#include <simgear/constants.h>`
`#include <simgear/math/point3d.hxx>`

Go to the source code of this file.

## Functions
double | sgGeodAltFromCart (const Point3D &cp)
| 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 &cp)
| 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.

## Detailed Description

Routines to deal with polar math and transformations.

Definition in file polar3d.hxx.

## Function Documentation

void calc_gc_course_dist | ( | const Point3D & | start,
|  | const Point3D & | dest,
|  | double * | course,
|  | double * | dist
| ) | `[inline]`

  | Calculate course/dist given two spherical points. Parameters:
  start | starting point
  dest | ending point
  course | resulting course
  dist | resulting distance
Definition at line 132 of file polar3d.hxx. References SG_EPSILON, SG_NM_TO_METER, SG_RAD_TO_NM, Point3D::x(), and Point3D::y(). Referenced by SGWayPoint::CourseAndDistance().

Point3D calc_gc_lon_lat | ( | const Point3D & | orig,
|  | double | course,
|  | double | dist
| ) | `[inline]`

  | 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. Parameters:
  orig | specified in polar coordinates
  course | offset radial
  dist | offset distance
Returns: destination point in polar coordinates Definition at line 93 of file polar3d.hxx. References Point3D::setx(), Point3D::sety(), SG_EPSILON, SG_METER_TO_NM, SG_NM_TO_RAD, SGD_2PI, Point3D::x(), and Point3D::y().

Point3D sgCartToPolar3d | ( | const Point3D & | cp | ) | `[inline]`

  | Convert a cartesian coordinate to polar coordinates (lon/lat specified in radians. Distances are specified in meters. Parameters:
  cp | point specified in cartesian coordinates
Returns: the same point in polar coordinates Definition at line 75 of file polar3d.hxx. References SGD_PI_2, Point3D::x(), Point3D::y(), and Point3D::z().

double sgGeodAltFromCart | ( | const Point3D & | cp | ) |

  | Find the Altitude above the Ellipsoid (WGS84) given the Earth Centered Cartesian coordinate vector Distances are specified in meters. Parameters:
  cp | point specified in cartesian coordinates
Returns: altitude above the (wgs84) earth in meters

Point3D sgPolarToCart3d | ( | const Point3D & | p | ) | `[inline]`

  | 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 Parameters:
  p | point specified in polar coordinates
Returns: the same point in cartesian coordinates Definition at line 60 of file polar3d.hxx. References Point3D::lat(), Point3D::lon(), and Point3D::radius(). Referenced by sgGeodToCart().

@ 1.3 log @Oops, try again. @ text @d297 1 a297 1