update_trip_detector

To update trip detection settings, use the unit/update_trip_detector method:

Copied!
svc=unit/update_trip_detector&params={
  "itemId": <long>,                
  "type": <ubyte>,                 
  "gpsCorrection": <bool>,
  "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:

Copied!
{}

Otherwise, an error code is returned.

Error codes

Error code Description
4 Wrong input parameters.
6 Failed to update the trip detector.
7 The unit doesn’t exist, or the user doesn’t have the Edit trip, driving and health check settings access right to it.

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