Time dependent missions

Hello, I've searched all over Google and a few forums with no direct answer. I've been reading some documentation here ( https://pixhawk.ethz.ch/mavlink/ ) and here ( http://qgroundcontrol.org/mavlink/waypoint_protocol ) but still haven't had any luck. I'm working directly with a terminal and MAVProxy/MAVLink.

What I'm trying to do is create a mission, let's say with 4 random waypoints specified as following example:

wp1 - take off to altitude 50ft
wp 2- Lat x1, Lng y1
wp3 - Lat x2, Lng y2
wp4 - RTL

This part is easy, and already figured out.

How about attempting to run this mission 5 times in under 3 minutes, if 3 minutes are up and mission is still not complete, trigger RTL.

I noticed the state-machine diagram shown here ( http://qgroundcontrol.org/mavlink/waypoint_protocol ), and also noticed the command 'MAV_CMD_DO_REPEAT_RELAY' shown here ( https://pixhawk.ethz.ch/mavlink/ ).

Other than that, I'm out of ideas. Has anyone attempted anything like this before?

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • I am not aware of it being built in, but another tack if you have telemetry is to send the commands using a python script in mission planner. I haven't played with it and not sure if you can time things, but it looks like it has "while" loops.

    edit, looks like there is a timeinair which might let you compare against a threshold

    • where did you find something about 'timeinair' ?

    • Yeah, I think that's exactly what we're going to do. We used the google maps API, where we use the polygon tool to select our waypoints, store those latts/lngs into an array, and pass that string array as an argument into a python file that calls each waypoint after a certain amount of time. The only problem we're having right now is extracting the home position coordinates from MAVProxy. The 'status' command has the current location in it but the problem is getting the location out of the MAV console and into a local .txt file.

This reply was deleted.

Activity