I've been looking for a way to set my home location after the APM2 is powered up. So I can get everything working on the edge of a field, then walk in to the middle and set home before I launch.
If I create a simple mission:
Would that update the home location when I switched the plane to Auto?
If not, is there anything I could add to make it work?
If I added
Would that continually loop, updating the home location until I turned Auto off? Would the mission remain incomplete so I could run it again later without resetting the APM2?
Ok, I've played around a bit more and I think this mission will work.
LOITER_UNLIM (lat, lot, alt)
DO_SET_SERVO 2 1000 (move the elevator as a confirmation the script has run)
DO_JUMP 1 -1
Does that look right to someone?
Hi Eddie, Wondering have you succeded? I was trying to send PWM signal to an output channel "on table" trying to fool APM2, but it didn't work.
On the bench switching to Auto did make the elevator go down. We set up in the middle of the field today anyway, so I didn't test the set_home part of the script. Maybe next week. :)
On another note, all the flight modes checked out ok so I made a new personal best distance of 1365m today. :)
Congratulations! I wasn't so lucky with the script. Which version of APM, firmware do you use?
there appears to be a MAVLINK message type (mavlink_msg_set_gps_global_origin) that is inteded for that purpose (note that I am just guessing this by its name). However, it does not seem to be implemented in neither ArduPlane or ArduCopter based on a quick grep of the sources.
So I guess you could just make a feature requires on the issue tracker and hope you get one of the devs interested. Or, which may be a lot faster, just implement it yourself :)
I may be interested in that, too but guess I won't have time for that in the near future at least. I have the same problem of standing at the boundary of the flying field and when I do RTL the other guys doing their own RC things (understandingly) get a bit annoyed :-)
Hmmm. I thought that home was set when you armed your FC. If not, that explains a few problems I've had....
I'm not sure about ArduCopter, but in ArduPlane it's set as soon as you get a 3D lock. Often the position is still not that accurate at that stage so I want to set it once I have 9+ satellites. I put in a feature request for a parameter to specify the number of satellites acquired before it is set, but a scripted switch seems the best solution at the moment. The only problem being that I can't load any actual autopilot missions.
It's there already Eddie :)
The issue request is here http://code.google.com/p/ardupilot-mega/issues/detail?id=704
Please vote for it if you'd like to see this feature.
Can anyone from the development team please give us a definitive answer as to how/when HOME can be set?