JSBSim Flight Dynamics Model 1.0 (23 February 2013)
An Open Source Flight Dynamics and Control Software Library in C++

FGFilter Class Reference

Encapsulates a filter for the flight control system. More...

#include <FGFilter.h>

Inheritance diagram for FGFilter:
Collaboration diagram for FGFilter:

List of all members.

Public Types

enum  {
  eLag, eLeadLag, eOrder2, eWashout,
  eIntegrator, eUnknown
}

Public Member Functions

 FGFilter (FGFCS *fcs, Element *element)
void ResetPastStates (void)
bool Run (void)

Public Attributes

enum JSBSim::FGFilter:: { ... }  FilterType
bool Initialize
 When true, causes previous values to be set to current values.

Detailed Description

The filter component can simulate any first or second order filter. The Tustin substitution is used to take filter definitions from LaPlace space to the time domain. The general format for a filter specification is:

<typename name="name">
  <input> property </input>
  <c1> value|property </c1>
  [<c2> value|property </c2>]
  [<c3> value|property </c3>]
  [<c4> value|property </c4>]
  [<c5> value|property </c5>]
  [<c6> value|property </c6>]
  [<clipto>
    <min> {[-]property name | value} </min>
    <max> {[-]property name | value} </max>
  </clipto>]
  [<output> property </output>]
</typename>

For a lag filter of the form,

  C1
------
s + C1

the corresponding filter definition is:

<lag_filter name="name">
  <input> property </input>
  <c1> value|property </c1>
  [<clipto>
    <min> {[-]property name | value} </min>
    <max> {[-]property name | value} </max>
  </clipto>]
  [<output> property <output>]
</lag_filter>

As an example, for the specific filter:

  600
------
s + 600

the corresponding filter definition could be:

<lag_filter name="Heading Roll Error Lag">
  <input> fcs/heading-command </input>
  <c1> 600 </c1>
</lag_filter>

For a lead-lag filter of the form:

C1*s + C2
---------
C3*s + C4

The corresponding filter definition is:

<lead_lag_filter name="name">
  <input> property </input>
  <c1> value|property <c/1>
  <c2> value|property <c/2>
  <c3> value|property <c/3>
  <c4> value|property <c/4>
  [<clipto>
    <min> {[-]property name | value} </min>
    <max> {[-]property name | value} </max>
  </clipto>]
  [<output> property </output>]
</lead_lag_filter>

For a washout filter of the form:

  s
------
s + C1

The corresponding filter definition is:

<washout_filter name="name">
  <input> property </input>
  <c1> value </c1>
  [<clipto>
    <min> {[-]property name | value} </min>
    <max> {[-]property name | value} </max>
  </clipto>]
  [<output> property </output>]
</washout_filter>

For a second order filter of the form:

C1*s^2 + C2*s + C3
------------------
C4*s^2 + C5*s + C6

The corresponding filter definition is:

<second_order_filter name="name">
  <input> property </input>
  <c1> value|property </c1>
  <c2> value|property </c2>
  <c3> value|property </c3>
  <c4> value|property </c4>
  <c5> value|property </c5>
  <c6> value|property </c6>
  [<clipto>
    <min> {[-]property name | value} </min>
    <max> {[-]property name | value} </max>
  </clipto>]
  [<output> property </output>]
</second_order_filter>

For an integrator of the form:

 C1
 ---
  s

The corresponding filter definition is:

<integrator name="name">
  <input> property </input>
  <c1> value|property </c1>
  [<trigger> property </trigger>]
  [<clipto>
    <min> {[-]property name | value} </min>
    <max> {[-]property name | value} </max>
  </clipto>]
  [<output> property </output>]
</integrator>

For the integrator, the trigger features the following behavior. If the trigger property value is:

  • 0: no action is taken - the output is calculated normally
  • not 0: (or simply greater than zero), all current and previous inputs will be set to 0.0

In all the filter specifications above, an <output> element is also seen. This is so that the last component in a "string" can copy its value to the appropriate output, such as the elevator, or speedbrake, etc.

Author:
Jon S. Berndt
Version:
Revision:
1.13

Definition at line 239 of file FGFilter.h.


Member Data Documentation

bool Initialize

This is particularly useful for first pass.

Definition at line 249 of file FGFilter.h.


The documentation for this class was generated from the following files: