I had a great flight yesterday on my 3DR Quad-C with 880 motors that ended in a flyaway in Stab mode. I was flying in a school yard in a residential neighborhood and had to do something to stop it from climbing away and drifting with the wind so I switched to RTL. It immediately fell out of the air. Lesson learned. Do all test flying in remote wide open spaces.

It was the first flight with an external magnetometer, the first flight with telemetry (3DR), and the first flight with Andropilot. This may be too many firsts in one flight. All seemed well...right up to the point where it flew away after several minutes of very smooth normal flight. It was a gentle flight where I was giving the compass time to self calibrate and make sure there were no surprises. I did do a manual compass calibration before this flight and heading hold seemed to be locked in. The compass offsets were off the charts. This is much worse than before the addition of the external mag.

COMPASS_OFS_X    226.787
COMPASS_OFS_Y    66.172
COMPASS_OFS_Z    -711.784

Looking at the log, the APM was rapidly switching between Stab mode and Unknown, Armed and Disarmed.

The copter is new with only a few flights with 2.81 and two flights including this one with 2.91 and default tuning.

Any ideas?


Views: 1241

Replies to This Discussion

I'd guess the mode switching thing is likely related to the new Andropilot because it doesn't appear that your flight mode channel (ch5) moves around at all.

The altitude issue could be vibration, it's hard to be sure because the accelerometer values are logged at a very low rate in these tlogs.

The compass offsets are terrible however.  I wonder if it's mounted in the wrong orientation or perhaps you just have very bad motor interference.  -711 is amongst the worst I've ever seen.  It was actually this bad for the entire flight so even before you took off your heading was very inaccurate it think.  It's no wonder RTL had no chance of bringing it home.

why did you use Andropilot ??? and not Mission Planner ????

did you get the copter in one piece ???

Re: switching modes between stab and unknown etc...

I don't think this is really the case.  I looked at the tlog here:


And I think what you saw for mode changes is actually a (minor) bug in mission planner.  Andropilot tlogs store _all_ mavlink packets (including packets sent from the GCS).  The 'unknown' mode changes are actually MP misinterpreting the heartbeat message from andropilot.

If I ignore those messages (since they are from the GCS) I see only stabilize & RTL mode changes (most easiliy seen by downloading the kmz from the link above and viewing in google earth)

I've been experiencing the same thing. Mode is not changing.
When you say 'ignore those messages' are you removing them? KMZ in GE is constantly alternating between current mode and unknown. 313 points!


I could remove them in a future andropilot version, but it seems really handy to include the GCS data in the tlog file. I might instead just send in a pull-request to mission-planner so it ignores packets from the GCS.  That would also fix the MP google earth export.

(Mavlink packets include a sysId of the sender, only the heartbeat packets _from_ the vehicle should be considered when looking for mode changes)

I must say, I really appreciate all the work you're doing. I've been following for quite some time now, and there seems to be a short but very important list of heroes that show up in the forum consistently saving the day.(They know who they are.) Considering the speed at which Andropilot has been progressing, and your presence within the group, I believe you are quickly becoming one of those heroes. Keep it up.
Just started flying last week. Having a blast in Stabilize. Being new to AP, MP, APM, Windows...It's been overwhelming to say the least. Before this project, my computer experience didn't extend beyond email, itunes, and YouTube. The moment props were spinning, I wanted to fly. And fly I did. I think I've logged over 4hrs in the air.
Gonna try to tackle PID tuning next. STAB is rock solid with stock tune. I've been pushing it very hard, and other than prop wash on the way down, I haven't seen even the slightest twitch in STAB.
ALT HOLD and Loiter have been very mysterious, changing characteristics every time. I've tried to dedicate a few minutes of each flight to ALT HOLD. When things go well, and Alt is holding, I switch to Loiter.
I always hover for 8-10sec. before switching to ALT HOLD. Always at or near midstick. Sometimes it holds perfectly, I can fly around with minimal fluctuations in altitude. +-10cm without Sonar! But then the very next flight, after battery change, I'll get +-1m, or slow and steady climb/ drop. Loiter also changes from slight movements in a 30cm area, to a 3m confused wander(not circling) to all out drift away. I suspect vibrations are the culprit. I've been having too much fun to take things apart just yet. Want to get as many birds stoned as possible in one shot. Have left Yaw about 15° figure it's interference, as power wires are beside APM. Lots of work to do.


Hi Randy,
Thanks for the reply. I think vibration had to be the key factor that cause the compass offsets to go off the charts, and ultimately cause my problem. On this flight I could hear a harmonic resonance that had not been there before. The copter was flying so smoothly I thought (in my feeble, unknowing brain) it has to be okay to complete this flight. Wrong! I am learning little by little that the seemingly small things can create some of the biggest problems. I had flown most of a 5000 mah battery (10 minutes)and was beginning to feel confident in the machine following my commands so I had begun to increase power and aggressiveness though I was still very mild with it. After the third pass under a higher power setting is when it started to rise and became unresponsive. It was still stable as glass but beginning to slowly rise and drift with the wind. Due to wind drift and lack of responsiveness to my control inputs, I decided to do whatever I could to bring it down because I was flying in an old school yard in a residential neighborhood and had to get it down before it drifted over the homes across the street. It may have recovered if I could have given it more time at a lower power setting, but I couldn’t risk it.
The vibration had to come from a slightly bent prop shaft. I had a crash a couple of flights before this one due to my own error. I had checked for this and thought the motors were all okay. The props and motors were balanced, but obviously all was not okay. I will know next time to check closely for run out on the prop shafts. Most of my knowledge is bought and paid for in one way or another. This just continues the tradition. 
I believe the APM is mounted properly for normal vibration levels. It is mounted on a plate that is mounted on small silicone rubber bobbins and the APM is mounted on a 4mm foam pad. The plate is copper foil lined on the bottom. The magnetometer is mounted on top of the stackup two more levels up from the APM and is mounted beside the uBlox GPS with pins forward. The bottom of this plate is copper lined as well. Is pins forward the default configuration for the mag? It seemed to be functioning properly and very precisely.
I learned one more thing with this crash. The 3DR quad is an incredibly durable flying machine. This thing fell out of the sky onto an asphalt parking lot. I expected it to be toast but damage was only two arms bent. I couldn’t believe it wasn’t completely trash. I will having it flying again shortly and will do a better job prepping it for flight next time.

I also want to say you guys (developer team) do a great job. I appreciate the support you give the community.

Hi Kevin,

I have no clue what was going on with the mode switching. All seemed to be normal with Andropilot, but I was not watching it. It did force close once a couple of minutes into the flight. I realized it wasn't talking to me anymore so I landed and restarted it. I relaunched the quad and and had no problems with the flight until the end. I wasn't standing close enough to the tablet (ACER Iconia 500) to hear the call outs. Andropilot worked the first time I fired it up and is an amazing and much welcomed tool to fly with. Thanks for all your work in developing and providing it to our community.

For reference, I was in Stabilize mode the entire flight until the end when I switched to RTL to try to keep it from drifting away. When switched to RTL, it cut the motors and fell to the ground. Before that I couldn't ask for a smoother flying machine.

Hello Vitaly,

Not sure I understand the question. I had much rather take Andropilot on my tablet to fly rather than my huge 17 inch laptop.

I bought the 3DR Quad-C kit from DIY and built it myself. Was this your question?

For reference, I was in Stabilize mode the entire flight until the end when I switched to RTL to try to keep it from drifting away.

Yep - that's what the logs show.  The 'mode switching' you see on the MP log playback is just a playback time bug - probably in MP (or possibly me misinterpreting what sort of packets I should store in the log file).

I knew it couldn't actually be switching modes like it appeared to be doing or arming/disarming either. It must be some type communication bug between Andropilot and MP. I am sure you will figure it out. Thanks for the hard work you have put into the development of Andropilot. I know nothing of software development, but the speed at which you did this amazes me.


© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service