Set device GPS Position - 0x0107
Table of Contents
Before you start
Ensure you have reviewed:
A full list of API calls can be found at: https://api.oemserver.com/swagger/index.html.
Description
Available on the Dart3-4G.
- This call sends a GPS position to the device.
- This should be used if the device is unable to get its own position (e.g. device is underground), and a position is required for the data records.
- E.g. To stop the end platform discarding records without a position (Telematics Guru does this)
- The GPS time will be set to the time when the async message is received by the device.
- The device will use this position as it's ‘last known position’ - and otherwise continue normal operation. Should a fresh fix be obtained, operation continues as normal. This message does not fix the lat/long.
Payload:
Offset | Length | Data Type | Description |
0 | 4 | INT32 | Latitude (Degrees * 1E7) |
4 | 4 | INT32 | Longitude (Degrees * 1E7) |
Example, set position 31.9478830, 115.8191730
Removing decimals, (-319478830, 1158191730)
→ in hex = (0xECF523D2, 0x45089A72)
→ flip from big to little endian (0xD223F5EC, 0x729A0845)
→ convert each byte to decimal, this is the data payload needed for postman (210, 35, 245, 236, 114, 154, 8, 69)
Below is a converter to simplify the process: when inputting the position, please make sure to include the decimal in the lat/long. example: -31.9478830, 115.8191730
cURL Example:
curl -X 'POST' \
'https://api.oemserver.com/v1/AsyncMessaging/Send?serial=439705' \
-H 'accept: text/plain' \
-H 'Authorization: Basic XXXXXXXXXXXX' \
-H 'Content-Type: application/json' \
-d '{
"MessageType": 263,
"CANAddress": 4294967295,
"ExpiryDateUTC": "2025-04-26T23:52:12.126Z",
"Data": [210, 35, 245, 236, 114, 154, 8, 69]
}'