Skip to content

Commit

Permalink
4.5:add fuel level sensor linearity params to upcoming
Browse files Browse the repository at this point in the history
  • Loading branch information
Hwurzburg committed Nov 20, 2023
1 parent f042dd3 commit 63ee07f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions common/source/docs/common-fuel-sensors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,16 @@ Advanced Parameter Setup

Fuel level is normally calculated using a linear relationship between fuel level and reported analog voltage from the sensor. However, some sensors have a non-linear output versus fuel level. ArduPilot provides up to a third order polynomial curve fit by changing the following parameters from their default values (which is a linear fit):

example shown for first battery monitor
- :ref:`BATT_FL_FF<BATT_FL_FF>` :First order polynomial fit term
- :ref:`BATT_FL_FS<BATT_FL_FS>` :Second order polynomial fit term
- :ref:`BATT_FL_FT<BATT_FL_FT>` :Third order polynomial fit term
- :ref:`BATT_FL_OFF<BATT_FL_OFF>` :offset term

every voltage sample from the sensor is modified as:

measured sensor voltage = vm

modified voltage = (BATT_FL_FT * vm^3 + BATT_FL_FS * vm^2 + BATT_FL_FF * vm) + BATT_FL_OFF

This aalows the non-linearity to be compensated. The values for these parameters should be obtained from the sensor manufacturer, if applicable.

0 comments on commit 63ee07f

Please sign in to comment.