Debian Codegraph @

src/FDM/JSBSim/models/flight_control/FGGyro.h

raw symbols SCIP
1 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
3 Header: FGGyro.h
4 Author: Jon Berndt
5 Date started: 29 August 2009
6
7 ------------- Copyright (C) 2009 -------------
8
9 This program is free software; you can redistribute it and/or modify it under
10 the terms of the GNU Lesser General Public License as published by the Free
11 Software Foundation; either version 2 of the License, or (at your option) any
12 later 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 Lesser General Public License for more
17 details.
18
19 You should have received a copy of the GNU Lesser General Public License along
20 with this program; if not, write to the Free Software Foundation, Inc., 59
21 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
23 Further information about the GNU Lesser General Public License can also be
24 found on the world wide web at http://www.gnu.org.
25
26 HISTORY
27 --------------------------------------------------------------------------------
28
29 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
30 SENTRY
31 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
32
33 #ifndef FGGYRO_H
34 #define FGGYRO_H
35
36 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
37 INCLUDES
38 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
39
40 #include "FGSensor.h"
41 #include "FGSensorOrientation.h"
42
43 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
44 FORWARD DECLARATIONS
45 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
46
47 namespace JSBSim {
48
49 class FGFCS;
50 class FGPropagate;
51
52 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
53 CLASS DOCUMENTATION
54 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
55
56 /** Encapsulates a Gyro component for the flight control system.
57
58 Syntax:
59
60 @code
61 <gyro name="name">
62 <lag> number </lag>
63 <noise variation="PERCENT|ABSOLUTE"> number </noise>
64 <quantization name="name">
65 <bits> number </bits>
66 <min> number </min>
67 <max> number </max>
68 </quantization>
69 <drift_rate> number </drift_rate>
70 <bias> number </bias>
71 </gyro>
72 @endcode
73
74 Example:
75
76 @code
77 <gyro name="aero/gyro/roll">
78 <axis> X </axis>
79 <lag> 0.5 </lag>
80 <noise variation="PERCENT"> 2 </noise>
81 <quantization name="aero/gyro/quantized/qbar">
82 <bits> 12 </bits>
83 <min> 0 </min>
84 <max> 400 </max>
85 </quantization>
86 <bias> 0.5 </bias>
87 </gyro>
88 @endcode
89
90 For noise, if the type is PERCENT, then the value supplied is understood to be a
91 percentage variance. That is, if the number given is 0.05, the the variance is
92 understood to be +/-0.05 percent maximum variance. So, the actual value for the
93 gyro will be *anywhere* from 0.95 to 1.05 of the actual "perfect" value at any
94 time - even varying all the way from 0.95 to 1.05 in adjacent frames - whatever
95 the delta time.
96
97 @author Jon S. Berndt
98 @version $Revision: 1.7 $
99 */
100
101 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
102 CLASS DECLARATION
103 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
104
105 class FGGyro : public FGSensor, public FGSensorOrientation
106 {
107 public:
108 FGGyro(FGFCS* fcs, Element* element);
109 ~FGGyro();
110
111 bool Run (void) override;
112
113 private:
114 FGPropagate* Propagate;
115 FGColumnVector3 Rates;
116 FGColumnVector3 vRates;
117 void CalculateTransformMatrix(void);
118
119 void Debug(int from) override;
120 };
121 }
122 #endif