[GUIDED] Check whether a copter reached a waypoint or not


I’m just wondering that how could we check whether the copter reached a target-position (or not) in GUIDED mode?

  • Copter is in GUIDED mode.
  • Companion computer (Raspberry Pi) sends a SET_POSITION_TARGET_GLOBAL_INT command.

My logic is:
The companion computer periodically calculating a distance between the target-position with a current position, after which if the distance is smaller than the given constant (1 m), the computer regards the drone reached at the target-position.

My concern is that:
I’d like to make the drone close enough as much as we can.

Reducing WP_NAV_RADIUS will help but it also depends upon the accuracy of GPS

1 Like

Hi @Notorious7,

Thank you for your reply. :blush:

I could find a detail about the WPNAV_RADIUS parameter from the link below:

Hit Rad - is supposed to hold the distance (in meters) from the target point that will qualify the waypoint as complete. This command is not supported. Instead the WPNAV_RADIUS parameter should be used (see “WP Radius” field in screen shot or adjust through the Standard Parameters List). Even the WPNAV_RADIUS is only used when the waypoint has a Delay. With no delay specified the waypoint will be considered complete when the virtual point that the vehicle is chasing reaches the waypoint. This can be 10m (or more) ahead of the vehicle meaning that the vehicle will turn towards the following waypoint long before it actually reaches the current waypoint

I will look into the detail. Thanks-!


Could this message be helpful: MISSION_ITEM_REACHED

I think we could combine this and check whether the current mission is a waypoint.

Hi @bigboy061293,

Thank you for your reply. :blush:

Please correct me if I’m wrong, since we’re not sending a MISSION_ITEM (but sending a SET_POSITION_TARGET_GLOBAL_INT command) to the drone in GUIDED mode from a companion computer, I don’t think that we could listen back the MISSION_ITEM_REACHED message (from the drone when the drone reached a target-position)…?

Thanks to your advice, I could manage to find a related issue and a pull request. I’m thinking that it ended up with request closing. Hmm… :slight_smile:


By using the companion PC, we could manage that easily, as you said, examining the distance to the next waypoint, as long as flying with suitable speed and update rate of telemetry is high enough.
I have just discovered there is something we can try: