This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
doc:lps:tdoa3:implementation [2018-11-06 15:13] kristoffer |
doc:lps:tdoa3:implementation [2020-05-12 14:04] (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:// | ||
+ | </ | ||
+ | |||
====== TDoA 3 implementation ====== | ====== TDoA 3 implementation ====== | ||
- | This page contains an overview of the TDoA 3 implementation. For details, please see the code in the Crazyflie firmware and the LPS node firmware. | + | This page contains an overview |
==== Clock correction ==== | ==== Clock correction ==== | ||
The different clocks in the system are drifting and it is important to keep track of the drift of other clocks, we call this clock correction. | The different clocks in the system are drifting and it is important to keep track of the drift of other clocks, we call this clock correction. | ||
- | The clock drift is caused by temperature changes in the clock crystals and is a slow process, and this is a property that we explore to handle | + | The clock drift is caused by temperature changes in the clock crystals and is a slow process, and this is a property that we explore to detect |
We try to measure the ratio of the frequency of the remote clock VS the local clock. This is done by looking at two packets from the remote anchor and dividing the delta of the | We try to measure the ratio of the frequency of the remote clock VS the local clock. This is done by looking at two packets from the remote anchor and dividing the delta of the | ||
receive timestamps (local clock) with the delta of the transmit timestamps (the remote clock). The assumption is that the distance to the remote anchor has note changed and that the | receive timestamps (local clock) with the delta of the transmit timestamps (the remote clock). The assumption is that the distance to the remote anchor has note changed and that the | ||
- | time of flight of the radio waves therefore is constant. This is not entirely true for a moving Tag, but if the packet rate is high enough, the error will be small enough. | + | time of flight of the radio waves therefore is constant. This is not entirely true for a moving Tag, but if the packet rate is high enough, the error will be small and can be ignored. |
There are many other error sources (packet loss, reflections, | There are many other error sources (packet loss, reflections, | ||
Line 16: | Line 20: | ||
The accepted values are low pass filtered to smooth the estimated clock correction. | The accepted values are low pass filtered to smooth the estimated clock correction. | ||
- | Finaly | + | Finally |
correction is wrong and we have to start over. | correction is wrong and we have to start over. | ||
Line 22: | Line 26: | ||
TDoA 3 is designed to handle a dynamic number of anchors. Since we must store data about anchors in the system, both in the anchors as well as in the Tags, | TDoA 3 is designed to handle a dynamic number of anchors. Since we must store data about anchors in the system, both in the anchors as well as in the Tags, | ||
- | there is dynamic storage functionality. | + | there is dynamic storage functionality. |
This sets a limit on how many remote anchors that can be handled by an Anchor or Tag. The assumption is that there should not be more than 15-20 anchors visible | This sets a limit on how many remote anchors that can be handled by an Anchor or Tag. The assumption is that there should not be more than 15-20 anchors visible | ||
to a device at one time. | to a device at one time. | ||
Line 31: | Line 35: | ||
==== Error management ==== | ==== Error management ==== | ||
- | The first line of defence is the outlier detection in the clock correction step. It keeps the clock correction tidy but also indicates | + | The first line of defence is the outlier detection in the clock correction step. It keeps the clock correction tidy but also indicates |
- | data in these packets is not used in the system. | + | |
The second line of defence is to look at sequence numbers. If sequence numbers are not consecutive in received packets, special action has to be taken to handle it. It is for instance | The second line of defence is to look at sequence numbers. If sequence numbers are not consecutive in received packets, special action has to be taken to handle it. It is for instance | ||
important when calculating TDoA to make sure we use timestamps from the same packets in all steps. | important when calculating TDoA to make sure we use timestamps from the same packets in all steps. | ||
- | The third line of defence is to check that the TDoA value we got is physically possible. The TDoA value can never be greater than the distance between the two anchors | + | The third line of defence is to check that the TDoA value we have calculated |
- | used for the measurement. If the value is larger | + | used for the measurement |
- | The Final check if TDoA value fits the current estimated position. If the TDoA value is too far away it is likely that there has been an error and the value is discarded, | + | The Final check is to verify that a TDoA value fits the current estimated position. If the TDoA value is too far away it is likely that there has been an error and the value is discarded, |
if it is deemed to be good it is fed into the position estimator for further processing. | if it is deemed to be good it is fed into the position estimator for further processing. | ||
In this step there is also a mechanism that tries to determine if there are "too many" outliers, which could indicate that the estimated position is wrong. This makes the outlier | In this step there is also a mechanism that tries to determine if there are "too many" outliers, which could indicate that the estimated position is wrong. This makes the outlier | ||
- | detector less picky (letting more TDoA samples through) | + | detector less picky and accepts larger errors |