Using UWB for indoor flight

Hello everyone, I am trying to use UWB for indoor position mode flight. The drone enters position mode, but after takeoff, the drone cannot maintain its current position and begins drawing circles.
Additional information:
1: UWB disguised itself as a GPS signal
2: I suspect that an indoor geomagnetic issue is causing the drone to be unable to maintain its current position lock, but I don’t know how to solve it

https://logs.px4.io/plot_app?log=c15e55a8-9315-4edc-bc94-e353242e5728

4: The log shows that the (xy) position setting remains unchanged, but the actual position of the drone cannot track the set position. Is this problem caused by control parameters/maximum angle limitations?

5:Will false GPS longitude and latitude lead to errors in geomagnetic fusion?

@bresch Could you take a look?

Will false GPS longitude and latitude lead to errors in geomagnetic fusion?

Are you sure the UWB data sent as lat/lon is correctly oriented? (i.e.: moving North should increase the latitude)
Also, GPS data is used to get the magnetic declination/inclination/strength in the WMM tables. You need to make sure it corresponds to your location to get the correct values.

The log shows that the (xy) position setting remains unchanged, but the actual position of the drone cannot track the set position. Is this problem caused by control parameters/maximum angle limitations?

No, I think the heading is just slightly wrong, this can lead to some toilet bowling behavior like you have

You should also set EKF2_GPS_POS_X/Y/Z to the right values and check if the EKF2_GPS_DELAY is correct

1 Like

Thank you very much for your reply! I will test and adjust the parameters according to your suggestion.

Hi @xdwgood. I am currently working on the same problem. I am unable to figure out how the UWB device will talk with Pixhwak? (UWB to be used as fake GPS). I am currently using ESP32-UWB module.
Also update us about your problem as well. Thanks in advance.

You can use the serial port configured by the ground station as uwb(gps) input.

Thanks for the reply. I am a little confused.
What sort of data packet to be sent to Pixhwak? Since uwb provides distance and Pixhwak gps port provides a whole lot of data, what is the sort of information which needs to be sent to px4?
Plus would you mind telling what sort of uwb module you are using?