Thoughts about this fix:

I do wonder if this (firmware change) is the best way to fix this problem.  The fix doesn't seem to be needed for at least some versions of DJI/Naza GPS clone, so some testing needs to be done to see if it hurts those versions.  Or we could put a switch in the UAVO to turn it on/off.  There doesn't seem to be a way to detect whether the GPS is authentic or clone.

Also, it would seem that this is a simple delay that could be fixed by adjusting some PID, yet I haven't been very successful adjusting VTOLPF horizontal PIDs in place of using this code fix.  Maybe there is even an interaction between horizontal and vertical PIDs.

Also, it is possible that this GPS has an issue such that when you just tilt it, it reports a different location even though you didn't move it horizontally.  This seems unlikely though because you can recreate the issue or a similar one with a Ublox GPS set to Pedestrian.  Also, I forget whether the Ublox recreation is just east west.  I suspect it is not, and thus may not be the same issue.

I remember doing experiments to mount a GPS higher to make sure it is not a local electro-magnetic field affect where the extra field causes a request for attitude change that makes that motor work harder that makes the field stronger... and finally reverses making the field change weaker and weaker as the motor is slower and slower.  This needs to be recreated/retested.

Conceptually there is an issue where tilting east west affects causes less mag field change than tilting north south.  Imagine rotating around the mag field vector where there is zero change.  This may require a change to the EKF to have a different correlation for north south tilting than for east west.  Do we have any users that are close to the Earth's equator?  This problem might be really bad for them because their mag vector is horizontal.

Also, one user (Tongala) reports that for him, the problem did not happen in RC2, but did happen in RELEASE.  Is it this simple to find the issue, or is it a tuning issue that randomly happened to this tune (his release tune) but not to that tune (his rc2 tune).

Here I remark that it did happen to me in RC1:
"Yesterday I was flying 16.09RC1 and noticed a slow east west oscillation..."
https://forum.librepilot.org/index.php?topic=382.msg17846#msg17846
« Last Edit: October 08, 2018, 06:04:45 pm by TheOtherCliff »

andyp

  • **
  • 52
I have got the same problem with a clone NAZA GPS. Were can I download the fix? Is there a fix in the new FW, which is beta?

Earlier in this thread there are FC firmwares.
https://forum.librepilot.org/index.php?topic=3012.msg21154#msg21154

That firmware helps the issue, but there may be a better way, EKF settings changes or VTOLPF PID changes (although I experimented with VTOLPF PID changes with no success).  So it's not clear that this fix needs to be ported to next.  If you want it in next, the source code is also at that link; you can just put it in your local 'next' build, to put it in your own build of next.

andyp

  • **
  • 52
Now it works.

You answered my next question, whether it will be included in next or not and is available in the next downloads.

Just a reminder that this may be caused by some code changes between RC2 (16.09 RC2?) and prior to 16.09 release,  Is that when the EKF configuration was changed?
https://forum.librepilot.org/index.php?topic=3012.msg22422#msg22422
seems to be inconsistent with
https://forum.librepilot.org/index.php?topic=382.msg17846#msg17846
as one says it did not happen in RC2 (started later) and the other says it did happen in RC1

... and the work around code
https://forum.librepilot.org/index.php?topic=3012.msg21154#msg21154
is a fix for the symptom, not the cause.
« Last Edit: October 08, 2018, 06:08:10 pm by TheOtherCliff »