Changes

Created page with "__TOC__ ==Communication Protocol== {| class="wikitable" style="width:50%;" |+ ! colspan="7" style="width:50%; border: 1px solid white; border-bottom: 2px solid #0054A6; backg..."
__TOC__

==Communication Protocol==
{| class="wikitable" style="width:50%;"
|+
! colspan="7" style="width:50%; border: 1px solid white; border-bottom: 2px solid #0054A6; background: white; color: #0054A6; text-align: left;"| SBD Packet structure
|-
! style="width:10%; border: 1px solid white; border-bottom: 2px solid #0054A6; background: white; color: #0054A6; text-align: left;"| Timestamp
! style="width:10%; border: 1px solid white; border-bottom: 2px solid #0054A6; background: white; color: #0054A6; text-align: left;"| Longitude
! style="width:10%; border: 1px solid white; border-bottom: 2px solid #0054A6; background: white; color: #0054A6; text-align: left;"| Latitude
! style="width:15%; border: 1px solid white; border-bottom: 2px solid #0054A6; background: white; color: #0054A6; text-align: left;"| SBD AVL ID and flags
! style="width:10%; border: 1px solid white; border-bottom: 2px solid #0054A6; background: white; color: #0054A6; text-align: left;"| DIN/DOUT info
! style="width:10%; border: 1px solid white; border-bottom: 2px solid #0054A6; background: white; color: #0054A6; text-align: left;"| Reserved
! style="width:10%; border: 1px solid white; border-bottom: 2px solid #0054A6; background: white; color: #0054A6; text-align: left;"| Speed
|-
| style="border: 1px solid white; border-bottom: 2px solid #E8E8E8; text-align: left; vertical-align: center; background: white;" | 4 bytes
| style="border: 1px solid white; border-bottom: 2px solid #E8E8E8; text-align: left; vertical-align: center; background: white;" | 3 bytes
| style="border: 1px solid white; border-bottom: 2px solid #E8E8E8; text-align: left; vertical-align: center; background: white;" | 3 bytes
| style="border: 1px solid white; border-bottom: 2px solid #E8E8E8; text-align: left; vertical-align: center; background: white;" | 1 bytes
| style="border: 1px solid white; border-bottom: 2px solid #E8E8E8; text-align: left; vertical-align: center; background: white;" | 1 bytes
| style="border: 1px solid white; border-bottom: 2px solid #E8E8E8; text-align: left; vertical-align: center; background: white;" | 1 bytes
| style="border: 1px solid white; border-bottom: 2px solid #E8E8E8; text-align: left; vertical-align: center; background: white;" | 1 bytes
|}

'''Definitions'''

* Timestamp – Indicates when record was generated
* Longitude - encoded in 3 bytes data. Server which gets this data should divide result from 46603,375 and subtract 180 in order to get actual longitude value. This coefficient is got in following way: 16777215(maximum 3 bytes value) divided from 360 (maximum longitude value then 180 is added). This calculation is used to fit negative and positive values to 3 bytes width variable.
* Latitude - Latitude is calculated in same way as longitude but since latitude maximum value is two times smaller than longitude it can produce a bit more accurate data. Coefficient for latitude is 93206,75. This coefficient is got in following way: 16777215(maximum 3 bytes value) divided from 180 (maximum latitude value then 90 is added). This calculation is used to fit negative and positive values to 3 bytes width variable.
* SBD AVL ID and flags – Custom id that will indicate what caused the record to be generated (as only periodic records are generated, id is not used)
* Din/Dout info - Displays configured IO elements in parameter id 99422
* Reserved - Not used anywhere, but left due to compatibility with fm6 project.
* Speed – Indicates the speed of the vehicle if configured. If not (or in case of no gps) – will display 255
0

edits