1 /**************************************************************************
2 * fg_geodesy.h -- routines to convert between geodetic and geocentric
5 * Copied and adapted directly from LaRCsim/ls_geodesy.c
7 * See below for the complete original LaRCsim comments.
10 * (Log is kept at end of this file)
11 **************************************************************************/
23 /* fgGeocToGeod(lat_geoc, radius, *lat_geod, *alt, *sea_level_r)
25 * lat_geoc Geocentric latitude, radians, + = North
26 * radius C.G. radius to earth center, ft
29 * lat_geod Geodetic latitude, radians, + = North
30 * alt C.G. altitude above mean sea level, ft
31 * sea_level_r radius from earth center to sea level at
32 * local vertical (surface normal) of C.G.
35 void fgGeocToGeod( double lat_geoc, double radius, double
36 *lat_geod, double *alt, double *sea_level_r );
38 /* fgGeodToGeoc( lat_geod, alt, *sl_radius, *lat_geoc )
40 * lat_geod Geodetic latitude, radians, + = North
41 * alt C.G. altitude above mean sea level, ft
44 * sl_radius SEA LEVEL radius to earth center, ft (add Altitude to
45 * get true distance from earth center.
46 * lat_geoc Geocentric latitude, radians, + = North
50 void fgGeodToGeoc( double lat_geod, double alt, double *sl_radius,
55 /***************************************************************************
59 ----------------------------------------------------------------------------
61 FUNCTION: Converts geocentric coordinates to geodetic positions
63 ----------------------------------------------------------------------------
65 MODULE STATUS: developmental
67 ----------------------------------------------------------------------------
69 GENEALOGY: Written as part of LaRCSim project by E. B. Jackson
71 ----------------------------------------------------------------------------
73 DESIGNED BY: E. B. Jackson
75 CODED BY: E. B. Jackson
77 MAINTAINED BY: E. B. Jackson
79 ----------------------------------------------------------------------------
85 930208 Modified to avoid singularity near polar region. EBJ
86 930602 Moved backwards calcs here from ls_step. EBJ
87 931214 Changed erroneous Latitude and Altitude variables to
88 *lat_geod and *alt in routine ls_geoc_to_geod. EBJ
89 940111 Changed header files from old ls_eom.h style to ls_types,
90 and ls_constants. Also replaced old DATA type with new
97 Revision 1.3 1998/04/21 17:03:48 curt
98 Prepairing for C++ integration.
100 Revision 1.2 1998/01/22 02:59:38 curt
101 Changed #ifdef FILE_H to #ifdef _FILE_H
103 Revision 1.1 1997/07/31 23:13:14 curt
106 Revision 1.1 1997/05/29 00:09:56 curt
107 Initial Flight Gear revision.
109 * Revision 1.5 1994/01/11 18:47:05 bjax
110 * Changed include files to use types and constants, not ls_eom.h
111 * Also changed DATA type to SCALAR type.
113 * Revision 1.4 1993/12/14 21:06:47 bjax
114 * Removed global variable references Altitude and Latitude. EBJ
116 * Revision 1.3 1993/06/02 15:03:40 bjax
117 * Made new subroutine for calculating geodetic to geocentric; changed name
118 * of forward conversion routine from ls_geodesy to ls_geoc_to_geod.
121 ----------------------------------------------------------------------------
125 [ 1] Stevens, Brian L.; and Lewis, Frank L.: "Aircraft
126 Control and Simulation", Wiley and Sons, 1992.
130 ----------------------------------------------------------------------------
134 ----------------------------------------------------------------------------
138 ----------------------------------------------------------------------------
141 lat_geoc Geocentric latitude, radians, + = North
142 radius C.G. radius to earth center, ft
144 ----------------------------------------------------------------------------
147 lat_geod Geodetic latitude, radians, + = North
148 alt C.G. altitude above mean sea level, ft
149 sea_level_r radius from earth center to sea level at
150 local vertical (surface normal) of C.G.
152 --------------------------------------------------------------------------*/
159 #endif /* _FG_GEODESY_H */
163 /* Revision 1.3 1998/04/21 17:03:48 curt
164 /* Prepairing for C++ integration.
166 * Revision 1.2 1998/01/22 02:59:38 curt
167 * Changed #ifdef FILE_H to #ifdef _FILE_H
169 * Revision 1.1 1997/07/31 23:13:14 curt