Autonomous waypoint selection

Hi, I am an engineering student working on an autonomous glider that will be dropped from a weather balloon. The glider only has a pair of elevons, no motor. I have been using Mission Planner 1.3.75 with ArduPlane 4.2.2 to fly to a pre-selected landing point.
Given the predictability of balloon and glider flight, I would like to have an autonomous waypoint selection process set up. My plan is to have a number of pre-picked landing points (i.e. LOITER_UNLIM points), and the glider will be able to pick the closest and fly to it. I’m curious if there is any way to use Mission Planner to pick the closest waypoint and ignore the rest, upon triggering Auto. Another option I have considered is running a program on the ground to select the closest waypoint and somehow send that waypoint to the glider.
I’m open to any and all ideas on how to go about autonomous waypoint selection.

This sounds like a perfect case for using an onboard Lua script if your autopilot supports it.

Lua Scripts — Plane documentation (ardupilot.org)

1 Like

I’m not sure if it will do exactly what you want but instead of using an Auto Mission, configure the pre-picked locations as Rally Points and use RTL. Rally

3 Likes

Thank you for your response. I didn’t know about Lua scripts at all before this, and it seems super useful for this as well some other things. I’ll definitely be looking into it some more

This is perfect for what I am trying to do! Thank you so much. I would never have thought to use Rally points.

2 Likes