Fuel in tank and consumption norms
Each vehicle records how much fuel it started with and how many litres per 100 km it is expected to burn, both with a full history, so the GPS-based refuel limit can estimate how much fuel is in the tank right now.
Overview#
Three inputs describe a vehicle's fuel: its initial fuel in tank, its consumption norms (litres per 100 km, each valid for a date range) and, as a fallback, its single average fuel consumption figure. The platform stores the initial-tank values and the norms exactly as entered and keeps every earlier value. From them it maintains a running estimate of the fuel in the tank, which the GPS-based refuel limit reads; see Refuel limits. Consumption reporting is described in Vehicle performance figures.
Fields#
Initial fuel in tank#
Set on the vehicle form, in the Initial fuel in tank section.
| Field (form label) | What it holds | Rules |
|---|---|---|
| Initial fuel in tank | Litres in the tank at the start of the tracked period | Optional, not negative. Cannot exceed the vehicle's fuel capacity when the vehicle model gives one; when the capacity is unknown, no capacity check is made |
| Initial fuel in tank amount | The money value of that starting fuel | Optional, not negative |
| Before-year consumption | The consumption figure carried forward from the previous year | Optional, not negative |
| Effective date | The date or period the values apply from | Required whenever any of the three values above is filled in |
Consumption norm#
Added from the Consumption norms card on the vehicle detail page, with Add norm.
| Field (label) | What it holds | Rules |
|---|---|---|
| Value (L/100km) | Expected consumption in litres per 100 km | Must be greater than zero |
| Apply from | First day the norm applies | Must be after the start date of the current norm. Past and future dates are both allowed |
| Apply to | Last day the norm applies | Never entered: set automatically when a newer norm is added. The current norm shows Open |
| Note | Why the norm was set | Optional, up to 255 characters |
The card lists every norm, newest first. A vehicle with no norms shows No consumption norms yet. Falls back to Avg consumption above.
Rules#
History is append-only#
- Saving new initial-tank values records a history entry with the new values, the effective date and the user who made the change. Earlier entries are never changed.
- When the three values and the effective date are the same as the current ones, nothing is recorded.
- When the starting fuel is over the tank capacity, the whole vehicle save is refused, not only the tank fields.
- The initial-tank values can be changed only through the vehicle form or the vehicle API, so every change leaves a history entry.
- The initial-tank history is kept with the vehicle and returned by the vehicle API; the vehicle detail page does not list it.
Norm date ranges never overlap#
- Adding a norm closes the current one on the day before the new norm's Apply from date, then opens the new one. So each date is covered by at most one norm.
- Both ends of a range are inclusive: a norm applies on its Apply from day and on its Apply to day.
- Adding a norm with the same value and Apply from date as the current one records nothing.
- Add norm is offered only on an active vehicle.
- Norms cannot be edited or deleted; a correction is a new norm from a later date.
Which consumption figure applies on a date#
- The norm whose date range contains that date.
- If the vehicle has no norms at all, its Avg consumption (the average fuel consumption on the vehicle form).
- If the vehicle has norms but none covers the date, for example a date before its first norm, the date has no norm. The platform does not fall back to the average figure in that case.
Adding norms does not change Avg consumption; the two are not kept in step.
Calculations#
Running tank estimate#
The platform keeps an estimate of the litres currently in each vehicle's tank:
| Event | Effect on the estimate |
|---|---|
| First use | Starts from Initial fuel in tank, or 0 when that is blank |
| A refuel order completes, in any of the three pump flows | Rises by the litres filled, never above the tank capacity when it is known |
| A GPS sync reports distance driven | Falls by distance × norm ÷ 100, never below 0. A vehicle with no norm and no Avg consumption does not fall |
| Daily recalculation, early morning | For vehicles on the GPS-based limit, recalculated from the starting fuel, the completed refuels and the GPS distance, kept between 0 and the tank capacity |
The per-event updates carry the estimate day to day; the daily recalculation is a safety net. The starting fuel seeds the estimate only while it is still empty: changing Initial fuel in tank later does not reset it, and only the daily recalculation reads it again.
Permissions#
| Action | Tenant Owner | Tenant Admin | Other roles |
|---|---|---|---|
| Set initial fuel in tank on the vehicle form | Yes | Yes | No |
| Add a consumption norm | Yes | Yes | No |
| See the norms on the vehicle detail page | Yes | Yes | Roles that can view the vehicle |
Setting the starting fuel needs the permission to add the vehicle (on create) or change it (on edit); adding a norm needs the permission to change vehicles on the web and the permission to add vehicles through the API.