]> git.mxchange.org Git - flightgear.git/blob - Math/fg_geodesy.h
Changed naming scheme of basic shared structures.
[flightgear.git] / Math / fg_geodesy.h
1 /**************************************************************************
2  * fg_geodesy.h -- routines to convert between geodetic and geocentric 
3  *                 coordinate systems.
4  *
5  * Copied and adapted directly from LaRCsim/ls_geodesy.c
6  *
7  * See below for the complete original LaRCsim comments.
8  *
9  * $Id$
10  * (Log is kept at end of this file)
11  **************************************************************************/
12
13
14 #ifndef FG_GEODESY_H
15 #define FG_GEODESY_H
16
17
18 /* fgGeocToGeod(lat_geoc, radius, *lat_geod, *alt, *sea_level_r)
19  *     INPUTS:  
20  *         lat_geoc     Geocentric latitude, radians, + = North
21  *         radius       C.G. radius to earth center, ft
22  *
23  *     OUTPUTS:
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.
28  */
29
30 void fgGeocToGeod( double lat_geoc, double radius, double
31                    *lat_geod, double *alt, double *sea_level_r );
32
33 /* fgGeodToGeoc( lat_geod, alt, *sl_radius, *lat_geoc )
34  *     INPUTS:  
35  *         lat_geod     Geodetic latitude, radians, + = North
36  *         alt          C.G. altitude above mean sea level, ft
37  *
38  *     OUTPUTS:
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
42  *
43  */
44
45 void fgGeodToGeoc( double lat_geod, double alt, double *sl_radius,
46                    double *lat_geoc );
47
48
49
50 /***************************************************************************
51
52         TITLE:  ls_geodesy
53         
54 ----------------------------------------------------------------------------
55
56         FUNCTION:       Converts geocentric coordinates to geodetic positions
57
58 ----------------------------------------------------------------------------
59
60         MODULE STATUS:  developmental
61
62 ----------------------------------------------------------------------------
63
64         GENEALOGY:      Written as part of LaRCSim project by E. B. Jackson
65
66 ----------------------------------------------------------------------------
67
68         DESIGNED BY:    E. B. Jackson
69         
70         CODED BY:       E. B. Jackson
71         
72         MAINTAINED BY:  E. B. Jackson
73
74 ----------------------------------------------------------------------------
75
76         MODIFICATION HISTORY:
77         
78         DATE    PURPOSE                                         BY
79         
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
86                 SCALAR type.                                            EBJ
87
88         CURRENT RCS HEADER:
89
90 $Header$
91 $Log$
92 Revision 1.1  1997/07/31 23:13:14  curt
93 Initial revision.
94
95 Revision 1.1  1997/05/29 00:09:56  curt
96 Initial Flight Gear revision.
97
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.
101  *
102  * Revision 1.4  1993/12/14  21:06:47  bjax
103  * Removed global variable references Altitude and Latitude.   EBJ
104  *
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.
108  *
109
110 ----------------------------------------------------------------------------
111
112         REFERENCES:
113
114                 [ 1]    Stevens, Brian L.; and Lewis, Frank L.: "Aircraft 
115                         Control and Simulation", Wiley and Sons, 1992.
116                         ISBN 0-471-61397-5                    
117
118
119 ----------------------------------------------------------------------------
120
121         CALLED BY:      ls_aux
122
123 ----------------------------------------------------------------------------
124
125         CALLS TO:
126
127 ----------------------------------------------------------------------------
128
129         INPUTS: 
130                 lat_geoc        Geocentric latitude, radians, + = North
131                 radius          C.G. radius to earth center, ft
132
133 ----------------------------------------------------------------------------
134
135         OUTPUTS:
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.
140
141 --------------------------------------------------------------------------*/
142
143
144 #endif /* FG_GEODESY_H */
145
146
147 /* $Log$
148 /* Revision 1.1  1997/07/31 23:13:14  curt
149 /* Initial revision.
150 /*
151  */