get_fuel_settings

To obtain the fuel consumption settings of a unit, use the unit/get_fuel_settings command.

Copied!
svc=unit/get_fuel_settings&params={"itemId":<long>}

Parameters

The request must contain the itemId parameter, which specifies the unit ID.

Response

If the request is completed successfully, the response contains the fuel consumption settings.

Copied!
{
	"calcTypes": <uint>, /* Method of calculating fuel consumption (see below) */
	"fuelLevelParams": { /* Detection of fuel fillings and drains */
		"flags": <uint>, /* Flags for detecting fillings and drains (see below) */
		"ignoreStayTimeout": <uint>, /* Ignore messages after the start of motion (seconds) */
		"minFillingVolume": <double>, /* Minimum fuel filling volume (liters) */
		"minTheftTimeout": <uint>, /* Minimum idle time to detect a fuel drain (seconds) */
		"minTheftVolume": <double>, /* Minimum fuel drain volume (liters) */
		"filterQuality": <ubyte>, /* Filtering level (range: 0-255) */
		"fillingsJoinInterval": <uint>, /* Timeout to separate consecutive fillings (seconds) */
		"theftsJoinInterval": <uint>, /* Timeout to separate consecutive drains (seconds) */
		"extraFillingTimeout": <uint> /* Timeout to detect the final filling volume (seconds) */
	},
	"fuelConsMath": { /* Fuel consumption calculation by mathematical formulas */
		"idling": <double>, /* Idling fuel consumption (liters per hour) */
		"urban": <double>, /* Urban cycle consumption (liters per 100 km) */
		"suburban": <double> /* Suburban cycle consumption (liters per 100 km) */
	},
	"fuelConsRates": { /* Fuel consumption by seasonal rates */
		"consSummer": <double>, /* Summer consumption (liters per 100 km) */
		"consWinter": <double>, /* Winter consumption (liters per 100 km) */
		"winterMonthFrom": <uint>, /* Start of winter period (month: 0-11) */
		"winterDayFrom": <uint>, /* Start of winter period (day: 1-31) */
		"winterMonthTo": <uint>, /* End of winter period (month: 0-11) */
		"winterDayTo": <uint> /* End of winter period (day: 1-31) */
	},
	"fuelConsImpulse": { /* Impulse fuel consumption sensors */
		"maxImpulses": <uint>, /* Maximum number of impulses */
		"skipZero": <uint> /* Skip the first zero value */
	}
}

Method of calculating fuel consumption:

Flag

Description

0x0

Do not use fuel consumption in reports.

0x01

Calculate consumption mathematically.

0x02

Fuel level sensors.

0x04

Replace invalid values with those calculated mathematically.

0x08

Absolute fuel consumption sensors.

0x10

Impulse fuel consumption sensors.

0x20

Instant fuel consumption sensors.

0x40

Consumption by rates.

Flags of fuel fillings and drains:

Flag

Description

0x01

Merge values of fuel level sensors with the same name.

0x02

Filter values of fuel level sensors.

0x04

Merge values of fuel consumption sensors with the same name.

0x08

Detect fuel fillings only during stops.

0x10

Calculate fuel consumption by time.

0x40

Ignore sensor filtering when calculating the amount of filled fuel.

0x80

Ignore sensor filtering when calculating the amount of drained fuel.

0x100

Detect fuel drains in motion.

0x1000Replace invalid values with those calculated mathematically.
0x2000Return default fuel settings if configured (adaptive and median filtering).
0x4000Adaptive filtering.

If the request fails, the response contains error code 7, indicating that the user doesn’t have the required access right to the unit (ADF_ACL_ITEM_VIEW).

Download PDF file
Download Word document

See also