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?

Views: 4560

Reply to This

Replies to This Discussion

forgot to mention: I'm _no_ dev, just tinkering with the code, follow advice on your own risk, requires you to know how to compile your own code

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.

What is the HDOP?

I fly FPV and I bought APM specifically for the RTH feature. Stabilization, Loiter and other features were added bonuses. I never use the Auto mode (although I admit I may try it one day)

What is the point of RTH if it's really RT(somewhere over there)? Admittedly my in the field tests have resulted in RTH being cancelled while still a few hundred meters away, but what if I really need it one day and it sends the plane circling over some nearby houses?

I disagree with this a bit Jake.  For a long time, I used APM for RTL without proper telemetry.

I did this for a couple of years before I realized the initial lock could be hundreds of meters off.

Stumbled on it one day earlier this year, and has become a bit concern of mine since then.  

I really think we should be able to rely on RTL without having FPV/OSD or telemetry.

Setting min sats for lock seems like a pretty simple way to ensure lower DOPs.

@ Andre where do we add the pushbutton 1 home set trigger? Main loop or system.pde?

Eddie, HDOP is a measure of how reliable and accurate you GPS is based on sats in view, geometry and stuff. It is a standard output of a GPS module. Its an acronym for horizontal dilution of precision. If you set home with a bad HDOP you could be off a bit ~ 30 m max maybe. Easy to put this into code. You will need an input. Could be done with transmitter sticks. Why don't you just plug in to a netbook and use the MP to set home. That way you are sure that it's right. You can pre-fetch your flight area while connected and then use it in the field to set home. You will see your plane on the map and you will know if its right, then click to set home.

But if you think about it, having telemetry more than pays for its' self if you craft goes down in the woods or in a cornfield. You would have the whole fight recorded on your laptop and you would have a very good chance of finding it. With out data your chances are slim and none. Well worth the modest investment. imho.

Well for one, number of sats means nothing, so I assume you're meaning to say a certain HDOP figure.

The main issue though is that you have no business using autopilot features without a means to control them.  If you don't have telemetry then I guess you could get by using USB in the field.  But that doesn't seem to be what people are doing.  They want to load a mission at home then go to the flying field and use autopilot features.  This activity should be discouraged.

The people this feature seems intended for are the same ones it will cause problems for.  People with no telemetry are going to launch their crafts when they see the 3D fix light lit, assuming it has stored a home location.  This is sure to cause problems.  It's better to have an inaccurate home location than none at all.

Here is the full function and here is where I added it to ArduPlane.pde. This should at least work for up to ArduPlane 2.5. Just check that PUSHBUTTON_PIN is defined inside config.h.

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...

Hi Andre,

Might this work on APM2.0 if you defined PUSHBUTTON_PIN as one of the pins down the side, say A6 or A7?

You're doing very well in the discouragement department Jake. Give yourself a pat on the back.

The rest of your post is complete drivel and hardly warrants a response.

Reply to Discussion


© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service