Battery Failsafe not logged in dataflash

First of all I apologise for re-posting; I had originally posted in the Copter 3.3 (Battery Failsafe not logged) category, but could not get the answer I was looking for and I now see this category is more suitable for this purpose.

I’m using ArduCopter 3.3.3 on a pixhawk board. The other day I was doing some failsafe testings, and intentionally let the battery failsafe trigger twice. Both times it worked correctly (drone entered RTL mode and landed uneventfully). However, the failsafe does not seem to have been logged on the dataflash. It is present on the telemetry log (if I replay it on Mission Planner I can see the “Low Battery” warning popping up when it goes to RTL) but on the dataflash logs there is no failsafe in the errors or events fields. Does anyone have a clue why this happened?

DataFlash log:
https://dl.dropboxusercontent.com/u/21063451/58.BIN

Telemetry log (this corresponds to only a part of the flight, since I also tested telemetry failsafes and that led to log cutting): http://discuss.ardupilot.org/uploads/default/original/2X/8/8a550276780f08403585625b44bd33e5809ce699.tlog

Thanks in advance for the help

Both your 58.BIN and 133.BIN show significant outages in the DataFlash log stream:


(those pretty pictures show the time since last ATT message on the Y axis, and one is just a zoom of the other)

I think you need a better SD card.

You would have to be unlucky to have lost those messages, but it isn’t beyond the realm of possibility.

You can actually test this theory - look at the timestamp on the message in the telemetry log and see if it falls in one of the gaps.

Also, the EKF was significantly unhappy in 133.BIN; it looks like your magnetometers aren’t playing nice.

Oh. Last thing - more modern versions of ArduPilot are less likely to drop error messages as they are considered “critical” and “critical” messages get some reserved space in the DataFlash layer.

Thanks for the quick response and thourough analysis

Interesting analysis on the time between logging; it seems to be missing some messages from time to time. Perhaps it might help if I can change the log bitmask? As of now I have all of them active, including the Fast IMU

I had noticed the warnings about the compass, but thanks for the heads up.

I didn’t follow your last comment, though. I believe 3.3.3 is the last release for ArduCopter?

PS: how did you make those plots? A custom software of yours?

Interesting analysis on the time between logging; it seems to be missing
some messages from time to time. Perhaps it might help if I can change the
log bitmask? As of now I have all of them active, including the Fast IMU

Yes, reducing the logging rate will help. Trying different SD cards is
worthwhile (more expensive doesn’t necessarily mean better).

I didn’t follow your last comment, though. I believe 3.3.3 is the last
release for ArduCopter?

Latest release, yes. The next one is just around the corner! I was
apparently refering to non-released versions :slight_smile:

PS: how did you make those plots? A custom software of yours?

Those were made with MAVExplorer.py, part of MAVProxy:
MAVProxy/MAVProxy/tools at master · ArduPilot/MAVProxy · GitHub (Windows
support is apparently a little iffy).

dronekit-la (GitHub - dronekit/dronekit-la: Log Analyzer for ArduPilot DataFlash logs and MAVLink telemetry logs.) was the tool that
pointed out the EKF issues.

Peter