PX4-Autopilot icon indicating copy to clipboard operation
PX4-Autopilot copied to clipboard

introduce per GNSS instance configuration parameters (SENS_GNSSi_POS_{X,Y,Z})

Open dagar opened this issue 2 years ago • 9 comments

  • https://github.com/PX4/PX4-Autopilot/issues/15683

TODO:

  • [ ] GPS blending incorporate antenna offsets
  • [ ] GNSS priority parameter handling (replace SENS_GPS_PRIME)
  • [ ] review parameter naming (SENS_GNSS0_XPOS -> SENS_GNSS0_POS_X?)
  • [x] ekf2 add offsets to GPS sample ringbuffer
  • [x] enable blending by default?

@JonasPerolini

dagar avatar Mar 26 '22 00:03 dagar

Let's get this finished.

dagar avatar Jul 27 '22 17:07 dagar

I think it looks good. I still don't like the GPS blending, and I like it even less with the offsets added in, but at least this proper handling of metadata is one step closer to a better system (no blending -> direct EKF fusion of GPS data).

Why do you like the blending even less with the offsets added in?

JonasPerolini avatar Jul 27 '22 21:07 JonasPerolini

TODO: respect per GNSS configurable priorities? (if blending disabled)

dagar avatar Aug 10 '22 01:08 dagar

@dagar Should we maybe just leave the GNSS blending question for another day (not a regression anyway) and merge the rest of the PR?

bresch avatar Jun 12 '23 11:06 bresch

GPS blending is not the preferred method of using multiple GPS now that we have the ability to run multiple EKF and select based on EKF health and innovation levels. We will need to evaluate the current practice of being able to switch to another EKF that has a significantly smaller test ratio even if the current selected EKF is not failing innovation consistency tests. This will become more of a problem if one EKF has RTK GPS and the other doesn't because the non RTK GPS will have larger innovation variances and therefore could have smaller test ratios despite being more accurate.

priseborough avatar Jun 13 '23 09:06 priseborough

Hi @priseborough, I also agree that GNSS blending is not best, however I don't understand the proposed multiple EKF strategy. Why do we need to run multiple EKF in parallel and chose the best one based on a criteria? Is there a blocking point for fusing both GNSS measurements in the same EKF? With a single EKF there is no issues if one unit has RTK and the other does not. The GNSS unit with the lower variance will have a greater influence in the final estimation.

JonasPerolini avatar Jun 24 '23 01:06 JonasPerolini

Hi @priseborough, I also agree that GNSS blending is not best, however I don't understand the proposed multiple EKF strategy. Why do we need to run multiple EKF in parallel and chose the best one based on a criteria? Is there a blocking point for fusing both GNSS measurements in the same EKF? With a single EKF there is no issues if one unit has RTK and the other does not. The GNSS unit with the lower variance will have a greater influence in the final estimation.

Separation between GPS solutions can significantly exceed the reported position and height uncertainty when there is multi-path or they are using different satellites. This can cause the EKF state to jump as each measurement is fused or worse, one GPS will fail consistency checks and be rejected.

priseborough avatar Jun 27 '23 10:06 priseborough

For larger drones with two GNSS units, it's crucial to have an offset for both antennas. Even if the blending is not enabled, if the main GNSS fails, falling back to the secondary GNSS with a wrong offset will cause issues (jump in the global position, velocity loop oscillations). I can provide some help to move this PR forward. What's the current status @dagar ?

JonasPerolini avatar Nov 27 '23 10:11 JonasPerolini