Guided Mode in ArduPlane – When does the plane start banking toward the Guided point?

Hi everyone,
I’m trying to better understand how GUIDED mode works in ArduPlane, especially the turning behavior.
I have set the following parameters:

WP_RADIUS = 90 m
WP_LOITER_RADIUS = 150 m

When the plane is flying toward a Guided point, I noticed that it starts to bank and initiate the turn at approximately 210 meters away from the target point.
I have already looked in ArduPlane/mode_guided.cpp, libraries/AP_L1_Control/AP_L1_Control.cpp. However, I still cannot find exactly where and how the decision is made to start the bank.

My questions are:

What exactly determines when the plane starts banking/turning toward the Guided point?
Which part of the code controls this behavior?

Thank you!

When you use guided mode the plane will never actually fly over the point (assuming you’re approaching it from a distance away). As the plane approaches the WP_LOITER_RADIUS away from the guided point, it will start to turn and orbit around the guided point. How aggressively it turns into the loiter depends on the L1 tuning.

If the plane’s radius around the guided point doesn’t match WP_LOITER_RADIUS then you may need to tune in NAVL1_LIM_BANK to get it to where you want.

1 Like