Guided Mode accuracy

Hi.
I need automatic movement to the exact point.
So I set the coordinates to the destination and drive in Guided mode. However, the drone arrives at a certain point 30cm away.
How does FC get the condition that it has arrived in guided mode?
For example, does the drone judge that it has arrived when the distance from its destination is less than 50cm?
I’ve set the coordinates to be very accurate, but I don’t know why I’m getting an error. Even comparing the GPS coordinates when arriving in guided mode with the destination coordinates, an error occurs. Why doesn’t the drone fly to the correct destination in guided mode?

You should read the documentation on WPNAV_RADIUS

1 Like

Ok. I will. Thank you !

I set WPNAV_RADIUS to 5cm.
Then again the test flight was conducted. The coordinates of the destination are 35.942719539, 126.68026195, and there is a monument erected by surveying in the country. However, the drone hovers at a point that shows an error of 30 to 35 cm.

When arriving at the destination in guided mode, I checked the GPS coordinates of Pixhawk and measured the coordinates as follows.

35.9427198, 126.6802563
35.942708, 126.6802562
35.9427199, 126.6802573
35.9427205, 126.6802562
35.9427196, 126.6802556
35.9427200, 126.6802560

The gimbal and laser are attached to the lower part of the drone, indicating the point where the rtk is located. From my first impressions while flying, the drone is still farther west of the monument, and in Guided mode it keeps correcting its position to get to its destination, but does not come any closer to the monument.

I definitely gave the correct coordinates, and when I checked the GPS coordinates during the flight, I didn’t arrive at my destination, so why didn’t I get closer and headed to a different point than my destination?

@serahan,

Any chance you could provide an onboard log?

The WPNAV_RADIUS actually doesn’t matter in Guided mode. In AUTO it is used to decide whether the vehicle can move onto the next point or not but in either case it doesn’t affect the accuracy of how close the vehicle will get to the target. The vehicle will always try to get as close as possible to the target location.

FYI @amilcarlucas.

thank you for your answer.
How can I provide the log?
I have a bin file.

@rmackay9

I refer to Downloading and Analyzing Data Logs in Mission Planner — Copter documentation, and I did Automatic Analysis of logs. and I get the result picture below.

Is this the result you want?
Could it be that the cause of my problem is the Compass Fail in the picture above?

My drone is using a Pixhawk4, an external compass with Compass and RTK GPS with GPS.

@serahan,

I’m afraid the auto analyser is very out of date so I would like to see the actual .bin file.

By the way, I wonder how you input the target position to Guided mode. Did you right-mouse-button-click on the map and select “Fly To Here”? … or some other method?

I’m curious to know the input method as well. I found a floating point idiosyncrasy in reading waypoint files via Lua, and I wonder if there’s a similar issue at play here.

@rmackay9 @Yuri_Rage

I can’t upload it directly because of the .bin file size problem, so I’ll find a way and post it.
I use dronekit-android open source to command coordinate movement with mobile phone app.

A marker was created at the exact points 35.942719539, 126.68026195 with the mobile phone application, and it was changed to Guide mode to move to the corresponding point.

The yellow circle is the drone position, and the green marker is the exact point (destination). As you can see, the center of the yellow circle doesn’t exactly match where the green marker points, so I suspect the floating point length is the cause of the problem.

35.942719539, 126.68026195: Destination
35.9427198, 126.6802563: Below are all drone measurements
35.942708, 126.6802562
35.9427199, 126.6802573
35.9427205, 126.6802562
35.9427196, 126.6802556
35.9427200, 126.6802560

Is there any way to increase the number of decimal places in Ardupilot latitude longitude values by any chance?

ArduPilot accepts at least 7 if not 8 significant digits for uploaded mission waypoints. I would venture a guess that the Dronekit app may be truncating or rounding when it sends the target message. You could probably confirm that by monitoring MAVLink telemetry traffic. The log file would also help, of course, if you can find a way to share it.

Thanks I found the cause.
If you enter the coordinates in the Dronekit application, the mission is entered as 35.94272, 126.680256.
I’ll have to look at the dronekit code.