Skip to content
Snippets Groups Projects
user avatar
Adrien van den Bossche authored
aba5ef63
History
Name Last commit Last update
README.md

locapack

Brief

Another localisation packet protocol to send/receive localisation data over networks.

Implementation

Arduino

License

Locapack is distributed under the GPLv3 license. Please refer to the LICENSE file.

Packet structure details

Packet general structure

2B 2B 1B (opt) variable variable
header sequence_number movement_id source_address localisation_packet_payload

The sequence_number field is mandatory.

The movement_id field is optional and its presence is announced in the header.

The source_address field length is annouced in the header. A length of 0 means that the field is not present in the packet.

The localisation_packet_payload length depends on the localisation_packet_type annouced in the header.

Header structure

4b 1b 4b 4b 3b
protocol_version movement_id_presence_flag source_address_size localisation_packet_type reserved

The protocol_version field indicates the version of the localisation packet used. This documentation describes the version #1 of the localisation packet protocol.

The movement_id_presence_flag must be set to 1 if the movement_id field is present in the packet.

The source_address_size indicates the number of Bytes of the adresse of the sender. A length of 0 means that no source address is present in the packet.

The localisation_packet_type indicates the structure of the payload. These types of packet have been described:

  • type 0 : Universal GNSS localisation
  • type 1 : Locally referenced localisation

Payload structure by packet type

Type 0 : Universal GNSS localisation

Payload general structure
1B 4B 4B 0/4B 0/4B
header lattitude longitude altitude dop

The lattitude field is a C-type float and is mandatory.

The longitude field is a C-type float and is mandatory

The altitude field is a C-type float and its presence is annouced in the header

The dop field is a C-type float and its presence is annouced in the header

Header
1b 1b 6b
altitude_presence_flag dop_presence_flag reserved

The altitude_presence_flag must be set to 1 if the altitude field is present in the packet.

The dop_presence_flag must be set to 1 if the dop field is present in the packet.

Type 1 : Locally referenced localisation