update_trip_detector
To update trip detection settings, use the unit/update_trip_detector method:
svc=unit/update_trip_detector¶ms={
"itemId": <long>,
"type": <ubyte>,
"gpsCorrection": <bool>, (true/false)
"minSat": <uint>,
"minMovingSpeed": <uint>,
"minStayTime": <uint>,
"maxMessagesDistance": <uint>,
"minTripTime": <uint>,
"minTripDistance": <uint>
}
Parameters
The request must contain the following parameters:
Parameter | Description |
---|---|
itemId | Unit ID. |
type | Type of movement detection (see get_trip_detector). |
gpsCorrection | Allow GPS correction: 0 – no, 1 – yes. |
minSat | Minimum number of satellites. |
minMovingSpeed | Minimum moving speed, km/h. |
minStayTime | Minimum parking time, seconds. |
maxMessagesDistance | Maximum distance between messages, meters. |
minTripTime | Minimum trip time, seconds. |
minTripDistance | Minimum trip distance, meters. |
Response
If the request is completed successfully, an empty object is returned:
{}
Otherwise, an error code is returned.
Error codes
Error code | Description |
---|---|
4 | Wrong input parameters. |
6 | Failed to update the trip detector. |
7 | No ADF_ACL_AVL_UNIT_EDIT_REPORT_SETTINGS access right to the unit. |