I've built a APM 2.5+ based quadcopter running AC 2.9.1 firmware. I got a gps lock before I took flight, flew around a bit quite successfully (landing several times).
I then switched it into RTL mode to test it out - it increased altitude, rotated towards and flew what seemed to be home, but once it reached there it veered off right. Unfortunately I didn't have enough room to let it continue to see what it was up to, so I switched it back to stabilised (and failed to control it and hit a tree!) No major damage though, battery survived the fall, one prop chipped.
I'm trying to figure out what went wrong, can anyone help?. It's set to loiter for 5 seconds once it reaches before descending to 2m and at first I thought maybe it tried to start circling (the circle radius is set to 10 metres, pretty big for a qc) but arducopter shouldn't circle in loiter mode, only arduplane should do that i think. arducopter loiter should just stay in place as I understand.
I've got a shakey video of the flight (my cameraman understandably panicked a bit as my flying blender suddenly changed course :)
have attached the trace. You can see the RTL kick in when the altitude increases. Any thoughts? Thanks in advance!
Tested again today with much more space. First time, it was successful. loitered above home for the 5 seconds I have it set to, then lowered to 2m and held position.
The second time I tested, it just headed in the opposite direction, to a point about 25 metres away from the launch point. I had to take control back before I could see if it was going to land there as I was a bit worried it wasn't going to stop! I was able to take control and bring it back though.
Could this just be a jittery gps?
Look at your tlogs.
Verify you have a 3D fix on the GPS during RTL and when it flew away. If it was 3DFix the whole time, then it maybe a compass issue. If you lost a 3DFix, you lost GPS precision (you need a 3D fix for autonomous modes).
If that's the case, down load your parameters and look at the compass offsets: if any # is > 20.0 in the offsets, there's a problem. Basically you want to find the correct offsets and then *turn off* the auto compass calibration feature. The compass can go nuts on 4 things typically: magnetic interference, I2C interference (if you're using a 900Mhz radio), bad solder joint of compass (APM1), or defective board (APM2).
I leaning toward compass offset issues (from the auto-tuning) since RTL was showing the "great arc" trajectory and speeding off (which is another form of the 'spiral of death' issue folks are having)