High drift in local_position estimation

Hello everyone,

This is my first post, I hope I include all the information. Previous to posting this I have looked around for the answer to my problem but I could not find it.

Two weeks ago I tried this controller algorithms successfully on an Intel Aero RTF Drone. See here for the flight. Two weeks went by with the drone completely turned off. These days I tried to repeat the experiment again but failed and the drone crashed. First, after power up I had several warnings and issues:

  • Level Horizon “calibration failed: level”
  • Detected 0 radio channels. To operate PX4, you need at least 5 channels

which I solved by flashing APM firmware and then PX4 firmware as mentioned in this post and calibration of all sensors and setting everything (frame type, RC radio, etc). I tried a test flight after everything seemed to be ready but the drone crashed immediately. Unluckily for some reason I still don’t know there is no log file of the crash.

Looking through related issues, it seems that if the GPS has a precision > 1m the pose estimation will drift badly very rapidly. So I made a test of the drone completely still and these are the local_position/pose and GPS graphs:


The longitude and latitude both change by ~9m, which sees to be horrible. The x and y positions change from 0 up to 12 m, which is not usable for control purposes. Comparing latitude to x position, and longitude to y position, it seems quite reasonable to think that the reason for such drift in x and y position is cause by the huge change in GPS, since both graph pairs have the same shape.

Is it reasonable to think that the drift in X and Y coordinates is due to the GPS? Does anybody knows what could be causing such bad precision in the GPS and how could it be improved? What could have happened that after two weeks the GPS’ precision is so bad?



Some days ago I tested again and it seems the issue was the number of satellites received by the GPS. Although Position mode was allowed, the position drift was considerably smaller when the number of GPS satellites went >15.