Fluctuating estimated position

Hi,
I observed that even if quad is not moving estimated position on qgroundcontrol is fluctuating too much. I am running position_estimator_inav algorithm . what is the reason for it?

I don’t think you have provided enough information to receive a meaningful answer to that question.

I am using px4 stack on pixhawk board(with GPS). in the extras.txt I am putting command as position_estimator_inav start. Using telemetry I have connected my quad to qgroundcontrol and observed the local position parameters posx and posy . even if the quad is still value of posx and posy is varying too much. I hope I have provided sufficient information.

We have retired the INAV estimator and can only offer support on the LPE and EKF2 estimators.

Ok Thank you. I will try to use Either LPE or EKF2 and let you know the results.

I used LPE and EKF2 and still I could see that there is so much variation in value of posx and posy even if quad is still . I have developed the position controllers for quad and I am using these estimated position data . Becuase of so much variation in posx and posy my controllers are also not properly. Pls look into this issue.

GPS drift is absolute normal. what do you mean with “so much variaten in value” ? maybe you have a bad GPS and not enough GPS satelittes. do you have GPS Fix?

Yes you are right I was using a bad GPS. I have changed the GPS and now variation in position is around 2 meter at a fix position. And I have observed this variation in position is improved after changing the parameter eph and epv to 1 (by default value of eph and epv were 3 and 5 ).
is it true that reducing the value of eph and epv improves the position estimation?

Hello,

I have similar problem with my position and velocity estimation.

I am using PX4 flight stack on a quad X generic config.

I am facing problem in position mode.
Quad is drifting like crazy, almost like if it received a step constant command.

I made a log flight of this:
I was switching from stabilized to position flight mode.
here it is: http://logs.px4.io/plot_app?log=4521de80-5ac3-446b-915b-7e27b09cfadc

After checking the log, I realize that I have huge drifts in my position and velocity estimations (up to 100m and 20m/s respectively)
Whereas I was in stabilized mode, flying in front of me (within 10m square)

I just realized after posting that there are 3 logged messages corresponding to the EKF GPS fusion timeout.

This for sure explain why I have the position and velocity estimation problems.

Do you have any guess why I would get those GPS fusion timeout please ?

I still don’t understand why during the last part of that log (in position flight mode) the drone was going backward like if I was giving a step command, even though I wasn’t !

Would anyone have some ideas on what could be wrong please ?

I checked online and couldn’t find any tips yet.
GPS, vibrations, etc seams fine.

Thanks in advance for your help !
Have a nice day.

Hi @GregoireH,
Just had a super quick look at your log and you have high magnetometer interference from thrust, i.e. the correlation between the norm of the magnetic field and your thrust set point us high. Try to twist your power cables and/or move your compass away from them and see if your EKF performance improves.
Cheers

Thanks a lot @CarlOlsson !

I will give it a try and report asasp.

Have a nice day !

@CarlOlsson You were certainly right !

I check the power cables and had the 3DR power modules perpendicular to the pixhawk.
With the power cables not twisted.

in addition I was not using the external compass present on the GPS.
This was a mistake due to problems I had in the past to get the compass calibration ending successfully.

Now position estimation and velocity are coherent !
And my quad is flying properly.

Thanks for your help !
Have a nice day

Glad it helped!
Cheers

Hi @CarlOlsson,

I just posted a similar pb, in a different thread as it was matching someone else Pb,
the thread title is from @Antiheavy and entitled: Position estimate problem in flight

Could you give me your opinion please ?
I don’t think I have any magnetic interference anymore…

Thanks in advance for your help.
I wish you a nice day !