MAV_CMD_NAV_WAYPOINT doesn't make plane to fly to desired position

Hi!

I’m using MP simulation, and I’m trying to fly over a point on map by sending MAV_CMD_NAV_WAYPOINT command with coordinates (over ftdi).

But it never happens. Plane never flies over the point but turns just very much before it, and starts to fly circles.

How can I fly over the desired point? It’s really strange to loiter around the point in such way, because I need to be above the point first, and probably after crossing the point it would be logical to start loiter, but not before that.

Thanks!

What is your WAYPOINT_RADIUS set to? The navigation system considers a waypoint achieved as soon as it is within WAYPOINT_RADIUS of the waypoint position.

WP_RADIUS set to 2m. It doesn’t help as plane starts to turn at about 70m prior way point. It means I never can fly to actual way point.

Does it make sense to change flight behavior as I described? To start loiter after bypassing a way point. Not before.

This is how guided mode works. It is actually sets a loiter point. So if the target is within loiter radius it start loitering.
To achieve what you want, you need a two part mission, one to navigate to the waypoint and a second one to loiter when it reached (otherwise plane will RTL at the end of mission). Then set the next WP and switch to auto.

Thank you, but I need to achieve that in guided mode only.

Then you have to do some calculations, Get the start point and the desired point, calculate the distance, get the bearing and add the loiter radius with the bearing to the target point to the distance and use that as a target point, then it will go through the target then will start loitering. The only drawback that the target point will be on the loiter path, not at the center of loitering.

That’s ruins the simplicity of Fly To Here command.
In fact it can not be called Fly To Here, as it never makes plane to fly to desired position. It’s confusing, and probably better to call somehow different.

It’s a pity that such a functionality is missing for plane.

Thanks.

Alex - did you ever find a solution for this? I am running into the same issue and haven’t found anything yet.

Hi!
I think there is no solution, unless code will be modified.