This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
doc:lps:tdoa:protocol [2017-09-06 12:10] arnaud |
doc:lps:tdoa:protocol [2018-11-05 17:37] kristoffer |
||
---|---|---|---|
Line 22: | Line 22: | ||
typedef struct rangePacket_s { | typedef struct rangePacket_s { | ||
uint8_t type; | uint8_t type; | ||
- | uint8_t seqs[NSLOTS]; // Packet sequence number of the timestamps | + | uint8_t seqs[8]; // Packet sequence number of the timestamps |
- | | + | |
- | uint16_t distances[NSLOTS]; | + | uint16_t distances[8]; |
} __attribute__((packed)) rangePacket_t; | } __attribute__((packed)) rangePacket_t; | ||
</ | </ | ||
Line 48: | Line 48: | ||
===== Calculating TDoA ===== | ===== Calculating TDoA ===== | ||
- | For an example of how to calculate TDoA of packets using this protocol you can look at the Crazyflie source code: https:// | + | [[doc: |
- | + | ||
- | If we consider the 3 last packets sent from anchor 0 and 1: | + | |
- | + | ||
- | {{:doc: | + | |
- | + | ||
- | We can calculate the difference of time of flight (which is the difference of time of arrival, | + | |
- | + | ||