JSBSim Flight Dynamics Model
1.1.11 (13 Feb 2022)
An Open Source Flight Dynamics and Control Software Library in C++
FGFilter.h
1
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
3
Header: FGFilter.h
4
Author: Jon S. Berndt
5
Date started: 4/2000
6
7
------------- Copyright (C) 2000 Jon S. Berndt jon@jsbsim.org -------------
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 FGFILTER_H
34
#define FGFILTER_H
35
36
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
37
INCLUDES
38
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
39
40
#include "FGFCSComponent.h"
41
42
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
43
FORWARD DECLARATIONS
44
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
45
46
namespace
JSBSim {
47
48
class
Element;
49
class
FGPropertyManager;
50
class
FGFCS;
51
52
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
53
CLASS DOCUMENTATION
54
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
55
211
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
212
CLASS DECLARATION
213
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
214
215
class
FGFilter
:
public
FGFCSComponent
216
{
217
public
:
218
FGFilter
(
FGFCS
* fcs,
Element
* element);
219
~
FGFilter
();
220
221
bool
Run (
void
)
override
;
222
223
void
ResetPastStates(
void
)
override
;
224
225
private
:
226
bool
DynamicFilter;
229
bool
Initialize;
230
double
ca, cb, cc, cd, ce;
231
FGParameter_ptr C[7];
// There are 6 coefficients, indexing is "1" based.
232
double
PreviousInput1, PreviousInput2;
233
double
PreviousOutput1, PreviousOutput2;
234
235
enum
{eLag, eLeadLag, eOrder2, eWashout, eUnknown} FilterType;
236
237
void
CalculateDynamicFilters(
void
);
238
void
ReadFilterCoefficients(
Element
* el,
int
index);
239
void
Debug(
int
from)
override
;
240
};
241
}
242
#endif
243
JSBSim::FGFCSComponent
Base class for JSBSim Flight Control System Components.
Definition:
FGFCSComponent.h:84
JSBSim::FGFilter
Encapsulates a filter for the flight control system.
Definition:
FGFilter.h:215
JSBSim::FGFCS
Encapsulates the Flight Control System (FCS) functionality.
Definition:
FGFCS.h:187
JSBSim::Element
Definition:
FGXMLElement.h:143
src
models
flight_control
FGFilter.h
Generated on Sun Feb 13 2022 13:06:37 for JSBSim Flight Dynamics Model by
1.8.17