]> git.mxchange.org Git - flightgear.git/blob - src/FDM/UIUCModel/uiuc_convert.cpp
Make sure sign is preserved for turbulence direction.
[flightgear.git] / src / FDM / UIUCModel / uiuc_convert.cpp
1 /**********************************************************************
2
3  FILENAME:     uiuc_convert.cpp
4
5 ----------------------------------------------------------------------
6
7  DESCRIPTION:  reads conversion type and sets conversion factors 
8
9 ----------------------------------------------------------------------
10
11  STATUS:       alpha version
12
13 ----------------------------------------------------------------------
14
15  REFERENCES:   
16
17 ----------------------------------------------------------------------
18
19  HISTORY:      02/22/2000   initial release
20
21 ----------------------------------------------------------------------
22
23  AUTHOR(S):    Jeff Scott         <jscott@mail.com>
24
25 ----------------------------------------------------------------------
26
27  VARIABLES:
28
29 ----------------------------------------------------------------------
30
31  INPUTS:       -conversion type
32
33 ----------------------------------------------------------------------
34
35  OUTPUTS:      -conversion factor
36
37 ----------------------------------------------------------------------
38
39  CALLED BY:    uiuc_menu.cpp
40
41 ----------------------------------------------------------------------
42
43  CALLS TO:     none
44
45 ----------------------------------------------------------------------
46
47  COPYRIGHT:    (C) 2000 by Michael Selig
48
49  This program is free software; you can redistribute it and/or
50  modify it under the terms of the GNU General Public License
51  as published by the Free Software Foundation.
52
53  This program is distributed in the hope that it will be useful,
54  but WITHOUT ANY WARRANTY; without even the implied warranty of
55  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
56  GNU General Public License for more details.
57
58  You should have received a copy of the GNU General Public License
59  along with this program; if not, write to the Free Software
60  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
61  USA or view http://www.gnu.org/copyleft/gpl.html.
62
63 **********************************************************************/
64
65 #include "uiuc_convert.h"
66
67
68 double uiuc_convert( int conversionType )
69 {
70   double factor;
71
72   switch(conversionType)
73     {
74     case 0:
75       {
76         /* no conversion, multiply by 1 */
77         factor = 1;
78         break;
79       }
80     case 1:
81       {
82         /* convert from degrees to radians */
83         factor = DEG_TO_RAD;
84         break;
85       }
86     };
87   return factor;
88 }
89
90 // end uiuc_convert.cpp