To get fuel consumption settings of a unit, use the command unit/get_fuel_settings:
svc=unit/get_fuel_settings¶ms={"itemId":<long>}
Parameters
Name | Description |
---|---|
itemId | unit ID |
Response
{ "calcTypes":<uint>, /* method of calculating fuel consumption (see below) */ "fuelLevelParams":{ /* detection of fuel fillings/thefts */ "flags":<uint>, /* flags of fillings and thefts (see below) */ "ignoreStayTimeout":<uint>, /* ignore the messages after the start of motion, sec */ "minFillingVolume":<double>, /* minimum fuel filling volume, litres */ "minTheftTimeout":<uint>, /* minimum stay timeout to detect fuel theft, sec */ "minTheftVolume":<double>, /* minimum fuel theft volume, litres */ "filterQuality":<ubyte>, /* filter quality (0..255) */ "fillingsJoinInterval":<uint>, /* timeout to separate consecutive fillings, sec */ "theftsJoinInterval":<uint>, /* timeout to separate consecutive thefts, sec */ "extraFillingTimeout":<uint> /* timeout to detect final filling volume, sec */ }, "fuelConsMath":{ /* consumption math */ "idling":<double>, /* idling, litres per hour */ "urban":<double>, /* urban cycle, litres per 100 km */ "suburban":<double>, /* suburban cycle, litres per 100 km */ "loadCoef":<uint> /* coefficient when moving under load */ }, "fuelConsRates":{ /* consumption by rates */ "consSummer":<double>, /* summer consumption, litres per 100 km */ "consWinter":<double>, /* winter consumption, litres per 100 km */ "winterMonthFrom":<uint>, /* winter from (month: 0-11) */ "winterDayFrom":<uint>, /* winter from (day 1-31) */ "winterMonthTo":<uint>, /* winter to (month 0-11) */ "winterDayTo":<uint> /* winter to (day 1-31) */ }, "fuelConsImpulse":{ /* impulse fuel consumption sensors */ "maxImpulses":<uint>, /* max impulses */ "skipZero":<uint> /* skip first zero value */ } }
Method of calculating fuel consumption:
Flag | Description |
---|---|
0x0 | do not use fuel consumption in reports |
0x01 | consumption math |
0x02 | fuel level sensors |
0x04 | replace invalid values with math consumption |
0x08 | absolute fuel consumption sensors |
0x10 | impulse fuel consumption sensors |
0x20 | instant fuel consumption sensors |
0x40 | consumption by rates |
Flags of fillings and thefts:
Flag | Description |
---|---|
0x01 | merge same name sensors (fuel level) |
0x02 | filter fuel level sensors values |
0x04 | merge same name sensors (fuel consumption) |
0x08 | detect fuel filling only while stopped |
0x10 | time-based fuel level sensors consumption |
0x40 | ignore filtration when calculating filling volume |
0x80 | ignore filtration when calculating theft volume |
0x100 | detect fuel theft in motion |