bitcraze / lps-node-firmware

GNU Lesser General Public License v3.0
82 stars 79 forks source link

Non-default UWB radio modes for TWR #42

Open da-phil opened 5 years ago

da-phil commented 5 years ago

I just noticed this warning in the UWB radio settings config:

NOTE: only change if you use TDoA3. Other modes will stop working if changed from the default mode.

I actually successfully tested TWR with the 3rd mode (low bitrate, long preamble) and wondered about this warning and which problem - I didn't see yet - it implies. Is there really an issue with other UWB radio modes (other than normal bitrate, normal preamble) and how could it be addressed/fixed?

krichardsson commented 5 years ago

That is interesting findings!

When I implemented the low bitrate/long preamble modes I was experimenting with TDoA3. I did not have the time to investigate the effects on TDoA2 or TWR but my gut feeling was that it probably would mess up the timing of the time slotted protocols. I added the note as a disclaimer to avoid users ending up with non-functional systems.

I think the work required to remve the note would be something on the lines of:

  1. Verify that the settings actually are used in all modes, both in the anchors and the Crazyflie. I would examine the code to make sure this is the case, and also sniff the packets to see what is actually transmitted.
  2. Verify that it works in all modes
  3. ++ task: investigate precision/accuracy and range

Doing it for one of the modes would be a great step as well :-)