Yaw estimate error with RTK heading

I am having some issues with heading estimation using RTK GPSs. These errors are showing in QGC as:

  • Preflight Fail: Yaw estimate error
  • Preflight Fail: Heading estimate not stable

My setup is as follows:

  • PX4 1.14 main
  • CUAV Pixahwk V6X
  • two ARK RTK GPSs connected via CAN

The RTK heading estimation works as expected once RTK fixed mode is reached, as long as the setup is kept stationary. Any small movements cause the above Preflight Fail errors.

Some additional information to note is that these issues are not present when I replace the RTK GPSs with a single uavcan GPS (NEO 3 Pro) and disable all px4 RTK heading settings.

Flight Review: https://review.px4.io/plot_app?log=ce8f9eb6-085e-45cd-a8ef-c2a7ffa00112
Link to download log: log_0_2023-9-7-16-46-40_outdoors.ulg - Google Drive

1 Like

It looks like the GPS heading is outputting correctly. But one thing I notice is that the BMM150 mags on at least one of your ARK RTK GPS isn’t working and the other doesn’t appear to be outputting data as well.

Can you double check your mounting and handling of the units isn’t causing the mag to be damaged? The wafer level chip scale package can be easily damaged if hit with a hard material.

I think the estimator is not happy with the internal mag and there are no external mags present in this setup.

Hi Alex, thanks for the suggestions. I’ve replaced the ARK RTK GPSs with units that, as far as I can tell, have working mags. I’ve also added an external GPS (Neo 3 Pro).

The issues haven’t been resolved as the yaw estimate error persists. I’ve noticed this is because the EKF estimator’s mag_test_ratio is well above the allowable threshold. But without the RTK modules (mags disabled), preflight has no errors.

Simply put:

Why would the mag_test_ratio change so much when the RTK heading is enabled but the RTK module mags have been disabled?

  • To confuse this even further, disabling dual antenna fusion but keeping everything else the same (V6X, 2x RTK GPS, 1x uavcan GPS) - the yaw estimate errors disappear but velocity estimate errors pop up
    Log: [3]log_19_2023-10-6-13-55-20.ulg - Google Drive

I’m not sure that this is entirely a mag sensor/hardware-related issue, but would appreciate further insight.

Something is strange with the mags that are logged.

It should look something like this. With sensor_mag.00, sensor_mag.01, sensor_mag.02, etc

But your logs have sensor_mag, sensor_mag.01, sensor_mag.02 where sensor_mag and sensor_mag.01 have the same ID. But sensor_mag only has data for a very short period at the beginning.