AR Drone 2 - distance mission

Good day,

Recently, my teammate and I started to work on an academic project using Parrot AR drone 2. The project includes an indoor (No GPS) mission in which the drone has to move in the forward direction with the constant speed and specified distance.
We use node.js code to assign the commands and specify the x.speed and the distance.

For example, we set the drone to go forward with 0.4 of its nominal speed and stop/land after 4000 mm (4 m). The drone performs the task well. However, the real distance is not accurate. According to our example, it may land at 4.6 m or 4.3 m.
We repeated the tests for different distances. Unfortunately, there isn’t any constant error rate, I mean the difference in distance is not constant.

We also tried to use drone data as it sends speed with time stamps. By integrating speed over time, we calculated the distance estimated by drone. The drone estimation matches the code but not reality.
I was wondering if there is any problem with the sensors (malfunctioning or uncalibrated) on the drone or the algorithm, that there is a vivid error and drift in reality.

I couldn’t find any other sources to fix the problem and I hope you can help us with this issue.

Thank you in advance.

I recall being able to retrieve a navdata packet that provided a drone relative x/y coordinate plane relative to takeoff.

It has been years since I’ve worked the AR.Drone SDK but I’m pretty sure this was most accurate means to do any type of (reliable) relative positioning.

I also remember there being entropy. The point of reference becomes less and less reliable over time, I believe because of magneto drift.

To do anything reliable you need a Flight Recorder module. With a decent GPS lock you can use the world plane coordinate system to do pretty much whatever you want.