]> git.mxchange.org Git - flightgear.git/blob - src/FDM/JSBSim/FGLGear.h
Code reorganization.
[flightgear.git] / src / FDM / JSBSim / FGLGear.h
1 /*******************************************************************************
2
3  Header:       FGLGear.h
4  Author:       Jon S. Berndt
5  Date started: 11/18/99
6
7  ------------- Copyright (C) 1999  Jon S. Berndt (jsb@hal-pc.org) -------------
8
9  This program is free software; you can redistribute it and/or modify it under
10  the terms of the GNU General Public License as published by the Free Software
11  Foundation; either version 2 of the License, or (at your option) any later
12  version.
13
14  This program is distributed in the hope that it will be useful, but WITHOUT
15  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
17  details.
18
19  You should have received a copy of the GNU General Public License along with
20  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21  Place - Suite 330, Boston, MA  02111-1307, USA.
22
23  Further information about the GNU General Public License can also be found on
24  the world wide web at http://www.gnu.org.
25
26 HISTORY
27 --------------------------------------------------------------------------------
28 11/18/99   JSB   Created
29
30 ********************************************************************************
31 SENTRY
32 *******************************************************************************/
33
34 #ifndef FGLGEAR_H
35 #define FGLGEAR_H
36
37 /*******************************************************************************
38 COMMENTS, REFERENCES,  and NOTES
39 ********************************************************************************
40
41 [1] Cooke, Zyda, Pratt, and McGhee, "NPSNET: Flight Simulation Dynamic Modeling
42          Using Quaternions", Presence, Vol. 1, No. 4, pp. 404-420  Naval Postgraduate
43          School, January 1994
44 [2] D. M. Henderson, "Euler Angles, Quaternions, and Transformation Matrices",
45          JSC 12960, July 1977
46 [3] Richard E. McFarland, "A Standard Kinematic Model for Flight Simulation at
47          NASA-Ames", NASA CR-2497, January 1975
48 [4] Barnes W. McCormick, "Aerodynamics, Aeronautics, and Flight Mechanics",
49          Wiley & Sons, 1979 ISBN 0-471-03032-5
50 [5] Bernard Etkin, "Dynamics of Flight, Stability and Control", Wiley & Sons,
51          1982 ISBN 0-471-08936-2
52
53 ********************************************************************************
54 INCLUDES
55 *******************************************************************************/
56
57 #ifdef FGFS
58 #  include <simgear/compiler.h>
59 #  include STL_STRING
60 #  ifdef FG_HAVE_STD_INCLUDES
61 #    include <fstream>
62 #  else
63 #    include <fstream.h>
64 #  endif
65    FG_USING_STD(string);
66 #else
67 #  include <fstream>
68 #  include <string>
69 #endif
70
71 /*******************************************************************************
72 DEFINITIONS
73 *******************************************************************************/
74
75 using namespace std;
76
77 /*******************************************************************************
78 CLASS DECLARATION
79 *******************************************************************************/
80
81 class FGLGear
82 {
83 public:
84   FGLGear(ifstream&);
85   ~FGLGear(void);
86
87   float Force(void);
88 private:
89   float X, Y, Z;
90   float kSpring, bDamp, compressLength;
91   float statFCoeff, rollFCoeff, skidFCoeff;
92   float frictionForce, compForce;
93   float brakePct, brakeForce, brakeCoeff;
94   string name;
95 };
96
97 /******************************************************************************/
98 #endif