Looking for some guidance on how to change the loiter radius while orbiting over a point.
Here is the scenerio, the plane will be loitering over a waypoint with a 10 meter radius.
I would like to instruct the plane to increase the radius to 15 meters over the same point while flying.
Is there a MAVLINK command or sequence of commands I can create to achieve this?
I could not find a mavlink command searching thru the documentation.
Another question.. I would like to trigger a fly to waypoint action by pressing a button on my transmitter.
For example the plane is loitering unlimitted over a target, then I want to command the plane to fly to the next programmed waypoint by simply pressing a button on the transmitter.
The plane would then fly to the next waypoint, and loiter there until another button command is provided.
I would like to step through my flight plan using a button to trigger an event.
Any suggestions would be appreciated.
Replies
I added this Mission Planner request a while back to do exactly this:
https://github.com/diydrones/MissionPlanner/issues/932
+1 on the issue to support it
We've been doing this by searching for Loiter radius in the full parameter list using a keyword like "loiter" and then type in the change and write/save the parameter.
Chris can you help out with writing a custom flight plan script? I can provide you a consulting fee.
This offer is open to anyone on the board as well that wants to help out. Thx..
Hi DiZzy,
Please find attached an expanding circle script. I offer it free of charge and without any warranties and with the normal disclaimers - so if you damage your property or others it is your issue. I urge you to do HIL or SIL testing before trying to put this onto an actual plane. It is up to you to test it to be sure you are happy with it. Use it as a chance to understand what it's doing and how you can make your own scripts. The more people who can help themselves the better off we are.
In terms of how to use it, you will need to have MP connected to the plane via telemetry. Load the script in MP. Set a mission with a loiter unlimited auto mission. Take off, then set to auto. Once on auto then you can turn channel 6 high, this will update the mission to loiter at the current pos with a set radius. Then when you switch channel 6 low and then back to high, it will then set a new loiter WP with a slightly larger radius. It will add a set amount each time you toggle it. When you are done then cancel the script, set a new mission or change modes and then land.
Hope it helps
Chris
ExpandingCircle.py
The scripts are written in Python, it should be an easy script to start with.
Yes there is a MAVLINK command to loiter at a set distance, it is limited by roll limits, etc.
From the MP Wiki you just set MAV_CMD_NAV_LOITER_UNLIM, you will set the radius to what you want (10m might be a bit tight for a plane). You could script it to change to a new WP on a signal from the TX, or you could just upload a new WP to the plane while inflight with the new parameters.
Loiter WP are good, but I was surprised at how large the circle was the first time.
For more details see:
http://planner.ardupilot.com/wiki/common-mavlink-mission-command-me...
Chris
Hello Chris how would I script changing the radius using a signal from the Tx. I have never tried setting up an input to send a mavlink command?
Thank you in advance