Crash and problem with loiter/pos hold mode

Hi Guys,
i’m running copter 3.5.7 i did some crash and i stil don’t understand why.

here the log. 33: i was flying in Althold and i lost control in pitch movement and crash without reason!

I could be related with the fact i m not able to fly in loiter or poshold? when it use gps the drone lost the control. but when flying in althold is quite stable (log 29)

could someone help me?

i’m flying with mrobotix X2.1 with mRo uGPS ublox SAM M8Q (GLONASS) + Compass (LIS3MDL)

Here the links for download the logs,

your help will be really appreciated!

https://drive.google.com/open?id=1iqJrbCOFyMtB3IRkE3gVyCjlGkqj_kAZ

https://drive.google.com/open?id=1IlszHFiodLk8Tc2PwCumGRwtFUgPnRjo

https://drive.google.com/open?id=1naoGZlGUzMQgbl8UrRNf11npN5DCn-Fo

Looking at the 33.bin it seems you just ran out of battery.
Have you calibrated your battery monitor? 5v?
Looking at the Desired to actual roll and pitch against battery voltage and although the copters not well tuned it gets worse as the battery voltage drops off.

And plotting your RCout you can see the outputs going to max to try and maintain stability until it just can’t.

thanks for your analysis. which tool do you use for see the logs ? is not the default tool of autopilot (the graph seems to be different.

i figure out later by myself too that i ran out with battery, thanks for confirmation.

I know is not well tuned , i was not able to run autotune because as i said i was not able to flight with loiter. when uses gps the compass in ekf increase so much and i near miss a crash. see log 29. what do you think about that?
thanks so much

The battery is so low in those flights that the FC is in a brownout condition. Just look at Vcc.

i was not able to run autotune because as i said i was not able to flight with loiter. when uses gps the compass in ekf increase so much and i near miss a crash. see log 29. what do you think about that?

I use APM Planner for graphs.
You don’t have to be in loiter to autotune it just helps to maintain position.
Have you checked your compass orientation is correct?

the compass orientation should be correct. even because if not coherent with the orientation should appears “error compass variance” or similar

there is a way to check if compass orientation is correct with the logs?

thanks

can someone help me about this?

There’s a way explained in this link using a GCS to see if displayed heading always matches your physical aircraft rotation.
http://ardupilot.org/copter/docs/common-compass-setup-advanced.html
I’d give that a try.