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:
DO_SET_HOME
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
DO_SET_HOME
DO_JUMP 0
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?
Replies
Thanks for all the suggestions of taking a laptop/notebook to the field. All I want is to set my home location. I thought it was a small, simple request. I don't want to go and buy a laptop or a telemetry radio system just to set home.
The available equipment to be used for this exercise is...
A plane with an AMP2 in an inaccessible location deep inside the fuselage.
An FPV setup on the plane with a camera, MinimOSD and a video transmitter.
An 8ch RC transmitter. (ch5 is free, the rest are used)
A video receiver with Fatshark goggles.
I'm happy to modify the plane before it goes to the field, eg add a push button, but I don't want to take any extra equipment to the field.
If you have telemetry (or a mini USB) can you set the home location through the mission planner?
To be honest, although I'm on the [arducopter] dev team, I'm slightly unsure of the relationship between the home location shown in the planner and the GPS location that's captured after the first GPS lock...
Trying to do something like this could be a dangerous feature. It encourages running without proper telemetry and people doing this are also the ones that will launch right after they get a 3D fix. If the home location isn't set at that point they'll be flying with no valid home location which will disrupt RTL and other safety features.
If you don't have telemetry you're basically using the APM as a stabilization board and shouldn't be trying to use it for autopilot features.
If this feature is implemented it should depend on the HDOP and not allow any operation until that is achieved. A lot of people probably wouldn't like that, but it would be a lot safer.
Hi again,
won't help your APM2 I'm afraid but I may have found another solution that may be interesting for APM1 users so I mention it here due to the lack of a better place. So it turns out there is an unused pushbutton on APM1's oilpan on pin 41 (active low) which can be used for that purpose. It has been disabled in the next version of ArduPlane but if there is sufficient interest maybe one could bring it back. I haven't tested it yet on the field but on my bench it seems to work. So for ArduPlane (maybe works for ArduCopter, too but haven't checked) basically add something like this which will flash LED A twice and set home to the current location whenever you push the button (on your own risk of course:-)
Can anyone from the development team please give us a definitive answer as to how/when HOME can be set?
Hmmm. I thought that home was set when you armed your FC. If not, that explains a few problems I've had....
Hi,
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 :-)
Cheers, Andre
Ok, I've played around a bit more and I think this mission will work.
LOITER_UNLIM (lat, lot, alt)
DO_SET_HOME 1
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?