diff --git a/README.md b/README.md index 0d98f620ef842f6e00a222d276788452f03dd079..768c6e0eddd3b38b113ccde51c1e8dc1de586a1d 100644 --- a/README.md +++ b/README.md @@ -17,11 +17,13 @@ Locapack is distributed under the GPLv3 license. Please refer to the `LICENSE` f ### Packet general structure -| 2B | 2B | 1B (opt) | variable | 1B | variable | -|:--------:|:-----------------:|:-------------:|:-----------:|:-------------:|:-----------------------------:| -| `header` | `sequence_number` | `movement_id` | `device_id` | `payload_len` | `localisation_packet_payload` | +| 2B | 0/5B | 2B | 1B (opt) | variable | 1B | variable | +|:--------:|:-----------:|:-----------------:|:-------------:|:-----------:|:-------------:|:-----------------------------:| +| `header` | `timestamp` | `sequence_number` | `movement_id` | `device_id` | `payload_len` | `localisation_packet_payload` | -The `sequence_number` field is mandatory. +The `sequence_number` field is mandatory. + +The `timestamp` field is optional and its presence is announced in the header. The timestamp field contains the number of milliseconds since the boot of the local system. The `movement_id` field is optional and its presence is announced in the header. @@ -34,9 +36,9 @@ The `localisation_packet_payload` length depends on the `localisation_packet_typ ### Header structure -| 4b | 4b | 4b | 1b | 3b | -|--------------------|------------------|----------------------------|-----------------------------|----------| -| `protocol_version` | `device_id_size` | `localisation_packet_type` | `movement_id_presence_flag` | reserved | +| 4b | 4b | 4b | 1b | 1b | 2b | +|--------------------|------------------|----------------------------|-----------------------------|---------------------------|----------| +| `protocol_version` | `device_id_size` | `localisation_packet_type` | `movement_id_presence_flag` | `timestamp_presence_flag` | reserved | The `protocol_version` field indicates the version of the localisation packet used. This documentation describes the version #1 of the localisation packet protocol. @@ -50,6 +52,8 @@ The `localisation_packet_type` indicates the structure of the payload. These typ The `movement_id_presence_flag` must be set to 1 if the `movement_id` field is present in the packet. +The `timestamp_presence_flag` must be set to 1 if the `timestamp` field is present in the packet. + ### Payload structure by packet type #### Type 0 : Universal GNSS localisation