The plane is loitering when switching to guided mode

hi everyone,

In ArduPlane, when I switch the flight mode to guided, the plane is loitering until I set a target location.
I am researching in ArduPlane source code but I dont understand why it happens.

please someone explain me :slight_smile: thanks.

that’s right. What else would it do?
The code that sets this up is here:

it sets the target location to the current location

1 Like

Thanks @tridge, I have found relevant code after I wrote to forum :slight_smile: I have a little quick question for you, when I am in guided mode, Does TECS controller use the TERRAIN altitude data(if is avaible)? Well, when I command a new altitude in guided mode, the plane use the terrain altitude data?

Thanks.

TECS itself doesn’t use terrain, but the requested altitude being sent to TECS controller will include terrain offsets if you have TERRAIN_FOLLOW=1 in guided mode.
I suggest you do some experimentation in SITL for a nice safe way to learn how to control terrain following.