Feature Request: Calculated Fuel Used and Fuel Remaining

OK, this is going to be a religious discussion. I would like others with differing opinions to chime in.

My N2K data stream, from a Yamaha 150 outboard, presents Fuel Flow Rate in PGN 127489. The raw value is in 0.1 Liters/Hour units.


In collaboration with ChatGPT:

Coastal Explorer already receives instantaneous engine fuel-flow information through NMEA 2000 PGN 127489 (Engine Parameters, Dynamic). I’d like to propose using that information to implement three additional instrument values:

  • Fuel Used — Estimated Gallons consumed since the counter was last reset.

  • Fuel On Board — Estimated remaining fuel, initialized by the operator and decremented as fuel is consumed.

  • Fuel Economy — Optionally, SOG divided by fuel flow, expressed in nautical miles per gallon.

Proposed operation

  1. When Coastal Explorer starts, initialize the trip’s Fuel Used counter to zero.

  2. Provide a Refueled / Set Fuel On Board control where the operator can enter the actual amount of fuel aboard, in gallons. As an example, if you have an 80 gallon tank then a button that set fuel on board to 70 (leave a buffer) and/or be able to set a different value in the interim.

  3. As fuel-flow messages arrive, calculate incremental fuel consumption and accumulate it into the Fuel Used counter.

  4. Subtract that consumption from the estimated Fuel On Board value.

  5. Display Fuel Used and Fuel On Board as selectable numerical instruments in CE’s instrument panels.

Suggested calculation

The fuel-flow values supplied in PGN 127489 are expressed in 1/10th liters per hour and can be converted to US gallons per hour.

For two successive fuel-flow measurements, use trapezoidal numerical integration:

Where:

  • (F) is fuel flow in gallons per hour.

  • (Delta t) is the elapsed time in seconds.

  • (Delta G) is fuel consumed in gallons.

Then:

The computation can be performed whenever a new valid fuel-flow measurement arrives. The instrument display itself only needs to refresh periodically.

Additional considerations

  • Persist Fuel On Board across CE restarts. The trip Fuel Used counter can reset on startup, but the remaining-fuel estimate should survive shutdowns.

  • Provide a separate Reset Trip Fuel Used operation that does not alter the Fuel On Board estimate.

  • Reject missing or invalid fuel-flow values and avoid integrating across prolonged NMEA communication interruptions.

  • Support multiple engines by summing their individual fuel-flow rates.

  • Allow the operator to correct Fuel On Board after refueling or whenever the estimated quantity needs adjustment.

  • Clearly identify Fuel On Board as a calculated estimate rather than a direct tank-level measurement.

This would be particularly useful for installations without NMEA 2000 fuel-level sensors, since the necessary fuel-flow data is already available.

The implementation requires very little computational overhead and would add a valuable fuel-management capability to Coastal Explorer.

There’s one subtle issue Rose Point will need to address: if CE is shut down while the engine continues operating, fuel consumed during that period cannot be calculated from the missing measurements. The program should flag the fuel-on-board estimate as potentially stale rather than silently assuming no fuel was used.