GunnsSensorAnalogWrapper - nasa/gunns GitHub Wiki

GunnsSensorAnalogWrapper

default_img

Background

This is GUNNS spotter that wraps a generic analog sensor model, for inclusion in GUNNS network. This is similar to the SensorAnalog shape, except that whereas SensorAnalog drops a sensor model directly into the network, this class wraps it in a network spotter. This gives a key benefit over the un-wrapped SensorAnalog:

  • This sensor and the SensorAnalog sensor can both be updated by a call from another model, such as a network link providing its truth input and getting its sensed output, etc. However unlike SensorAnalog, this sensor can also be automatically updated by the network itself, either before or after the network solution. Certain links will take advantage of this feature.

As a spotter, this is not an actual GUNNS link, but it may be referred to by other objects in the network. In particular, some electrical links use these sensors in their trip logic, so this spotter is common in electrical networks.

The wrapped sensor is identical to the SensorAnalog sensor: it takes a 'truth' input and adds sensor-type effects to model a sensor output.

How To Use in Gunnshow

Because this isn't a link it doesn't have ports or associated port connection rules, and it does not graphically connect to any other shapes. To add this spotter to the network, follow the general directions for adding spotters to a network in the GunnShow Wiki. The XML file for this spotter is found in the gunns/ repository at: gunns/core/GunnsSensorAnalogWrapper.xml. Do not specify any object references for this type of spotter.

Port Connection Rules (These are limitations on the port connection to nodes that the link enforces in run-time):

  • N/A

Other Rules (These are extra rules you should always try to follow):

  • N/A

Configuration Data Parameters:

  • minRange: Same as SensorAnalog.
  • maxRange: Same as SensorAnalog.
  • offValue: Same as SensorAnalog.
  • nominalBias: Same as SensorAnalog.
  • nominalScale: Same as SensorAnalog.
  • nominalNoiseScale: Same as SensorAnalog.
  • nominalResolution: Same as SensorAnalog.
  • noiseFunction: Same as SensorAnalog.
  • unitConversion (default = UnitConversion::NO_CONVERSION): This is an optional units conversion the sensor can perform on its truth input before processing. The valid values for this field are the Type enumeration in the ms-utils/math/UnitConversion.hh file. For instance to convert the input temperature from Kelvin to Fahrenheit you would use: UnitConversion::K_TO_F here.
  • nominalNoiseMult (default = 0.0): This defines the nominal input-scaling noise amplitude in the sensed output, in fraction of total sensor output range.

Input Data Parameters:

Common Problems

  • N/A

References

  • N/A
⚠️ **GitHub.com Fallback** ⚠️