update_drive_rank_settings

To update eco driving criteria, use the update_drive_rank_settings method.

Copied!
svc=unit/update_drive_rank_settings&params={
    "itemId": <long>,
    "driveRank": {
        "acceleration": [
            {
                "flags": <uint>,
                "min_value": <double>,
                "max_value": <double>,
                "min_speed": <uint>,
                "max_speed": <uint>,
                "min_duration": <uint>,
                "max_duration": <uint>,
                "validator_id": <long>,
                "name": <text>,
                "penalties": <uint>
            },
            ...
        ],
        "brake": [
            {
                "flags": <uint>,
                "min_value": <double>,
                "max_value": <double>,
                "min_speed": <uint>,
                "max_speed": <uint>,
                "min_duration": <uint>,
                "max_duration": <uint>,
                "validator_id": <long>,
                "name": <text>,
                "penalties": <uint>
            },
            ...
        ],
        "turn": [
            {
                "flags": <uint>,
                "min_value": <double>,
                "max_value": <double>,
                "min_speed": <uint>,
                "max_speed": <uint>,
                "min_duration": <uint>,
                "max_duration": <uint>,
                "validator_id": <long>,
                "name": <text>,
                "penalties": <uint>
            },
            ...
        ],
        "sensor": [
            {
                "flags": <uint>,
                "min_value": <double>,
                "max_value": <double>,
                "min_speed": <uint>,
                "max_speed": <uint>,
                "min_duration": <uint>,
                "max_duration": <uint>,
                "validator_id": <long>,
                "sensor_id": <long>,
                "name": <text>,
                "penalties": <uint>
            },
            ...
        ],
        "speeding": [
            {
                "flags": <uint>,
                "min_value": <double>,
                "max_value": <double>,
                "min_speed": <uint>,
                "max_speed": <uint>,
                "min_duration": <uint>,
                "max_duration": <uint>,
                "validator_id": <long>,
                "name": <text>,
                "penalties": <uint>
            },
            ...
        ],
        "harsh": [
            {
                "flags": <uint>,
                "min_value": <double>,
                "max_value": <double>,
                "min_speed": <uint>,
                "max_speed": <uint>,
                "min_duration": <uint>,
                "max_duration": <uint>,
                "validator_id": <long>,
                "name": <text>,
                "penalties": <uint>
            },
            ...
        ],
        "global": {
            "accel_mode": <uint>
        }
    }
}

Parameters

The request must contain the parameters:

Parameter Description
accel_mode Penalty calculation method:
  • 0 — combined
  • 1 — by speed in messages
  • 2 — by accelerometer values
itemId Unit ID.
driveRank Object with parameters of eco driving criteria (see below). This object can be empty.

Eco driving criteria

Parameter Description
acceleration Acceleration.
brake Braking.
turn Turn.
sensor Custom criterion based on sensor readings.
speeding Speeding.
harsh Reckless driving.
idling Idling.
global Acceleration calculation method.

Criterion settings

Parameter Description
flags Flags:
  • 1 — penalty averaging by time,
  • 2 — penalty averaging by mileage,
  • 4 — use validator as a multiplier,
  • 8 — skip missing values.
min_value Minimum value.
max_value Maximum value (excluded).
min_speed Minimum speed.
max_speed Maximum speed (excluded).
min_duration Minimum duration.
max_duration Maximum duration (excluded).
validator_id Validator sensor ID.
sensor_id Sensor ID (used only for the sensor criterion)
name Criterion name.
penalties Penalty points.
accel_mode Calculate acceleration by:
  • 0 — GPS + accelerometer
  • 1 — GPS
  • 2 — accelerometer

Response

If the request is completed successfully, an empty object is returned:

Copied!

{
    /* Settings saved. */
}

Otherwise, an error code is returned.

Error codes

Error code Description
4 Wrong input in the driveRank parameter.
6 Failed to update eco driving criteria.
7 No ADF_ACL_AVL_UNIT_EDIT_REPORT_SETTINGS access right to the unit.

If you find a mistake in the text, please select it and press Ctrl+Enter.

Report a mistake

Your message was sent. Thank you!

An error occurred while submitting the form

Download PDF file
Download Word document

See also