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