Switch Missions 'on the fly'

Hello Quaxwilly!

(I am from Austria, but will stick to english for all the others :slight_smile: )

=> have you thought about the “special” function for the small boat for fishing? Sending it to one of 6 waypoints that are stored in the mission on the boat?

I studied the manual for LUA-scripting, but I haven’t found the command for that.

My vision: press one of the 6 buttons on the TX16 (normally used for flight mode), then move a switch and the boat goes to waypoint X. Maybe with a 3way-switch “manual” - “goto waypoint” - “RTL”.

Or anybody else: could you point me to a direction?

Using different missions while fishing requires too much hardware => I could manage waypoints within a mission with apps on my phone, but it is too much to transfer files and so on.

The switch mission script can do six missions with the toggle function no problem just using one button and display will tell you if you’re on mission #1 or #2 etc.
The problem will be setting the waypoints in the first place, the fact is you will need to create the missions in the first place. Im not sure about how to save a waypoint using a switch because in my application i dont need to do that.

@HaBa Some months before I have created a script exactly for that purpose @Scott_Nunan mentioned. By pressing a button a Mission with just one waypoint will be created.
Pls give me some time to post it - Im very busy in the moment.

Edit:
Because currently there is a change in LUA-Interpreter from “stable” to “latest/dev” at opening a file correctly, I have to check and maybe improve the code for not to create an error in one of that interpreter-versions.

https://discuss.ardupilot.org/t/switch-missions-on-the-fly-store-waypoint-as-new-mission/94467?u=mckey

This is the script that @Quaxwilly talks about.
If this great person (@Quaxwilly in the future, if he has time, can make a script for assigning a new RTH position, it will be very cool in general.(the tx16x has an internal GPS, and I would like to take its position as a point for returning home)

Thank you!

That sounds promising, but is also not what is needed for my purpose (and I guess others :slight_smile: )
=> I need 6 (ore more) waypoints in ONE mission, so I could also use the existing apps :slight_smile:

Alls the current apps for that purpose of “bait boats” act like this = they load the mission from the AP (in this case mostly pixhawk), they show you the points as overlay to some ?google?-map, then you can do something like “go to” and press on the position marker on the screen.

In these apps you can “organize” your current waypoints and missions with a “mission editor”, you can store them on your phone (as a textfile) and so on.

It is a completly different approach, I know, I thought it may be easy for you to code a simple “get waypoint according to button position and goto there” :slight_smile:

The point for RTH in these apps is calculated at “where was the first GPS-lock in this powerup”

For that purpose you have the “Guided Mode” implemented in ArduPilot:
https://ardupilot.org/rover/docs/guided-mode.html
On cellphone you can use e.g. QGC

If you have no connected GCS you have to create a mission for each waypoint and switch by the Switch-Mission script. If you use the one-button method, that’s not restricted to only six waypoints.

That script is for easy use with NO GCS! Just prepare your missions at home and select it via one button on the lake.

1 Like

You are not the 1st to ask about this. Here is another discussion:
Select Waypoint
There are other inquiries.

@McKey Sorry, but no. I don’t have the necessary hardware (e.g. tx16x) to do that. Setting a new Home in FC is straightforward, but you have to send that position from TX to FC.

Thank you for the fast response.

I cannot prepare anything at home, that is the whole point :slight_smile: => come to the lake, ZERO WP or missions stored, find some places to fish, store them as waypoints, then select in the apps like “carp pilot” “goto” an “klick” on the stored WP on the map.

https://www.carppilotpro.org/

My phon is connected via BT to my TX16s (or the SIYI FR30 in it), telemetry to the pixhawk is working over that.

So I have tools by hand to reorganize WP in a mission.

And I would like to select on WP in this mission by button and let the boat drive to it without fiddling around with my phone or a tablet.

Sorry to disturb your thread, the link to the other threa (thank you @dkemxr shows me that nobody is interested in things like that if such core functionality (in my eyes) is not provided in ardupilot or lua-scripts).

Fiddling around with the boat before (making missions and copy them to somewhere) is exactly something that I would like to avoid with my “push a button out of 6 an boat drives there” :slight_smile:
Thank you everybody for your patience.

@HaBa that core functionality that you are looking for has been implemented by @Quaxwilly in his script. Have you tested it?