Great news for those who are using Atrack devices with built-in G-Sensors!
Now you may fetch G-Sensor data from the tracker, and have the data parsed into flespi message parameters.
How it works?
To fetch the G-sensor data of the impact, you send a G-Sensor data setting to the device [Actions tab]:
Under the hood server sends AT$GDAT command to the device to initiate sending of G-Sensor data.
As soon as the command is acknowledged by the device by sending $OK as response, server expects 8 packets of impact data will be sent by the device next.
The G-sensor data from the impact data packets is parsed into the following flespi message parameters:
- acceleration.array - JSON array of objects with accelerometer data on the axes X, Y, Z expressed in G
- accelerometer.data.seqnum - sequential number of the G-sensor data packet (from 0 - 7)
⚠️ The impact data packets have a special format that require special parsing, therefore server is capable to parse them only when it "waits" for G-sensor data after the G-Sensor data setting was sent and acknowledged by the device. As soon as all 8 packets with G-sensor data are received, then server no longer waits for the G-sensor data packets and switches back to waiting and processing position reports.