Based on a previous comment you made John, you are using the mag and still get the same less than optimum response to engaging RTL?
Loiter for me is kinda iffy, if I engage it, I have to watch the copter because after 45 seconds or so(which is longer than it sounds because hextime is like dog years) the hex starts some pretty erratic dashes and swirls, which I had reasoned were because it had lost heading due to lack of movement.(not saying it held perfectly still). My reasoning being that as the GPS updates fell closer together, the amount of error in the system diminished until there wasn't enough to calculate a heading.
Might be way off base, but sounds good when I say it in my head.
That sounds like PID settings to me, given my entire 1 month of experience with APM2 :) I had some less than optimal loiter tests until I got the PID dialed in. I would also have similar movement where it would seemingly loose track of loiter position and attempt fly away... I kept tweaking until it was holding a position longer and longer with less and less drift and after I got the Loiter PIDs dialed in it will loiter within 2 meters for an entire pack.
For me loiter was a lot of trial and error with a logical starting point for troubleshooting. I really don't know where to go from here with RTL as I think I have all the prerequisites for a successful loiter working.
Mag is 100% required for RTL and loiter (or any other kind of autonomous flight). For Planes we can use the GPS for direction because planes they mostly move forward but for quads, we really can't rely on the GPS to tell us which way we're heading...because of course we could be flying backwards...so use the mag instead.
I should add that APM2 comes with the mag built in, but for APM1 it's a separate option.
I tried again this morning, mostly because the wind is usually nonexistant, I was able to get one successful RTL from about 75 meters away on a diagonal. I actually watched the hex return and go into a what looked like loiter and it started reducing power to descend and short of touchdown I switched back to stab.
I removed power, reestablished GPS lock and tried again from a different start and lauch angle. No luck this time, again a mad dash toward doom and a frantic attempt by me to regain control before the crash, not so lucky this time as the hex was lower at the start of RTL and the ensuing panic resulted in a cartwheel across the ground. (often I'm glad no one witnesses these events except my cowering dog).
Well, without a mag, you will need to be very very lucky to make it work. At the point you engaged loiter it would have to coincidentally be pointing in the same direction as it's internal uncorrect direction..a one in 360 chance of being right on...although probably within 10degrees and it'll be close enough.
Well I tried this morning before I had a chance to read your comment about the requirement for the Mag on certain flight modes.
I had looked and hadn't found a definitive answer as to whether the mag was a requirement for certain flight modes.
It just seems that the hex's response is a bit exaggerated. I'm not intimately familiar with the internal workings of the program, so my expectations were probably a little optimistic. I've got a mag enroute on a fedex truck, so hopefully by this weekend I should have an opportunity to try this again with the needed sensor set.
Problem solved!! mag was not working indeed. Bad soldering. Must have gone bad during one of my previous crashes:)
Thanks to all,
Unfortunatly the Mag fix didn't solve the RTL issue. Did a test last weekend and same issue appears. When switching to RTL, the copter flew further away instead of coming back to launch. I attach the logfile and sketch about what happened. Armed copter after 3D fix so would assume that's his 'home' position. Hopefully somebody on the forum can give me some tips or advice.
Like I said earlier I have had a lot of trouble with the mags.
I have one that does something very similar.
At first I thought it was a bad connection/wiring but after re-soldering all the wires it still behaves like this when there is vibration or interference from the motors.
I have been through about five mags due to crashes and poor mounting options on APM 1.