Octo Refused Loiter 3 times then crashed

I have been trying to setup an Octo for some time running 3.3.3 with a Septentrio RTK GPS.
It has been flying fine with a UBlox M8N, then the Septentrio in NMEA mode.
There were 3 compasses, one in the Pixhawk, one in the Setentrio which is mounted beside the Pixhawk, and a stand alone HMC5983 mounted high on the Copter. I could never get all 3 calibrated through Mission Planner.

The radios to the GPS base station finally arrived and we started testing.
First step was to change the GPS type to SBF and setup GPS Injection from Mission Planner.
There seemed to be numerous issues including slow random updates in the GPS position, lots of compass errors and finally failed loiter flights due to immense toilet bowling.

Today I updated the firmware to 3.4-rc5 after removing all but the internal Pixhawk compass.
Did the compass cal which went fine although it kept auto completing very quickly so I manually tuned till I had about 3000 points and accepted that.
The GPS had a solid 3D Fix with 15 sats and after ground checks all seemed well enough to test fly.

Stabilise was good although it seemed a bit sensitive, especially to yaw inputs when correcting a slight yaw wandering.
I was keeping it between 1m and 2m off the ground and when in stable hover selected Loiter.
I received the warning beeps that it was refusing Loiter and it was staying in stabilise.
Switched back to Stab and checked the telemetry readout on the Graupner Tx and all looked OK.
Selected Loiter again and it refused again.

At this point hind sight tells me I should have landed and looked for the trouble but…
I thought 3rd time lucky!
Not so much.
It almost immediately rolled and pitched into the ground.

I am no whiz at log reading but I did notice the oscillations in Roll/Pitch/Yaw which to me is indicating overtuned.
As I have done many successful FW updates with the same settings I am assuming I rushed into 3.4 a bit quick without altering anything.

What I am curious about though is why the dive and flip is not indicated in the logs.

If some kind soul would look at these logs for me and give me a slap in the direction I have stuffed up I would be really grateful.

3DR Pixhawk w/Crius HV Power Module
BEC into output rail w/Zener over voltage protection
MavToHOTT telemetry module in Comm2
Septentrio RTK GPS
Graupner Tx and Rx
T-motor U5 motors w/T-Air 40A ESC’s
T_motor 15x5 Props
1000 size Octo frame
6S 22000 battery

2 22-09-2016 11-48-24 AM.zip (3.3 MB)

PS: Looking into the logs the altitude goes negative because I took off at a higher point then flew it in stabilise down the hill a bit to where I generally test Loiter (easier than carrying it :slight_smile:)

Anyone? Any opinions would be helpful.

Especially as to why, with a good 3D fix, 3.4 refused to go into loiter.

Right off the bat it looks like there is a large change in the compass that correlates to current. Have you done a CompassMOT calibration? This allows the Pixhawk to map changes in the magnetometer in relation to current. Using solely the internal compass is asking for trouble, especially if it’s anywhere near your power distribution or battery packs. Open up Mission Planner or whatever you use to graph logs and pull up current (under CURR, parameter CURR) and the compass (Mag, MagX, Y or Z). I’m not seeing anything obvious as to why the crash occured. Pitch and roll track well with desired pitch and roll. Yaw does not. If you plot RCOUT channels 1-8 (motor outs) you can see a decent size imbalance with motors 1,2,7, and 8 working harder than 3, 4, 5, and 6.

Is this the same Mike Bolant from BTI Fly? Love your LED systems if so :slight_smile:

Thanks for the reply Matt,
Yes all sensor calibrations are done carefully, especially compassMot as I have a jig for these that enables me to tie them down securely.
I did not expect the internal Pixhawk compass to give me sterling service as it is wedged above the PD, about 2cm sitting on a CF sheet, and below the battery, 3cm w/battery sitting on CF sheet.
The point of the test was to remove everything but the essentials and test fly.
As it was I was expecting bad toilet bowling and was poised on the trigger to catch it, I just needed to check it would fly and go into loiter, which it refused to.

No, I am not that Mike Boland (with a d) :slight_smile:

More test results to follow.

Here in a seperate topic

Have you tried taking off in Loiter? I wonder if there is confusion in the code somewhere due to the low or negative altitudes? I had some problems related to that a few months ago. I’m not sure if the cause was addressed. (Part of the problem I was having was related to the old THR_MID value being too high.)

Thanks rrr6399,

Have a look at the further tests I did Here in a seperate topic

There seems to be some major issue with the GPS functions in SBF mode.

I am pretty sure I have resolved this issue as far as the FC crashing and the strange compass readings but not the GPS issues with SBF enabled.

It seems that an external compass I added, that was mounted next to an active multi frequency GNSS antenna had the SCL/SDA wires connected in reverse.
The antenna was also interfering and basically chopping off the lower half of the compass sensing, seen as a dome rather than a sphere when doing the calibration in MP.

The strange part was that this did not generate any i2c errors at all.