]> git.mxchange.org Git - flightgear.git/blob - SplitTris/fg_geodesy.h
Incorporated into gnu automake/autoconf system.
[flightgear.git] / SplitTris / 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  1998/04/08 23:21:12  curt
93 Adopted Gnu automake/autoconf system.
94
95 Revision 1.2  1998/01/22 02:59:38  curt
96 Changed #ifdef FILE_H to #ifdef _FILE_H
97
98 Revision 1.1  1997/07/31 23:13:14  curt
99 Initial revision.
100
101 Revision 1.1  1997/05/29 00:09:56  curt
102 Initial Flight Gear revision.
103
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.
107  *
108  * Revision 1.4  1993/12/14  21:06:47  bjax
109  * Removed global variable references Altitude and Latitude.   EBJ
110  *
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.
114  *
115
116 ----------------------------------------------------------------------------
117
118         REFERENCES:
119
120                 [ 1]    Stevens, Brian L.; and Lewis, Frank L.: "Aircraft 
121                         Control and Simulation", Wiley and Sons, 1992.
122                         ISBN 0-471-61397-5                    
123
124
125 ----------------------------------------------------------------------------
126
127         CALLED BY:      ls_aux
128
129 ----------------------------------------------------------------------------
130
131         CALLS TO:
132
133 ----------------------------------------------------------------------------
134
135         INPUTS: 
136                 lat_geoc        Geocentric latitude, radians, + = North
137                 radius          C.G. radius to earth center, ft
138
139 ----------------------------------------------------------------------------
140
141         OUTPUTS:
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.
146
147 --------------------------------------------------------------------------*/
148
149
150 #endif /* _FG_GEODESY_H */
151
152
153 /* $Log$
154 /* Revision 1.1  1998/04/08 23:21:12  curt
155 /* Adopted Gnu automake/autoconf system.
156 /*
157  * Revision 1.2  1998/01/22 02:59:38  curt
158  * Changed #ifdef FILE_H to #ifdef _FILE_H
159  *
160  * Revision 1.1  1997/07/31 23:13:14  curt
161  * Initial revision.
162  *
163  */