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 **************************************************************************/
18 /* fgGeocToGeod(lat_geoc, radius, *lat_geod, *alt, *sea_level_r)
20 * lat_geoc Geocentric latitude, radians, + = North
21 * radius C.G. radius to earth center, ft
24 * lat_geod Geodetic latitude, radians, + = North
25 * alt C.G. altitude above mean sea level, ft
26 * sea_level_r radius from earth center to sea level at
27 * local vertical (surface normal) of C.G.
30 void fgGeocToGeod( double lat_geoc, double radius, double
31 *lat_geod, double *alt, double *sea_level_r );
33 /* fgGeodToGeoc( lat_geod, alt, *sl_radius, *lat_geoc )
35 * lat_geod Geodetic latitude, radians, + = North
36 * alt C.G. altitude above mean sea level, ft
39 * sl_radius SEA LEVEL radius to earth center, ft (add Altitude to
40 * get true distance from earth center.
41 * lat_geoc Geocentric latitude, radians, + = North
45 void fgGeodToGeoc( double lat_geod, double alt, double *sl_radius,
50 /***************************************************************************
54 ----------------------------------------------------------------------------
56 FUNCTION: Converts geocentric coordinates to geodetic positions
58 ----------------------------------------------------------------------------
60 MODULE STATUS: developmental
62 ----------------------------------------------------------------------------
64 GENEALOGY: Written as part of LaRCSim project by E. B. Jackson
66 ----------------------------------------------------------------------------
68 DESIGNED BY: E. B. Jackson
70 CODED BY: E. B. Jackson
72 MAINTAINED BY: E. B. Jackson
74 ----------------------------------------------------------------------------
80 930208 Modified to avoid singularity near polar region. EBJ
81 930602 Moved backwards calcs here from ls_step. EBJ
82 931214 Changed erroneous Latitude and Altitude variables to
83 *lat_geod and *alt in routine ls_geoc_to_geod. EBJ
84 940111 Changed header files from old ls_eom.h style to ls_types,
85 and ls_constants. Also replaced old DATA type with new
92 Revision 1.1 1997/07/31 23:13:14 curt
95 Revision 1.1 1997/05/29 00:09:56 curt
96 Initial Flight Gear revision.
98 * Revision 1.5 1994/01/11 18:47:05 bjax
99 * Changed include files to use types and constants, not ls_eom.h
100 * Also changed DATA type to SCALAR type.
102 * Revision 1.4 1993/12/14 21:06:47 bjax
103 * Removed global variable references Altitude and Latitude. EBJ
105 * Revision 1.3 1993/06/02 15:03:40 bjax
106 * Made new subroutine for calculating geodetic to geocentric; changed name
107 * of forward conversion routine from ls_geodesy to ls_geoc_to_geod.
110 ----------------------------------------------------------------------------
114 [ 1] Stevens, Brian L.; and Lewis, Frank L.: "Aircraft
115 Control and Simulation", Wiley and Sons, 1992.
119 ----------------------------------------------------------------------------
123 ----------------------------------------------------------------------------
127 ----------------------------------------------------------------------------
130 lat_geoc Geocentric latitude, radians, + = North
131 radius C.G. radius to earth center, ft
133 ----------------------------------------------------------------------------
136 lat_geod Geodetic latitude, radians, + = North
137 alt C.G. altitude above mean sea level, ft
138 sea_level_r radius from earth center to sea level at
139 local vertical (surface normal) of C.G.
141 --------------------------------------------------------------------------*/
144 #endif /* FG_GEODESY_H */
148 /* Revision 1.1 1997/07/31 23:13:14 curt