PX4-Autopilot icon indicating copy to clipboard operation
PX4-Autopilot copied to clipboard

Loiter counterclockwise NAV_LOITER_RADIUS in firmware 1.11.3

Open theojaasp opened this issue 3 years ago • 8 comments

I want to loiter counter clockwise. When I do the mission plan I can do that with a - in front of the raduis I want to fly the Loiter WP. But when not reaching the altitude of Loiter WP it loiters clockwise with the value we gave at NAV_LOITER_RAD. This leads to problems because the plane has to change to counter clockwise then. How can I loiter counterclockwise when using NAV_LOITER_RAD?? Will a - in front of the value do it?

theojaasp avatar Nov 21 '22 10:11 theojaasp

No, outside of a mission loiter it will always loiter CW. We would need a small code change to change the loiter default to CCW with a negative parameter NAV_LOITER_RAD - would you be able to make that change?

sfuhrer avatar Feb 15 '23 08:02 sfuhrer

Let's make an explicit parameter for the direction. Let's also have a look at the mission interface for loiter direction (also separate instead of sign of loiter_radius field).

sfuhrer avatar Feb 28 '23 18:02 sfuhrer

Ran into this problem today. Pinging @sfuhrer re this.

ryanjAA avatar Mar 28 '24 21:03 ryanjAA

No I am not able to make the code change..

Sent with Proton Mail secure email.

On Wednesday, February 15th, 2023 at 10:56 AM, Silvan Fuhrer @.***> wrote:

No, outside of a mission loiter it will always loiter CW. We would need a small code change to change the loiter default to CCW with a negative parameter NAV_LOITER_RAD - would you be able to make that change?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

theojaasp avatar Aug 01 '24 17:08 theojaasp

To make sure we talk all of the same thing: You want to be able to change the default loiter direction from CW to CCW through a parameter? When would you for example set that?

sfuhrer avatar Aug 14 '24 15:08 sfuhrer

Ya. Actually I think it should be qgc side but we need firmware support for it. + cw and - ccw is prob all we need.

ryanjAA avatar Aug 14 '24 16:08 ryanjAA

Ya. Actually I think it should be qgc side but we need firmware support for it. + cw and - ccw is prob all we need.

Can you elaborate what you mean with "should be qgc side"? Are you talking about the option to set the loiter direction for a GoTo setpoint? Or how else do you command loiters?

sfuhrer avatar Aug 14 '24 16:08 sfuhrer

Oh I guess you're right. disregard last comment. You need the ability both to be able to change the direction (cw/ccw) in the params so when you hit it via RC switch or QGC mode to loiter it goes the direction you want but what I meant (also) was that when clicking goto, you could also set the direction (which is done param side), it's only in mission plans you can choose the direction

Recap:

Mission modes are fine, the ability to choose direction is already there Non-mission modes: direction (cw/ccw) is chosen based on a param. Logic should listen to this in loiter mode, loiter switch via RC and Goto setpoint via QGC. What I would think would be good QGC side is to be able to also set a goto setpoint and tell it which direction I want.

ryanjAA avatar Aug 14 '24 16:08 ryanjAA

I think the best should be to have a parameter or 2 with a Loiter/Hold mode categeroy and then you can choose left for ccw and right for cw to have. So you then can put the hold mode/goto and mission mode loiter seperately

Sent with Proton Mail secure email.

On Wednesday, August 14th, 2024 at 6:59 PM, Ryan Johnston @.***> wrote:

Oh I guess you're right. disregard last comment. You need the ability both to be able to change the direction (cw/ccw) in the params so when you hit it via RC switch or QGC mode to loiter it goes the direction you want but what I meant (also) was that when clicking goto, you could also set the direction (which is done param side), it's only in mission plans you can choose the direction

Recap:

Mission modes are fine, the ability to choose direction is already there Non-mission modes: direction (cw/ccw) is chosen based on a param. Logic should listen to this in loiter mode, loiter switch via RC and Goto setpoint via QGC. What I would think would be good QGC side is to be able to also set a goto setpoint and tell it which direction I want.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

theojaasp avatar Sep 16 '24 22:09 theojaasp