update_messages_filter
To change the settings of location data filtering, use the unit/update_messages_filter command.
svc=unit/update_messages_filter¶ms={
"itemId": <long>,
"enabled": <bool>,
"skipInvalid": <bool>,
"minSats": <ubyte>,
"maxHdop": <double>,
"maxSpeed": <uint>,
"lbsCorrection": <bool>,
"wifiCorrection": <bool>,
"minWifiPoints": <ubyte>,
"maxWifiPoints": <ubyte>,
"wifiAccuracy": <double>
}
Parameters
The request can contain the following parameters. The required ones are marked with an asterisk (*).
Parameter | Description |
---|---|
itemId* | Unit ID. |
enabled* | Location data filtering: 1 — enable, 0 — disable. |
skipInvalid* | Skip invalid messages. Allows ignoring the GPS data identified by the device as invalid. |
minSats* | The minimum number of satellites that should be used to determine the coordinates in order for a message to be considered valid. The recommended number is at least four. The value can’t exceed 255. |
maxHdop* | The maximum HDOP value with which messages are considered valid. The value can’t exceed 9,999. |
maxSpeed* | The limit for speed values. If it is exceeded, the message is considered invalid. You can’t indicate a value greater than 9,999. If 0 is specified, this filtering criterion is not taken into account. |
lbsCorrection | Allow positioning by cellular base stations. |
wifiCorrection | Allow positioning by Wi-Fi points. |
minWifiPoints | The minimum number of Wi-Fi points which should be taken into account in order for the messages to be considered valid. You can indicate only an integer value. The minimum allowed value is 2, the maximum one is 255. |
maxWifiPoints | The maximum number of Wi-Fi points which should be taken into account when determining the unit location. You can indicate only an integer value. The minimum allowed value is 2, the maximum one is 255. |
wifiAccuracy | The location accuracy in metres. A message is considered invalid if its accuracy value is greater than the specified one. You can specify an integer or fractional number greater than or equal to zero. The maximum allowed value is 10,000. |
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 change the settings of of location data filtering. |
7 | No ADF_ACL_AVL_UNIT_EDIT_HW access right to the unit. |