FGSensor Class Reference

#include <FGSensor.h>

Inherits FGFCSComponent.

Inherited by FGAccelerometer.

List of all members.


Detailed Description

Syntax:

<sensor name="name">
  <input> property </input>
  <lag> number </lag>
  <noise variation="PERCENT|ABSOLUTE"> number </noise>
  <quantization name="name">
    <bits> number </bits>
    <min> number </min>
    <max> number </max>
  </quantization>
  <drift_rate> number </drift_rate>
  <bias> number </bias>
  <delay> number < /delay>
</sensor>

Example:

<sensor name="aero/sensor/qbar">
  <input> aero/qbar </input>
  <lag> 0.5 </lag>
  <noise variation="PERCENT"> 2 </noise>
  <quantization name="aero/sensor/quantized/qbar">
    <bits> 12 </bits>
    <min> 0 </min>
    <max> 400 </max>
  </quantization>
  <bias> 0.5 </bias>
</sensor>

The only required element in the sensor definition is the input element. In that case, no degradation would be modeled, and the output would simply be the input.

For noise, if the type is PERCENT, then the value supplied is understood to be a percentage variance. That is, if the number given is 0.05, the the variance is understood to be +/-0.05 percent maximum variance. So, the actual value for the sensor will be *anywhere* from 0.95 to 1.05 of the actual "perfect" value at any time - even varying all the way from 0.95 to 1.05 in adjacent frames - whatever the delta time. The delay element can specify a frame delay. The integer number provided is the number of frames to delay the output signal.

Author:
Jon S. Berndt
Version:
Revision
1.12

Definition at line 118 of file FGSensor.h.


Public Member Functions

 FGSensor (FGFCS *fcs, Element *element)
double GetFailHigh (void) const
double GetFailLow (void) const
double GetFailStuck (void) const
int GetQuantized (void) const
virtual bool Run (void)
void SetFailHigh (double val)
void SetFailLow (double val)
void SetFailStuck (double val)

Protected Types

enum  eDistributionType { eUniform = 0, eGaussian }
enum  eNoiseType { ePercent = 0, eAbsolute }

Protected Member Functions

void Bias (void)
void bind (void)
void Delay (void)
void Drift (void)
void Lag (void)
void Noise (void)
void Quantize (void)

Protected Attributes

double bias
int bits
double ca
double cb
 lag filter coefficient "a"
int delay
enum
JSBSim::FGSensor::eDistributionType 
DistributionType
int divisions
double drift
double drift_rate
double dt
bool fail_high
bool fail_low
bool fail_stuck
double granularity
int index
double lag
double max
double min
int noise_type
double noise_variance
enum JSBSim::FGSensor::eNoiseType NoiseType
vector< double > output_array
double PreviousInput
double PreviousOutput
 lag filter coefficient "b"
string quant_property
int quantized
double span

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

Generated on Tue May 26 00:55:12 2009 for JSBSim Flight Dynamics Model by  doxygen 1.5.5