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-11 09:15] arnaud |
doc:lps:tdoa:protocol [2017-12-18 15:08] arnaud |
||
---|---|---|---|
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 57: | Line 57: | ||
{{: | {{: | ||
- | δrx is measured when receiving the two packets. δtx can be calculated if we know the time it takes to fly from 0 to 1: Anchor 1 measures the time of arrival of the packet P2 and so knowing the time it took the packet to arrive to 1, we can calculate when it was sent by 0. The time of flight between 0 and 1 is measured by the anchors and transmitted in the packets. It is measured using two way ranging: | + | δrx is measured when receiving the two packets. δtx can be calculated |
+ | |||
+ | The time of flight between 0 and 1 is measured by the anchors and transmitted in the packets. It is measured using two way ranging: | ||
{{: | {{: | ||
- | Once we know the transmit time of P2 in the anchor 1, we can calculate δtx and δrx. Though δtx is expressed in the Anchor 1 clock. Each node has an imperfect clock and we need to compensate for drift between the clocks. To do so the tag uses two consecutive packet from Anchor 1 to keep track of the clock drift coefficient between its own clock and Anchor 1 clock: | + | Once we know the transmit time of P2 in the anchor 1, we can calculate δtx and δrx. Though δtx is expressed in the Anchor 1 clock. Each node have an imperfect clock and we need to compensate for drift between the clocks. To do so the tag uses two consecutive packet from Anchor 1 to keep track of the clock drift coefficient between its own clock and Anchor 1 clock: |
{{: | {{: | ||