JSBSim Flight Dynamics Model  1.1.11 (13 Feb 2022)
An Open Source Flight Dynamics and Control Software Library in C++
FGLinearActuator.h
1 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 
3 Header: FGLinearActuator.h
4 Author: Adriano Bassignana
5 Date started: 2019-01-02
6 
7 ------------- Copyright (C) 2019 A. Bassignana -------------
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 FGLINEARACTUATOR_H
34 #define FGLINEARACTUATOR_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 
50 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
51  CLASS DOCUMENTATION
52  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
53 
216 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
217  CLASS DECLARATION
218  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
219 
221 {
222 public:
226  FGLinearActuator(FGFCS* fcs, Element* element);
229 
231  bool Run(void) override;
232 
233 private:
234  FGParameter_ptr ptrSet;
235  bool set = true;
236  FGParameter_ptr ptrReset;
237  bool reset = false;
238  int direction = 0;
239  int countSpin = 0;
240  int versus = 0;
241  FGParameter_ptr ptrVersus;
242  double bias = 0.0;
243  FGParameter_ptr ptrBias;
244  double inputLast = 0.0;
245  double inputMem = 0.0;
246  double module = 1.0;
247  double hysteresis = 0.1;
248  double input = 1.0;
249  double rate = 0.3;
250  double gain = 1.0;
251  double lag = 0.0;
252  double previousLagInput;
253  double previousLagOutput;
254  double ca; // lag filter coefficient "a"
255  double cb; // lag filter coefficient "b"
256 
257  void Debug(int from) override;
258 };
259 }
260 #endif
JSBSim::FGLinearActuator::~FGLinearActuator
~FGLinearActuator()
Destructor.
Definition: FGLinearActuator.cpp:149
JSBSim::FGLinearActuator::FGLinearActuator
FGLinearActuator(FGFCS *fcs, Element *element)
Constructor.
Definition: FGLinearActuator.cpp:51
JSBSim::FGFCSComponent
Base class for JSBSim Flight Control System Components.
Definition: FGFCSComponent.h:84
JSBSim::FGLinearActuator::Run
bool Run(void) override
The execution method for this FCS component.
Definition: FGLinearActuator.cpp:156
JSBSim::FGLinearActuator
Models a flight control system summing component.
Definition: FGLinearActuator.h:220
JSBSim::FGFCS
Encapsulates the Flight Control System (FCS) functionality.
Definition: FGFCS.h:187
JSBSim::Element
Definition: FGXMLElement.h:143