Hi fellow wiki editors!
To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).
I have tried to keep the template short, but meaningful. /Johan G
Difference between revisions of "Geographic Coordinate Systems"
m (→Geocentric and Geodetic Coordinates) 
m (http://www.mailarchive.com/flightgeardevel@lists.sourceforge.net/msg10525.html) 

Line 1:  Line 1:  
[[FlightGear]] uses a set of different coordinate systems to express geographic locations.  [[FlightGear]] uses a set of different coordinate systems to express geographic locations.  
All these coordinates are based on the [[WGS84]] [[Ellipsoid]].  All these coordinates are based on the [[WGS84]] [[Ellipsoid]].  
+  
+  Scenery layout, airports, runways, navaids, aircraft positions, and all that sort of stuff is all based on WGS84. There are some additional coordinate systems that FlightGear uses internally, but that is typically hidden deep inside the code.  
== Geocentric and Geodetic Coordinates ==  == Geocentric and Geodetic Coordinates == 
Revision as of 02:28, 27 July 2012
FlightGear uses a set of different coordinate systems to express geographic locations. All these coordinates are based on the WGS84 Ellipsoid.
Scenery layout, airports, runways, navaids, aircraft positions, and all that sort of stuff is all based on WGS84. There are some additional coordinate systems that FlightGear uses internally, but that is typically hidden deep inside the code.
Contents
Geocentric and Geodetic Coordinates
Both geocentric and geodetic coordinates are expressed as a triple of latitude, longitude and altitude. In both cases, altitude is the height of the respective point above the surface of the Ellipsoid and longitude is the angle between the planes parallel to the earth axis and passing through the Greenwich Meridian respectively the point designated by the coordinates.
The difference between geocentric and geodetic coordinates lies in the definition of latitude:
 In geocentric coordinates latitude is the angle between the equatorial plane and the line crossing through the earth's center and the point designated by the coordinates.
 In geodetic coordinates latitude is the angle between the equatorial plane and the normal at the designated point, i.e. the vector standing perpendicular on the Ellipsoid at the designated point.
Note: The positionproperties under /position in the property tree are geodetic coordinates.
Cartesian Geocentric Coordinates
Cartesian geocentric coordinates are defined in terms of a cartesian coordinate system with
 the center of the earth being the origin,
 the zaxis aligned with the earth axis pointing north,
 the xaxis going through the Greenwich Meridian at its intersection with the equator, and
 the yaxis going through the intersection of the meridian at 90 degrees east and the equator.
Conversion
The SimGear library provides static methods for conversion in the class SGGeodesy
, to be found in simgear/math/SGGeodesy.hxx
:

SGGeodesy::SGCartToGeod(const SGVec3<double>& cart, SGGeod& geod)
converts a cartesian point to geodetic coordinates. 
SGGeodesy::SGGeodToCart(const SGGeod& geod, SGVec3<double>& cart)
converts a geodetic point to cartesian coordinates. 
SGGeodesy::SGCartToGeoc(const SGVec3<double>& cart, SGGeoc& geoc)
converts a cartesian point to geocentric coordinates. 
SGGeodesy::SGGeocToCart(const SGGeoc& geoc, SGVec3<double>& cart)
converts a geocentric point to cartesian coordinates.
Further, the classes SGGeod
and SGGeoc
(found in simgear/math/SGGeod.hxx
and simgear/math/SGGeoc.hxx
, respectively) provide static conversion methods for convenience, which use the methods listed above.
Note that most of these conversions are expensive to compute  check the external links to see how it works.
External links
