I’m using PX4 1.13.3 so the message names can be a little outdated, but I suppose functionalities are the same.
I was wondering about the usage of fused global (vehicle_global_position) and raw gps positions (vehicle_gps_position), and I have two questions.
The raw gps position is fused into the global position estimate, so I’d expect that the global position has better accuracy when the gps has RTK fix. However from an actual flightlog that does not seem to be the case. The fused position accuracy is essentially the same no matter the gps fix quality.
There are parameters to set for the gps (and flight controller board) position relative to the vehicle’s COG. From that I’d guess that the fused global position is the position of the COG, is that correct? And the gps position is not compensated for anything, so that is the position of the GPS antenna?
If I understand correctly your questions:
AD.1. vehicle_gps_position is the position reported from GPS directly. Data from vehcle_global_position is obtained from estimated vehicle_local_position by EKF and converted with the given origin of the local frame.
AD2. As vehicle_global_position is the same but converted as vehicle_local_position - yes, it refers to COG. vehicle_gps_position is pointing to the GPS antenna.
I am not 100% sure, but with my current knowledge, it should be accurate.
EDIT: Your attached plot has only GPS fix and accuracies for horizontal and vertical measurement of GPS and estimation.
Your attached plot has only GPS fix and accuracies for horizontal and vertical measurement of GPS and estimation.
Maybe I misunderstand the meaning of the gps accuracies - but I expect eph and epv to decrease (so, increase accuracy) for the fused position as well, as the GPS position, that is used for the fusion, and is more accurate with RTK fix (as seen on the plot as well).
However the fused accuracy does not seem to change.
I misread plots (thought orange is accuracy from EKF). It should increase accuracy with RTK fix, but it can take some time as EKF accuracies depend on multiple sensors and variances need to “settle”.
I think several 100s seconds would be enough. Also the accuracy is constant, does not seem to converge to a lower value. So I think it might be something else.