The GPA message’s “Delta” field should give a sense of this, although I suppose it’s not guaranteed that the GPS unit updates its internal position every time it sends an update, or that it doesn’t update its position multiple times between updates, depending on how it’s been configured. The GPS internals are up to the GPS device’s firmware though, and potentially how many satellites it has access to.
From a look through the message definitions, the AHR2 message is likely what you want.
If you’re debugging or something then EKF3-related data seems to be reported through XKF* log messages, but then you’ll need to apply an offset from the EKF origin to turn the position estimates into global values.
Thanks for the clarification, that was very helpful.
Following up on this, I did some further inspection of the logs and the MAVLink output to better understand which EKF outputs are actually being sent to SonarView, especially for the vertical component.
Given EK3_SRC1_POSZ = GPS, I expected AHR2.Alt to follow the GPS height, but it appears that:
the barometer is still used for the EKF vertical dynamics
the GPS altitude is only used for the global position output
Is this the expected behavior?
Does EK3_SRC1_POSZ = GPS affect only the global reference, rather than the AHRS/EKF vertical state reported in AHR2?
Ideally, I would like the GPS altitude to be used for the Z estimation, since in this configuration it should be more accurate than the onboard barometer.
Hi @MatteoBucci -
Can you confirm you restarted the autopilot after setting EK3_SRC1_POSZ to GPS? I would expect the EKF to be using the GPS and not the barometer if you changed it over and restarted to apply…
Hi @tony-white ,
Yes, I can confirm that I restarted the autopilot after setting EK3_SRC1_POSZ to GPS.
I’m seeing the same behavior consistently across different test days, where the whole system was completely powered off and then restarted before each test