vgwit

  • **
  • 96
GPS modes oscillations
« on: June 24, 2022, 09:54:18 am »
It looks like attention to the progect is fading but have decided to post my experience nevertheless.

Have solved the problem with slow quad oscillation (toilet bowl) in GPS modes. It was caused by an interference/noise from Runcam2 camera to GPS module GN-801 that was sitting upon it. After moving the GPS by 5 cm back the problem has gone.

Now I'm focused on minimizing/removing fast oscillations in GPS modes. Its frequency is 5Hz and looks like it is the same as UbxRate setting in GCS. As these oscillations present in both PH and VR modes settings like ...VelPID hardly can help. Have tried to decrease HorizontalPosP but without obvious result. I'd try to decrease D part of  PID PH algorithm but can not find it. Only P part available.

Magnrtomeret calibration was repeated many times. No change.
Thanks for attention.

Re: GPS modes oscillations
« Reply #1 on: June 24, 2022, 01:14:15 pm »
(see threads linked at bottom for details)

At least one of these is related to running OSD / telemetry.  Are you running one of these?  For a test, you could get it back to happening again and then try disabling OSD / telemetry.

Another is related to bad sensor (accels) calibration with an explanation that makes sense.  If you do a slow pirouette in VelocityRoam mode does it move away (say a meter or more) during the first 180 of the pirouette and come back as you approach completing the 360?

At least one of these (for me) only happens if the drone is facing south.  For you it may be a different direction.  For me that explains why it happens some times and not others.

If you turn off OSD and it goes away.  It appears that the way the high priority telemetry protocol (1ms-2ms window for reply) is coded, that it interferes with the high priority stabilization task, or that there is am OSD buffer full issue and it waits for room in the buffer.  There is a forum thread that discusses this.  It is just possible that it is caused by running too slow of a data rate for the amount of OSD / telemetry data that is being sent and increasing the data rate (just for a test if that makes your OSD / telemetry unusable).  I would have to refer to the thread for details; its been a while.

The slow one that happens with DJI Naza GPSs can be helped with a DJI GPS code patch (there is a forum thread that has code and binaries) that artificially removes the data smoothing that happens in the GPS.  Same issue can be seen with a Ublox GPS if you set the UbxDynamicModel to Pedestrian or the like, which does a lot more smoothing than Airborne 1-2-4G.  Maybe setting the GPS baud rate or report rate (UbxRate) too low might cause it too.

I have seen that the slow oscillation occurs in steps and that the steps are at the speed of the fast oscillation.

----------------------------------------

so it seems the fast oscillation is caused by bad accel calibration (test in Attitude mode with neutral tx trims or just recalibrate accels)
and the slow one is caused by telemetry/OSD (low baud rate / buffer full ?) conflicting with stabilization (disable telemetry/OSD for a test)

----------------------------------------

https://forum.librepilot.org/index.php?topic=4923.msg33063#msg33063
https://forum.librepilot.org/index.php?topic=4941.msg33301#msg33301
« Last Edit: June 24, 2022, 01:52:04 pm by TheOtherCliff »

vgwit

  • **
  • 96
Re: GPS modes oscillations
« Reply #2 on: June 25, 2022, 07:33:13 pm »
Thank you for the info.

There is no more slow oscillations.
I don't use OPlink (use MinOPOSD via MSP). The quad does not shift in VR or PH mode after 180 deg yaw.
In Attitude mode it also does not shift in windless situation and there is no oscillation.
Only in GPS modes.