hwh

  • *
  • 1018
Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #75 on: January 18, 2017, 10:38:02 pm »
The switch to INS14 didn't affect this at all?

Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #76 on: January 19, 2017, 01:46:22 am »
I want to understand the issue, not just make it go away to cause issues elsewhere.  I'm using 16.09 (as are most other users) which still has INS13.

Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #77 on: January 19, 2017, 01:46:49 am »
Prior to posting this firmware, I test flew it.  The issue did not happen, and I know that I tested it in directions that had issues before.  I test flew it again today and the issue is back though.  I will move the GPS/mag higher and test again.

Mag issues at more than hover power, and DJI delays (due to DJI using more smoothing than we do) are about the only things remaining.

Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #78 on: October 05, 2017, 02:13:25 am »
In VelocityRoam mode, when the quad is pointing either east or west it gets a small roll oscillation (no pitch component) with a frequency of several oscillations per second.  The amplitude is enough to see in near by LOS hover, but not enough to affect flight.  When pointing either north or south it does not oscillate.  At headings in between the amplitude is in between.  The oscillation frequency seems to remain the same.

I had this issue today with a quad I haven't flown in a while but IIRC it did not have this issue before (at least not noticeably).

The quad is symmetrical.  It uses an authentic DJI Naza GPS/mag, a Sparky2, and 16.09 release+dirty.  The dirty part is probably the DJI/Naza GPS fix firmware.

I notice that if I yaw around slowly that the quad moves about 2 meters but comes back to the original location when I get back to the original heading.  It is acting as if the compass heading changes the coordinates that the GPS gives the FC.  I logged a flight and found that the GPS log does draw lines exactly straight north south (with expected variation) when yawing very slowly all the way around, so the FC is actually directing it to be offset for some reason!!!  PositionHoldOffset is 30,15 (default).  IIRC the N/S motion happens mainly when facing north or south.  I.e. when facing east 30 degrees of yaw produces almost no motion but when facing north 30 degrees of yaw produces a lot of motion.

The issue that the unofficial DJI Naza fix firmware fixes is a much slower oscillation that is seen as the quad moving back and forth (always east and west) several meters.

This quad has been tuned with AutoTune.  It does not exhibit any oscillation or even ringing in plain Attitude mode (still INS13).

I have a nearly identical quad that does not have either the oscillation or the N/S drift at all.  The only hardware difference is the motors are 750KV and battery is 4S instead of 1100KV and 3S.

I'll research this.  Recreate.  Determine exact firmware in both cases and eliminate that as a cause.  Examine differences in settings.  Determine if the oscillation is always left/right roll so that when facing east/west it is a north/south oscillation and when facing northwest it does a southwest/northeast oscillation OR whether when facing northwest it does an east/west oscillation (which includes pitch).  Is mag calibration part of the issue?  Calibrating in one place but flying in another?  Moving HomeLocation (42km SSW) but not recalibrating?
« Last Edit: October 05, 2017, 03:33:10 am by TheOtherCliff »

Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #79 on: November 26, 2017, 02:23:05 am »
All,
Here are 2 pictures showing bad east west oscillation.  My quad is stationary and not armed on the work bench while this was photographed.  It also swings about 10 degrees on the compass and shows a gentle rolling on the horizon.  The GPS is a NEMA protocol 9600 baud 1 hertz rate model with a built in compass on I2C that was designed for APM use.  It flies fine in Attitude mode but goes crazy in position hold or velocity roam.  If I run the GPS connected via a FTDI to U-Center the oscillation is gone and the deviation is ok.  I removed a NAZA clone GPS for east west oscillation problems but this slow one is way worse.  Aux and internal raw magnetometer scope shows almost overlapping traces.  I have a better GPS on order but I wonder what causes this.
LJI S380
Revo
4 LDPower 2312 - 960KV
4 FlyColor Raptor 30A
Spektrum SPM4649T
2200 4S1P Battery
8 x 4.5 Props
Round WS2812 RGB
DJI NAZA Clone GPS

Re: Oscillation in GPS Modes that is Sensitive to Compass Direction
« Reply #80 on: November 26, 2017, 05:09:02 am »
I have seen this issue when using NMEA GPSs and more often by badly aligned or badly calibrated mags.  There are a certain set of NMEA sentences that need to be enabled in the GPS.  Also, you should be running much faster than 9600 baud.  Probably at least 38400.  Most modern GPS solutions that we use actually even talk at 57600.

It is all around better to use the Ublox (or DJI/Naza) protocol if your GPS supports it.