This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
doc:lps:lpp [2017-02-18 11:28] arnaud created |
doc:lps:lpp [2020-05-12 14:00] (current) kimberly |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <WRAP center round important 60%> | ||
+ | This page has deprecated and moved to the new documentation framework of the main Bitcraze website. Please go to [[https:// | ||
+ | </ | ||
+ | |||
+ | |||
====== Loco Positioning Protocol ====== | ====== Loco Positioning Protocol ====== | ||
Line 4: | Line 9: | ||
The ranging messages are sent and received directly by the ranging algorithms in the Crazyflie and in the Nodes. The management message are sent by management tools like the Crazyflie client. | The ranging messages are sent and received directly by the ranging algorithms in the Crazyflie and in the Nodes. The management message are sent by management tools like the Crazyflie client. | ||
+ | |||
+ | ===== Ranging protocols ===== | ||
+ | |||
+ | All ranging packet share the same format: | ||
+ | |||
+ | ^ byte ^ value ^ note ^ | ||
+ | | 0 | ID | Packet ID | | ||
+ | | 1.. | Payload | Format is defined per ID | | ||
+ | |||
+ | ==== Two Way Ranging ==== | ||
+ | |||
+ | The two way ranging protocol allows a tag to measure its distance to an anchor. The protocol contains 4 messages, two are sent by the tag two by the anchor. The message sequence is as follow: | ||
+ | {{: | ||
+ | |||
+ | The time of flight is calculated using the formula: | ||
+ | {{: | ||
+ | |||
+ | |||
+ | TWR packet IDs | ||
+ | ^ ID ^ Description ^ | ||
+ | | 0x01 | [[doc: | ||
+ | | 0x02 | [[doc: | ||
+ | | 0x03 | [[doc: | ||
+ | | 0x04 | [[doc: | ||
+ | |||
+ | === TWR_POLL === | ||
+ | |||
+ | Format: | ||
+ | ^ Payload byte ^ Name ^ Note ^ | ||
+ | | | ||
+ | |||
+ | === TWR_ANSWER === | ||
+ | |||
+ | Format: | ||
+ | ^ Payload byte ^ Name ^ Note ^ | ||
+ | | | ||
+ | | | ||
+ | |||
+ | The optional management data can be any LPP management packet deemed useful for the tag. Currently this is used to send the anchor position from the anchor to the tag using the [[doc: | ||
+ | |||
+ | === TWR_FINAL === | ||
+ | |||
+ | Format: | ||
+ | ^ Payload byte ^ Name ^ Note ^ | ||
+ | | | ||
+ | |||
+ | === TWR_REPORT === | ||
+ | |||
+ | Format: | ||
+ | ^ Payload byte ^ Name ^ Note ^ | ||
+ | | | ||
+ | | 1.. | Report | Report structure, see format bellow | | ||
+ | |||
+ | Report structure format: | ||
+ | <code c> | ||
+ | typedef struct { | ||
+ | uint8_t pollRx[5]; | ||
+ | uint8_t answerTx[5]; | ||
+ | uint8_t finalRx[5]; | ||
+ | |||
+ | float pressure; | ||
+ | float temperature; | ||
+ | float asl; // Above Sea Level altitude | ||
+ | uint8_t pressure_ok; | ||
+ | } __attribute__((packed)) lpsTwrTagReportPayload_t; | ||
+ | </ | ||
+ | |||
===== Management protocols ===== | ===== Management protocols ===== | ||
Line 14: | Line 86: | ||
^ byte ^ value ^ note ^ | ^ byte ^ value ^ note ^ | ||
| 0 | 0xF0 | LPP short | | | 0 | 0xF0 | LPP short | | ||
- | | 1 | + | | 1 |
| 2..17 | Payload | Format is defined per ID | | | 2..17 | Payload | Format is defined per ID | | ||
LPP Short packet IDs: | LPP Short packet IDs: | ||
- | ^ ID ^ Description ^ | + | ^ LPPS_ID |
| 0x01 | [[doc: | | 0x01 | [[doc: | ||