.bin logs: GPS raw data and EKF3 outputs

Hi,
I have a few questions about the .bin files displayed in the UAV Log Viewer:

  1. Are the values shown in GPA [0] and GPS [0] the raw data from the GPS signal (i.e. before any filtering or processing)?

  2. From the .bin file, is it possible to check/read the frequency at which the GPS updates its position?

  3. From the .bin file, is it possible to see the coordinates that come out of the EKF3 filter and are sent to Sonar View?

Thanks in advance for any advice!

Hi @MatteoBucci,

As far as I can tell (from the relevant log writing code and a corresponding search) the only processing is to convert to the units specified in the message definition, and clamp to the bounds of the data type.

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.

2 Likes

Hi @EliotBR

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.

Setup:

  • External GNSS: Leica GS18, RTK FIX, NMEA (GGA/RMC/GSA) @ 20 Hz, 115200 baud

  • Parameters:

    • EK3_SRC1_POSZ = GPS

    • EK3_SRC1_YAW = COMPASS

From the logs (see attached plots), I observe that:

  • AHR2.Alt closely follows BARO[0].Alt

  • GPS[0].Alt is stable around ~146 m

  • XKF3.IPD remains close to zero

At the same time, looking at the MAVLink stream:

  • GLOBAL_POSITION_INT.alt sent to SonarView is ~146 m, consistent with the GPS altitude

  • LOCAL_POSITION_NED.z represents the local EKF vertical state

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.

Thanks for confirming.

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

Hi @MatteoBucci -
Please share an autopilot .BIN log so we can investigate!

Hi @tony-white
here you can find the BIN files and the bluOS .log

system_logs (4).zip (1.9 MB)

Thanks in advance

00000050.BIN (9.1 MB)

1 Like