Hawk - Data Formatting
Table of Contents
For the most part, when the Hawk gets values from a sensor, it saves them in what we call “Analogues” or “Analogs”.
SDI-12 Exception
An exception to this rule is SDI-12 sensors. Due to the large amount of values that can be outputted from these sensors, we store values SDI-12 measurements in their own FIDs. Please see Configure SDI-12 Readings and SDI-12 Samples for more information.
These Analogs are essentially registers in which we store the sensor data to be sent to the desired endpoint.
The Hawk has 50 Analogs, and Int16 and Int32 values can be saved to any of them. However, on Telematics Guru (TG), Analogs 1-10 need to be Int16, and 11-20 need to be Int32.
The Hawk and TG
The Hawk can save data to any of its analogs from Analog 1 to Analog 50.
However, TG can only accept Analogs from 1 to 20.
If an Analog is Int16, it is reported in FID6, INT32 in FID7.
Limitations of the Int16 and Int32 Data Structure
Int16 can store whole numbers from -32767 to 32767.
Int32 can store whole numbers from -2,147,483,647 to 2,147,483,647.
If a value smaller than the minimum of Int16 or Int32 is stored in that data structure, the Hawk will return INT16_MIN or INT32_MIN in that Analog.
If a value greater than the maximum of Int16 or Int32 is stored in that data structure, the Hawk will return INT16_MAX or INT32_MAX in that Analog.
These data structures cannot store decimals. We deal with this by multiplying decimal numbers by 10x to remove the decimal, then dividing back by 10x serverside to display the correct value.
For example, see the Temperature value in the table below. We multiply the measured temperature in °C by 100 to remove the 2 decimal places. Then on the endpoint, we divide back down by 100.
Hawk Analogs
Analog Number |
Type (for TG) |
Function |
Units |
Notes |
1 |
Int16 |
Internal Battery Voltage |
mV |
|
2 |
Int16 |
External |
V*100 |
|
3 |
Int16 |
Temperature |
°C*100 |
|
4 |
Int16 |
Last known Cell Signal Strength |
N/A |
1 (low) to 35 (great), 99 (unknown) |
5 |
Int16 |
Available for Sensor Data |
TBD |
|
6 |
Int16 |
Available for Sensor Data |
TBD |
|
7 |
Int16 |
Available for Sensor Data |
TBD |
|
8 |
Int16 |
Available for Sensor Data |
TBD |
|
9 |
Int16 |
Available for Sensor Data |
TBD |
|
10 |
Int16 |
Available for Sensor Data |
TBD |
|
11 |
Int32 |
Available for Sensor Data |
TBD |
|
12 |
Int32 |
Available for Sensor Data |
TBD |
|
13 |
Int32 |
Available for Sensor Data |
TBD |
|
14 |
Int32 |
Available for Sensor Data |
TBD |
|
15 |
Int32 |
Available for Sensor Data |
TBD |
|
16 |
Int32 |
Available for Sensor Data |
TBD |
|
17 |
Int32 |
Available for Sensor Data |
TBD |
|
18 |
Int32 |
Available for Sensor Data |
TBD |
|
19 |
Int32 |
Available for Sensor Data |
TBD |
|
20 |
Int32 |
Available for Sensor Data |
TBD |
|
21-50 |
Int32 |
Available for Sensor Data |
TBD |
Not available on TG |