ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

Copter: Restore the start-up radius and rate

Open muramura opened this issue 5 years ago • 5 comments

I set circle_control_enable to 1 in circle mode and did the radius manipulation. I found out that this specification changed the values of circle radius and circle rate. I learned that I used this circle radius in the MAV_CMD_NAV_LOITER_TURNS command. I do not use the modified circle radius and circle rate in circle mode with the MAV_CMD_NAV_LOITER_TURNS command. I want the MAV_CMD_NAV_LOITER_TURNS command to use the default values. I want the circle radius and circle rate changed in circle mode to return to the values they were at mode startup.

muramura avatar Jun 15 '20 23:06 muramura

This looks like an improvement but I think the same problem happens with the LOITER_TURNS mission commands and it might be a good idea to fix both problems at once. For example, I think if a loiter-turns command sets the rate and radius then the next time the user enters Circle mode it will use the values specified in the loiter-turns command.

A more complete solution might be to enhance AC_Circle so that get/set_radius and get/set_rate affect a copy of the parameter values instead of directly affecting the parameter values.

Then AC_Circle::init could always restore these temporary values to the parameter values.

rmackay9 avatar Jun 16 '20 00:06 rmackay9

@rmackay9 san. Thanks for the comments and ideas. I will change it to include comments and ideas.

muramura avatar Jun 18 '20 07:06 muramura

@rmackay9 san. I've changed the following Do not change the circle radius and circle rate of the config parameter. Set the values of the configuration parameters for the circle radius and circle rate for change during initialization.

I was able to confirm that circle mode and the MAV_CMD_NAV_LOITER_TURNS command had no effect on the radius and rate.

muramura avatar Jun 18 '20 21:06 muramura

Needs a rebase ontop of https://github.com/ArduPilot/ardupilot/pull/17331 and https://github.com/ArduPilot/ardupilot/pull/16757

IamPete1 avatar Jul 25 '21 19:07 IamPete1

A lot has changed in here, and my guess is the conflicts will be horrible.

@muramura did you want to pursue this?

peterbarker avatar Sep 15 '22 04:09 peterbarker