Position mode failed

Hi,

I received a position mode failed error on a Pixracer running 1.10. I have a GPS connected, and GPS status looks healthy (image attached).

However, EKF2 status is invalid for both local and global position. Any help would be appreciated!

Upload the log to it can be reviewed.

Hi, thanks for the quick response!

Unfortunately, there isn’t a log file. I am just doing (outdoor) benchtop testing, so no log files are saved. Is there any other way to output the debug data?

@vai-canary You can create a log by sending logger on followed by logger off in the mavlink shell.

Here I can tell you that the estimator does not accept GPS data because it does not pass the requirements (eph and epv are too high).

Fantastic – thanks for the tip about logger.

EPH and EPV are a result of the GPS standard deviation, right? Is there a threshold they should be under?

In this case, the eph and epv are 2.5 and 2.4 respectively. However, the minimum eph and epv are 3 and 5 respectively.

The current eph (2.5) < eph requirement (3_, so why is there an error?

Right, they are in fact below the threshold (I was looking at the standard values instead of the required values in the table). The speed accuracy is 0.49, so also just below the threshold of 0.5m/s (EKF2_REQ_SACC). But also keep in mind that all those metrics need to stay below all the threshold for 10s continuously to be considered as “healthy” (https://dev.px4.io/master/en/advanced/parameter_reference.html#EKF2_REQ_GPS_H).
The easiest way to see which check is failing is to decode the gps_check_fail_flags in the estimator_status message (-> listener estimator_status). The result is an integer value that needs to be converted to binary and can be decoded as follows:

GPS_CHECK_FAIL_GPS_FIX = 0		# 0 : insufficient fix type (no 3D solution)
GPS_CHECK_FAIL_MIN_SAT_COUNT = 1		# 1 : minimum required sat count fail
GPS_CHECK_FAIL_MIN_PDOP = 2		# 2 : minimum required PDOP fail
GPS_CHECK_FAIL_MAX_HORZ_ERR = 3		# 3 : maximum allowed horizontal position error fail
GPS_CHECK_FAIL_MAX_VERT_ERR = 4		# 4 : maximum allowed vertical position error fail
GPS_CHECK_FAIL_MAX_SPD_ERR = 5		# 5 : maximum allowed speed error fail
GPS_CHECK_FAIL_MAX_HORZ_DRIFT = 6		# 6 : maximum allowed horizontal position drift fail - requires stationary vehicle
GPS_CHECK_FAIL_MAX_VERT_DRIFT = 7		# 7 : maximum allowed vertical position drift fail - requires stationary vehicle
GPS_CHECK_FAIL_MAX_HORZ_SPD_ERR = 8	# 8 : maximum allowed horizontal speed fail - requires stationary vehicle
GPS_CHECK_FAIL_MAX_VERT_SPD_ERR = 9	# 9 : maximum allowed vertical velocity discrepancy fail