nasa / fprime

F´ - A flight software and embedded systems framework
https://fprime.jpl.nasa.gov
Apache License 2.0
9.95k stars 1.28k forks source link

Add Ability to Specify Telemetry Conversions in Telemetry Dictionary #568

Open arizvi786 opened 3 years ago

arizvi786 commented 3 years ago

Currently telemetry conversions for raw values output in telemetry can't be specified in the telemetry dictionary. Having the ability to specify telemetry conversions in the dictionary would be good feature to add. Also, having this feature be compatible with other commonly used GDS systems would be more beneficial.

Here's an example telemetry conversion specification: -

<telemetry abbreviation=”A-9999” name=”Polynomial_EU_Example” type=”float” byte_length=”4”>
      <raw_to_eng>
            <polynomial_expansion>
                  <factor index=”0” coeff=”1.2” />
                  <factor index=”1” coeff=”0.75” />
                  <factor index=”2” coeff=”2.2” />
            </polynomial_expansion>
      </raw_to_eng>
</telemetry>
timcanham commented 3 years ago

How about a generic converter plug-in concept? Then the user could write their own. The polynomial converter could be one of the standard ones. Maybe:

<telemetry abbreviation=”A-9999” name=”Polynomial_EU_Example” type=”float” byte_length=”4”>
      <converter name="poly">
            <args>
                  <factor index=”0” coeff=”1.2” />
                  <factor index=”1” coeff=”0.75” />
                  <factor index=”2” coeff=”2.2” />
            </args>
      </converter>
</telemetry>

The args could be passed as named arguments to a convert proc in the converter class.

arizvi786 commented 3 years ago

That's a good idea. The only thing there is we'd have to translate this format to another that's compatible with another GDS if we're using F-Prime with that other GDS.