14
edits
No edit summary |
(Describe moving-average and derivative filters) |
||
Line 442: | Line 442: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== <moving-average> === | === Moving Average Filter <moving-average> === | ||
Calculates average of specified number of values. | |||
Currently the average length can only be given as number of samples and not time. | |||
<syntaxhighlight lang="xml"> | |||
<filter> | |||
<type>moving-average</type> | |||
<samples>120</samples> | |||
<input>/some/input</input> | |||
<output>/some/output</output> | |||
</filter> | |||
</syntaxhighlight> | |||
=== Rate Limit Filter <noise-spike> === | === Rate Limit Filter <noise-spike> === | ||
A better name for a noise spike filter would probably have been "rate limit filter". This is exactly what it does: limit the rate of change of the output value. The relevant configuration element is <max-rate-of-change> setting the maximum rate of change of the output property per second. | A better name for a noise spike filter would probably have been "rate limit filter". This is exactly what it does: limit the rate of change of the output value. The relevant configuration element is <max-rate-of-change> setting the maximum rate of change of the output property per second. | ||
Line 466: | Line 478: | ||
<input>/engines/engine[0]/fuel-flow-pph</input> | <input>/engines/engine[0]/fuel-flow-pph</input> | ||
<output>/engines/engine[0]/fuel-flow-hpp</output> | <output>/engines/engine[0]/fuel-flow-hpp</output> | ||
</filter> | |||
</syntaxhighlight> | |||
=== Derivative Filter <derivative> === | |||
Compute first time derivative of the input property, that is change per unit of time. Time is measured in seconds. A <filter-time> acts as gain and must be given because it has default 0. | |||
Example: compute derivative of static port pressure | |||
<syntaxhighlight lang="xml"> | |||
<filter> | |||
<type>derivative</type> | |||
<input>systems/static[0]/pressure-inhg</input> | |||
<output>autopilot/internal/pressure-rate</output> | |||
<filter-time>1.0</filter-time> | |||
</filter> | </filter> | ||
</syntaxhighlight> | </syntaxhighlight> |
edits