IRIS+ lost control when I initiated RTL from loiter mode

I had a malfunction of my IRIS+ mid-flight after initiating RTL mode from loiter mode (also used circle mode at one point). The copter lost altitude several times whenever I tried to reinitiate RTL from stabilize mode. I managed to fly it in safely in stabilize mode, but close call.

I was wondering if someone could determine from my attached dataflash log what went wrong. I have the impression it was low battery (bad mistake if this was the case). I just want to know what was wrong so I can learn from it.

Any input greatly appreciated,

-Brian

@brianwhite,
Here is an Auto Analysis of your log file:

Size (kb) 4664.994140625
No of lines 63413
Duration 0:04:31
Vehicletype ArduCopter
Firmware Version V3.2.1
Firmware Hash 36b405fb
Hardware Type
Free Mem 0
Skipped Lines 0

Test: Autotune = UNKNOWN - No ATUN log data
Test: Balance/Twist = GOOD -
Test: Brownout = GOOD -
Test: Compass = GOOD - mag_field interference within limits (11.32%)
Max mag field length (557.80) > recommended (550.00)

Test: Dupe Log Data = GOOD -
Test: Empty = GOOD -
Test: Event/Failsafe = FAIL - ERRs found: FLT_MODE FENCE
Test: GPS = GOOD -
Test: IMU Mismatch = FAIL - Check vibration or accelerometer calibration. (Mismatch: 2.61, WARN: 0.75, FAIL: 1.50)
Test: Parameters = GOOD -
Test: PM = FAIL - 25 slow loop lines found, max 10.00% on line 1255
Test: Pitch/Roll = FAIL - Pitch (43.55, line 42047) > maximum lean angle (30.00)
Test: Thrust = FAIL - Avg climb rate -163.08 cm/s for throttle avg 737
Test: VCC = GOOD -

Looks like you have an IMU issue and had a FLT_MODE FENCE occurrence.

Regards,
TCIII GM

thanks.
Do you know if that means a hardware issue? Do you think it will happen again?

Vibes look ok…looks like IMU 1 has a problem.