jdl

  • ***
  • 246
Re: A (maybe) serious problem with INS13 in NEXT.589!
« Reply #15 on: April 02, 2018, 03:09:54 pm »
Tested it. I confirm the yaw rotating issue I had with my ZMR250 (UAV2) with INS13 is gone now.

Also applied the changes from https://bitbucket.org/librepilot/librepilot/pull-requests/504 to UAV1 firmware (next.589 + ADC-on-Servo-Outputs fix + AltitudeHold fix + this INS13 fix) and the slow light yaw oscillations are not there anymore.

Thanks, Sir! :)

Btw, after confirming the new firmware solved the problem, I did accelerometers calibration for UAV1 again and noticed the new values differ in some extent from the ones from previous calibration, that I'd done very carefully an year ago. This makes me think that accererometers / gyros has some ageing and it's a good idea to re-calibrate them periodically. Am I right?

@TheOtherCliff: Your comments on EKF diverging with bad calibrated sensors helped me get a better idea of the issue, thanks! :)
After successfully testing the fix from the f5soh, I flashed back the original next.589 and the yaw rotation was there again. Then I recalibrated accelerometers only and the rotation stopped, but yaw was oscillating slowly, similar to what I was getting on UAV1 and the wing. So you was right, accelerometers calibration data was somehow inaccurate! This confuses me as I'm sure I did it very thoroughly only weeks ago, but before the thermal calibration. Should the accelerometers be recalibrated after the thermal calibration, like gyros? Or it's a matter of floating-over-time characteristics of the MEMS chip?
« Last Edit: April 02, 2018, 04:28:05 pm by jdl »

Re: A (maybe) serious problem with INS13 in NEXT.589!
« Reply #16 on: April 02, 2018, 04:30:44 pm »
The assumption I heard/used in the past is that gyros and accels don't need recalibrating, but for some reason, the mags do.  I assumed with the mags it was moving the battery around or a different type of battery, but that would probably show up most during high current flight, not during calibration.  I think too the advice came because the onboard mag environment was a difficult area to get the model built and wired correctly.

Since I have been using aux mag on GPS, I don't bother even recalibrating that and it works well (16.09).

The one thing I can say about recalibrating is that after doing a thermal calibration, you will see that the gyro noise is not centered.  Just recalibrate the gyros and save and they become centered.  My thermal calibration is over a very large range, -5C to +70C because I want to fly in cold winter and in summer I have seen +70C in telemetry when domed FC is sitting on hot ground for 15 minutes acquiring GPS almanac.

jdl

  • ***
  • 246
Re: A (maybe) serious problem with INS13 in NEXT.589!
« Reply #17 on: April 03, 2018, 10:01:56 am »
I've used to follow the same assumptions. I also usually do thermal calibrations over a range of -10C to +90C as sometimes I fly in very cold or very hot (38-40C+ and the sun additionally heating the board) weather. May be a little overkill, though.

I've also made auxmag calibrations for every type of battery I use on the copter and save them (AuxMagSettings & RevoSettings) together with StabilizationSettingsBank1,2,3, SystemIdentSettings, FlightBattery Settings (for cells count and capacity), Mixer Settings (for ThrottleCurve), AltitudeHold (for ThrustLimits.Neutral) as UAV preset files for every combination of battery and props I use to fly with. I upload them to the FC before flight is necessary.

In fact I've found that mag needs recalibration if the flight zone is too far away from the calibration point (many hundreds of kilometers). I've not tested yet if the new setting of EKFConfiguration | MapMagnetometerToHorizontalPlane = "True" will help to reduce the negative effect of not doing mag recalibration in this case.

As for my observation of shifting accel calibration values, I've found that it is an issue with the calibration procedure in the firmware, it messes subsequent calibrations with previous ones and produces more and more shifted values. Easy to avoid by setting accel_bias.x,y,z=0, accel_scale.x,y,z=1 and gyro_bias.x,y,z=0 before starting the calibration.

P.S. I've just tested in real flight both quads - UAV1 & UAV2, INS13 (with the new EKF defaults and new firmware changes from f5soh) and the same mag calibrations as before - they both fly perfectly well, either in Attitide, or in autonomous modes.
« Last Edit: April 03, 2018, 01:28:01 pm by jdl »

Re: A (maybe) serious problem with INS13 in NEXT.589!
« Reply #18 on: April 03, 2018, 04:22:10 pm »
I fly an INS13 quad with an aux mag.  I fly at two sites about 37 miles apart and don't recal mags at all.  I have flown that one for a couple years now and only recal'ed when I put 1609 on it.

I do have a slightly different mag cal procedure.  Here at my latitude, north mag vector is 60 degrees down.  I click next to skip 5 times, and then on the 6th one I point (not too quickly) and wiggle each of the 6 directions (left, right, top, bottom, front, back) to point at the mag vector which is north, but 60 degrees down.  This way, the bank angle (upside down, etc.) is not important.  My thought is that this way, I guarantee that each pole of each sensor direction has a chance to clearly see the max field strength.

Find your magnetic inclination (not declination) here:
https://en.wikipedia.org/wiki/File:World_Magnetic_Inclination_2015.pdf