Changing loiter radius during flight


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.

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

Join diydrones

Email me when people reply –

Replies

  • Moderator

    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.

  • Forgot to add you'll need to have the MP connected while you fly.....
    • 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

        https://storage.ning.com/topology/rest/1.0/file/get/3702723172?profile=original
  • You'd need to script it from Mission Planner, I'm sure you can access the RC_IN values from it. From there I'd put logic in to wait for a channel to go high and then move the radius out and update the WP with the new parameters. You'd also need to put something in their about then waiting for it to go to low before accepting the next high to add the distance again, and updating the WP.

    The scripts are written in Python, it should be an easy script to start with.
  • Hi,

    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

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…