Hi community.
I have built my first quad: Chinese 250 frame, Revo FC and NAZA GPS/compass mounted on a mast (I wanted this because I use the flexi port for iBus, so it is convenient to get the GPS and compass data from a unique port).
Naza GPS and Compass work fine, I did all the calibration a lot of times, and I always find the same issue: When I use complementary + mag (aux mag, of course) + GPS, all is fine, horizon is straight, no oscillations, I have a strong 10 sat fix GPS and a green compass all the time.
When I switch to INS13, the horizon is tilted, and starts to oscillate a bit, which makes flying impossible. I still have 10 sat fix, green mag etc...I don't get what I am doing wrong...
Any idea?
I am on LibrePilot 16.09

Thanks!

f5soh

  • *****
  • 4572
    • LibrePilot
Re: INS13 unstable with 10 sat fix and green mag (NAZA GPS/Compass)
« Reply #1 on: March 20, 2019, 10:17:39 pm »
Hi,
Quote
I am on LibrePilot 16.09
You should move to the Next version:
- Updated world Mag Model,
- Multiples algorithms for GPS navigation : Complementary+Mag+GPS, INS13, INS13+CF

Re: INS13 unstable with 10 sat fix and green mag (NAZA GPS/Compass)
« Reply #2 on: March 21, 2019, 03:23:51 am »
Is GPS/mag mounted and in correct alignment with FC?  If not, that would do it.

Does it (PFD display) tilt/oscillate even with motors stopped?  That is usually incorrect GPS/mag mounting direction or bad mag calibration.  If it only does it with motors running then it you need to do a better job twisting your power cables.  Aux mag is good, but it must be on a long enough post to get it away from electromagnetic fields around the power cables.
« Last Edit: March 21, 2019, 04:17:17 am by TheOtherCliff »

Re: INS13 unstable with 10 sat fix and green mag (NAZA GPS/Compass)
« Reply #3 on: March 28, 2019, 04:43:01 pm »
Thanks for your answers!
So: yes, oscillations and tilt are present even if motors are off.
The pole I use to mount the mag+GPS is the one that comes with the NAZA v2 GPS.
I mounted the NAZA GPS+mag with the arrow pointing towards the nose of my quad, only it is very slightly rotated to the west to compensate deviation between geographic north and magnetic north.
I have perform a lot of time the mag calibration, outdoors, using OPLink telemetry so I could be as far as I could from my computer...it never got better: I always have the tilt and oscillation when in INS13 mode, and when trying to take off, it always tries to get up the rear part of the quad and finishes upside down on the ground. Impossible to take off.
If complementary + mag + GPS it flies well. Tried hold position and velocity roaming, and it works decently. Auto landing works ok too, but sometimes it does not detect the ground, so motors won't stop, and the first half of the descent is done by steps, going down 30cms by 30cms, not smoothly, then it goes smoother.

Re: INS13 unstable with 10 sat fix and green mag (NAZA GPS/Compass)
« Reply #4 on: March 29, 2019, 06:07:40 am »
GPS/mag forward arrow should be aligned with the FC forward arrow and also aligned in all other directions as well. but a slight GPS/mag rotation should not cause this issue.

This is honestly and usually caused by either a bad mag calibration or a GPS/mag that is not aligned level and pointing straight forward.  Also, with DJI GPS/mag the aux mag orientation (as set in Attitude -> Magnetometer) MUST be 0,0,0.  Do not try to fiddle it to get the alignment numbers all zero.

Also make sure your mag Usage is AuxOnly so it only uses the mag that is far away from the high current wiring.

Re: INS13 unstable with 10 sat fix and green mag (NAZA GPS/Compass)
« Reply #5 on: March 29, 2019, 05:00:57 pm »
Thanks for your advice. I will check all this again, set my GPS completely aligned with the FC board, re do the mag calibration and test again.

Re: INS13 unstable with 10 sat fix and green mag (NAZA GPS/Compass)
« Reply #6 on: March 29, 2019, 05:07:45 pm »
Don't forget
Quote
Also, with DJI GPS/mag the aux mag orientation (as set in Attitude -> Magnetometer) MUST be 0,0,0.
<and>
make sure your mag Usage is AuxOnly
For I2C aux mag it must be 0,180,0 or 180,0,180 (they represent the same rotation).

Re: INS13 unstable with 10 sat fix and green mag (NAZA GPS/Compass)
« Reply #7 on: April 01, 2019, 08:05:23 am »
Don't forget
Quote
Also, with DJI GPS/mag the aux mag orientation (as set in Attitude -> Magnetometer) MUST be 0,0,0.
<and>
make sure your mag Usage is AuxOnly
For I2C aux mag it must be 0,180,0 or 180,0,180 (they represent the same rotation).

I am confused: for the NAZA GPS+compass, shall I set 0,0,0 or 0,180,0 ?

Re: INS13 unstable with 10 sat fix and green mag (NAZA GPS/Compass)
« Reply #8 on: April 01, 2019, 08:11:47 am »
An update on my problem: I updated to NEXT, reconfigured everything, and now INS13 mode works pretty good. No more oscillation and tilt.
I have a couple of questions though:

1) When I was using the "Position hold" mode, it was indeed doing a very good job, despite the wind that was sometimes quite strong and irregular. But after a while (maybe a minute), the quad started to climb, slowly, but surely, and without stopping (holding very well horizontal position tough). The only way I could fix this is to switch back to manual mode, or hit the "land" switch (and it took actually some time before it started to descend). Any idea why? Is it possible that due to the wind, the barometer got crazy because I have the Revo mounted without its plastic case, and I do not have a small piece of foam protecting the barometer from the wind? (I read that wind could have an influence on this).

2) What is the difference between INS13 and INS13+CF ? What is that best choice?

3) My Revo has OPLink directly on the board, and I have the small OPLink receiver connected on my computer. When updating to NEXT, I had to reconfigure everything, and this meant also flashing the new firmware to the OPLink receiver so that it has the same as the Revo board. Since I did since, i manage to make them communicate again, but it is a lot more laggy than when I used 16.09. Before, I saw the telemetry on the Flight display of my computer in real time, now it has some lag and gets stuck quite often. Anything I am doing wrong? I have the speed set to 56700. I tried 32000 too (it does not offer 33000), and max power at 100.

Thanks again for you advises!

f5soh

  • *****
  • 4572
    • LibrePilot
Re: INS13 unstable with 10 sat fix and green mag (NAZA GPS/Compass)
« Reply #9 on: April 01, 2019, 12:04:47 pm »
For altitude, try open-cell foam and cover the baro sensor. A temperature calibration will help also for baro drift.

INS+CF uses Complementary Filter for Attitude (RPY angle estimation) and EKF for navigation.

For Oplink, set the Air rate to 100000 to get something similar to 57600 with 16.09.

Re: INS13 unstable with 10 sat fix and green mag (NAZA GPS/Compass)
« Reply #10 on: April 01, 2019, 12:10:57 pm »
Will try, thanks for your answers!

Re: INS13 unstable with 10 sat fix and green mag (NAZA GPS/Compass)
« Reply #11 on: April 01, 2019, 03:35:06 pm »
I am confused: for the NAZA GPS+compass, shall I set 0,0,0 or 0,180,0 ?

DJI/Naza GPS+mag/compass MUST use 0,0,0 for aux mag orientation (on Attitude->Magnetometer page)
OpenPilot GPS Platinum (V9 with mag/compass) MUST use 0,0,0
Mag/compass that uses I2C (like comes with APM or PixHawk GPS) MUST use 0,180,0 or 180,0,180 (they are the same rotation)

Re: INS13 unstable with 10 sat fix and green mag (NAZA GPS/Compass)
« Reply #12 on: April 07, 2019, 11:40:28 pm »
Hi guys. And update after my flights this Sundays.
I recalibrated everything, and put foam on my barometer. Now position hold and velocity roam work a lot better!
Very stable.

The only point I still have to fix is the telemetry. Although I've set the speed to 100000 on both the Revo module and my OPLink module, it seems to be lagging. It was a lot fluider before I updated to NEXT.
Is there something I can try? Should under a higher speed ?

Thanks!

Re: INS13 unstable with 10 sat fix and green mag (NAZA GPS/Compass)
« Reply #13 on: April 08, 2019, 03:36:41 am »
That is the first thing I would try, especially if I had changed any telemetry update rate settings or was running control + data.

Re: INS13 unstable with 10 sat fix and green mag (NAZA GPS/Compass)
« Reply #14 on: April 08, 2019, 08:21:39 pm »
I have tried a few things concerning telemetry: I have tried almost all speeds: 100000, 128000 256000, 57600 and 64000.
All those speeds are very laggy. The first 5 seconds, Rx rate is about 1500B/s then it drops to 100B/s or less.
The only mode that seemed to go a little better is 64000. It was more or less stable at 1500B/s BUT disconnecting and reconnecting every 15 seconds.
I don't know what I am doing wrong. Before updating to NEXT, telemetry was rock solid.
Any suggestions?
Thanks!

--Edit: do I have to select MAVLink or ComBridge in the hardware config? --
« Last Edit: April 08, 2019, 08:31:28 pm by gnumarco »