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 1998/04/08 23:22:15 curt
93 Adopted Gnu automake/autoconf system.
95 Revision 1.2 1998/01/22 02:59:38 curt
96 Changed #ifdef FILE_H to #ifdef _FILE_H
98 Revision 1.1 1997/07/31 23:13:14 curt
101 Revision 1.1 1997/05/29 00:09:56 curt
102 Initial Flight Gear revision.
104 * Revision 1.5 1994/01/11 18:47:05 bjax
105 * Changed include files to use types and constants, not ls_eom.h
106 * Also changed DATA type to SCALAR type.
108 * Revision 1.4 1993/12/14 21:06:47 bjax
109 * Removed global variable references Altitude and Latitude. EBJ
111 * Revision 1.3 1993/06/02 15:03:40 bjax
112 * Made new subroutine for calculating geodetic to geocentric; changed name
113 * of forward conversion routine from ls_geodesy to ls_geoc_to_geod.
116 ----------------------------------------------------------------------------
120 [ 1] Stevens, Brian L.; and Lewis, Frank L.: "Aircraft
121 Control and Simulation", Wiley and Sons, 1992.
125 ----------------------------------------------------------------------------
129 ----------------------------------------------------------------------------
133 ----------------------------------------------------------------------------
136 lat_geoc Geocentric latitude, radians, + = North
137 radius C.G. radius to earth center, ft
139 ----------------------------------------------------------------------------
142 lat_geod Geodetic latitude, radians, + = North
143 alt C.G. altitude above mean sea level, ft
144 sea_level_r radius from earth center to sea level at
145 local vertical (surface normal) of C.G.
147 --------------------------------------------------------------------------*/
150 #endif /* _FG_GEODESY_H */
154 /* Revision 1.1 1998/04/08 23:22:15 curt
155 /* Adopted Gnu automake/autoconf system.
157 * Revision 1.2 1998/01/22 02:59:38 curt
158 * Changed #ifdef FILE_H to #ifdef _FILE_H
160 * Revision 1.1 1997/07/31 23:13:14 curt