f5soh

  • *****
  • 4572
    • LibrePilot
Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #60 on: February 17, 2016, 11:02:16 pm »
15.01 or 15.02 ? This config file is tagged as 15.01.

Edit: This last one you posted is calibrated in Australia and first (LP15.09)  from New Zealand
« Last Edit: February 17, 2016, 11:28:28 pm by f5soh »

lanzi

  • *
  • 53
Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #61 on: February 18, 2016, 02:44:31 am »
yes sorry 15.01. and yes it has been calibrated in adelaide. i just put the last config file onto my quad of which i know it worked. that shows that no hardware changed. i built teh quad in feb 2015 in adelaide and configured it with 15.01. and even though it was calibrated in adelaide it works great here in wellington

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #62 on: February 18, 2016, 11:42:14 am »
Pretty funny :)

The distance is 3200 kilometers ;)

Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #63 on: February 18, 2016, 05:08:20 pm »
TheOtherCliff, did you have a chance to check out teh UAV.file i uploaded?

Yes.  Mag calibration values look reasonable.

(Sorry to not respond sooner.  Forum is more active now and I was coding more.)

Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #64 on: February 18, 2016, 05:19:11 pm »
APM Planner has a pretty cool tool to measure the mag interference. did that and turns out it is less then 10 % (up to 30% is fine for good GPS/Mag performance).

Is that mag interference caused by motors running?  Any measurable mag interference that is caused by motor power increasing could be the cause of the LP issue.

What power level did you test for mag interference at?  I would guess that you get 10% interference at hover power.  Much more at high power.

Does APM setup include running motors up one at a time?  You can compensate for this issue if you know how much each motor affects the mag.

Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #65 on: February 18, 2016, 05:34:44 pm »
Oh, right.  We use the 3D mag with the EKF and so mag is actually used for telling what direction down is.

APM undoubtedly just uses mag for heading and it would not have this problem.

Still using EKF, but switching to ATitude mode, does level (horizon) change if you climb perfectly straight up at high power or if you punch the throttle between 1/3 and 2/3 (assuming hover is 1/2)?  It may be more pronounced in one direction than the other, like the oscillation is.

If you have a horizon tilt that is noticeable using EKF with ATitude mode, you could then switch to Basic ATitude mode and test again.  I would bet that it doesn't happen there.
« Last Edit: February 18, 2016, 11:02:31 pm by TheOtherCliff »

xfce

  • **
  • 91
Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #66 on: February 24, 2016, 05:19:59 am »
Hi all,
    Here are my log and fly video, 250 frame nano+gpsv9
in attitude it fly well, but in velocityroam it oscillate, some advice please, thanks.

« Last Edit: February 24, 2016, 05:23:10 am by xfce »

Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #67 on: February 26, 2016, 02:09:14 pm »
Is your AuxMagSetting.Usage set to AuxOnly?

Edit: Oh wait that doesn't look like a GPS V9

hwh

  • *
  • 1018
Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #68 on: February 26, 2016, 04:11:20 pm »
... Oh wait that doesn't look like a GPS V9

I think it is, sort of...   He was building a gps v9 clone, more a work alike since it doesn't use exactly the same components and layout.  https://forum.librepilot.org/index.php?topic=521.msg3973#msg3973

xfce

  • **
  • 91
Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #69 on: February 27, 2016, 02:50:37 pm »
Is your AuxMagSetting.Usage set to AuxOnly?

Edit: Oh wait that doesn't look like a GPS V9
yes it is something like gpsv9,so i set AuxOnly.
and here is the new gpsv9, named KylinGPSV9
« Last Edit: February 27, 2016, 02:59:54 pm by xfce »

Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #70 on: October 31, 2016, 04:19:00 pm »
Yesterday I was flying 16.09RC1 and noticed a slow east west oscillation getting worse and worse.  It is different than the oscillations seen here in these videos in that it is maybe 8 times slower.

It is a slow oscillation; about 4 seconds per full cycle.
This is a fairly slow, fairly underpowered quad that hovers at perhaps 55% throttle.
It seems to be east west regardless of the direction the quad nose is pointing.  I will test more to verify this.
It slowly got worse and worse.  I turned down some PID settings in VtolPathFollower and I at least got it so it was decreasing, and not increasing.
I also saw this several months ago with the 'next' of that time, so it is not just an RC issue.
I don't know if this happens with 15.09.

This one I suspect is caused by the compression of east west coordinates as you get close to the Earth's north or south pole.  If that is the case (and assuming it is not handled already), then the fix would be to mathematically stretch/compress the local (xyz in meters) coordinates to adjust for this.  It would probably be acceptable to just calculate and store a stretch factor when setting home location, and use that.  For someone familiar with the code, this is an easy change.

The first few seconds of the video are a good example of the issue.  I switched from VelocityRoam to Attitude for about the last 40 seconds of the flight.  I think I had the wrong channel selected on the video receiver...

(password is: oops)
« Last Edit: November 03, 2016, 01:49:29 am by TheOtherCliff »

jdl

  • ***
  • 246
Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #71 on: November 02, 2016, 04:53:19 pm »
+1.
I observed today and the last few days the same oscillations. East-West direction. I suppose but I'm not sure that windy weather contributes the manifestation of the problem (winds today were about 40km/h). I was doing mags calibrations in different configurations (with/without HD cam, with 2250mAh and with 5200mAh battery) because GPS/MAG is mounted directly on the upper plate of the frame between HD cam and battery, no mast at all. Later telemetry playback showed no mag alarms during the oscillations. The forecast for friday is for much calmer winds so I'll retest the same configurations to see is oscillation is so pronounced with no or small wind gusts.

Edit: Further testing showed that wind gusts don't affect the oscillations. It's just the same even if no wind at all.
Mag alarms are rarely yellow during flight, and often mag is entirely green during oscillations. But I should mount back the GPS mast and redo the tests to check if some minor mag disturbanced below alarm threshold don't cause oscillations in my case.
« Last Edit: November 04, 2016, 08:13:25 pm by jdl »

Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #72 on: November 03, 2016, 01:54:30 am »
Another fact:  I tuned the PIDs with AutoTune, so it is "tighter" than it was.  That may be why it was not obvious earlier.

I suspect the issue is with LP not handling the compression of east west GPS position correctly, or a similar issue with GPS velocity (which could either be an LP or a GPS manufacturer issue).

jdl

  • ***
  • 246
Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #73 on: November 07, 2016, 02:48:59 pm »
Sorry for the misleading information!
I cannot reproduce the same oscillations that TheOtherCliff talks of. I tracked back the cause for my problem back to stupidly high value for HorisontalPosP in VTOLPathFollowerSettings. I'd set it to 1 (m/s)/m some months ago when it seemed to be a workaround for slower-than-desired RTB problem and forgot about it. Now I returned it to its default value of 0.25 and RTB works just fine, the problem seems to be fixed in RC1. Also, these slow and increasing oscillations do not happen anymore.

Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #74 on: January 18, 2017, 07:25:27 pm »
If you have an east west oscillation in GPS modes and are using a DJI GPS/mag and 16.09, here is some firmware to try.

I thought that re-calibrating my mags had fixed this issue, but I discovered that the oscillation happens worse when pointed in one direction than another.

I tried rotating the GPS/mag mount (physically twist the GPS into another direction) 10 degrees or so in either direction and all it did was change the east west linear oscillation into a slight east west elliptical oscillation (CW and CCW).

I re-calibrated Board Level, did Attitude mode hover test and rotate virtual (in Basic) to get non-drifting hover, re-calibrated mags, did Attitude mode hover test and trimmed mag Board Rotation (in INS13) to get non-drifting hover in INS13.  I tested at each stage.  It still does it.  The only thing I did not do is move the GPS/mag higher than it is, but since I did the GPS mount rotations and Attitude mode hover in INS13 I believe the mag is not the issue.

The only thing that fixed it is this code change that modifies the reported longitudinal GPS velocity according to the latitude.

Let me know if you have this problem and try this firmware.


Problem still not fixed.

Attachments removed.
« Last Edit: January 19, 2017, 01:38:58 am by TheOtherCliff »