Copter 3.6.9 sends bad configuration to uBlox m8n GPS

After upgrading from 3.5.7 to 3.6.9, my GPS only gets half as many satellites as it used to. For me, 15-18 sats is typical, but under 3.6.9, I only get 8-10. This didn’t make any sense, so I ran some experiments to figure out what was happening. The short version is that 3.6.9 is sending some configuration that is causing the GPS to receive/use fewer satellites, even if all of the GPS_* parameters are identical. Setting GPS_AUTO_CONFIG = 1 in 3.5.7 results in good (normal) GPS performance, but in 3.6.9, it causes bad performance. And if you save the 3.6.9 configuration with GPS_SAVE_CFG, then the GPS becomes permanently bad because it is changing some setting that 3.5.7 does not change so it can’t be reverted. I was able to easily repeat this on 4 different HERE2 GPS units.

Right now, I’m trying to use u-Center to figure out what setting is being changed, but unfortunately u-center is not cooperating, so it might take a while…

For the long explanation, here’s how I was able to reproduce this:

  1. Start with a brand new HERE2 GPS unit.
  2. Plug it into a Pixhawk with 3.5.7 and parameters GPS_AUTO_CONFIG = 0 and GPS_SAVE_CFG = 0. Arducopter will not detect the GPS.
  3. Set AUTO_CONFIG = 1. The GPS will be detected and will get good satellites (15+ in my case).
  4. Set SAVE_CFG = 1 to save this configuration to the GPS. Now the GPS will work correctly, even after setting AUTO_CONFIG = 0 and power-cycling.
  5. Set both parameters to 0 and update to 3.6.9. The GPS still works correctly even after power cycling because it still has the config from 3.5.7 saved.
  6. Set AUTO_CONFIG = 1. Immediately half of the satellites disappear, even though all other parameters were unchanged from 3.5.7. If you set AUTO_CONFIG = 0 and power-cycle, the GPS works again.
  7. Set AUTO_CONFIG = 1 and SAVE_CFG = 1. As before, half of the satellites go away. Now, take this GPS unit and put it on a Pixhawk with 3.5.7 with AUTO_CONFIG = 0, it still performs poorly because it is using the saved 3.6.9 configuration.
  8. Now on 3.5.7, set AUTO_CONFIG = 1. The GPS still has bad performance. 3.6.9 has set some configuration which causes poor performance that 3.5.7 does not change, so now the GPS is permanently bad.

Here are the parameters I’m using. Playing with them in 3.6.9 didn’t help.

GPS_AUTO_CONFIG  1.000000
GPS_AUTO_SWITCH  1.000000
GPS_BLEND_MASK   5.000000
GPS_BLEND_TC     10.000000
GPS_DELAY_MS     0.000000
GPS_GNSS_MODE    1.000000
GPS_HDOP_GOOD    140.000000
GPS_INJECT_TO    127.000000
GPS_MIN_DGPS     100.000000
GPS_MIN_ELEV     -100.000000
GPS_NAVFILTER    8.000000
GPS_POS1_X       0.000000
GPS_POS1_Y       0.000000
GPS_POS1_Z       0.000000
GPS_RATE_MS      200.000000
GPS_RAW_DATA     0.000000
GPS_SAVE_CFG     0.000000
GPS_SBAS_MODE    2.000000
GPS_SBP_LOGMASK  -256.000000
GPS_TYPE         2.000000

same issue. Copter 3.6.9 “killed” 2 of my BN-880.
They worked fine with factory defaults and GPS_AUTO_CONFIG set to 0.
After setting GPS_AUTO_CONFIG to 1 they are unusable
even after restoring factory defaults with u-center and setting
GPS_AUTO_CONFIG to 0.

I had the same problem since the release of Copter-3.6.8 and copter-3.6.9, (It was almost impossible to get more than 12 satellite) until yesterday. When I read this post, I went back to copter-3.5.7 and set the parameters GPS_AUTO_CONFIG and GPS_SAVE_CFG to 1, I waited until the GPS module, received the configuration of copter-3.5.7 and again the GPS started receiving enough satellites (22) wao, then I set the parameters GPS_AUTO_CONFIG = 1 and GPS_SAVE_CFG = 0 and then updated to copter-3.6.9, now I’m happy again.

The only change that can caused this is the https://github.com/ArduPilot/ardupilot/commit/dc15cbd5139f3069f2a5583e7800044b0990f381#diff-af05a15f0004301ea3fdaaf68a99db4d it actually fixes a problem that configuration was not saved in 3.5.
If your autoconfig is 1 and gnss_mode is also 1 then you set to receive GPS only.
Did you tried Autoconfig 1 with gnss_mode 67 ? (GPS+GLONASS+SBAS)

1 Like

Yeah, I’ve tried changing all of the GPS_ params to see if any combination could bring back the satellites.

The PR you linked explains why 3.5.7 could not fix the bad configuration; it wasn’t changing any settings, although it was changing something so the GPS unit could be detected (most new units weren’t detected unless auto config was 1). It also brings suspicion on my parameters, as I may have some bad setting, but I was being saved by 3.5.7’s inability to configure it. I’ll try playing with the parameters in 3.6.9 again to see if I can recover the good performance.

@Eosbandi seems to have correctly identified it, we weren’t handling the GNSS config reliably, which was causing us to not fully honor your parameters.

@Anubis you have GPS_GNSS_MODE 1 This means that the GPS is only tracking GPS satellites, and ignores other constellations. What you probably want is GPS_GNSS_MODE 67 which would give you GPS, GLONASS, and SBAS tracking. Which is generally the most predictable coverage. (Depending on where in the world you are you could swap Galileo, or Beidou in if you know you have better coverage there). Don’t enable more then 2 constellations + SBAS however, as an M8 GPS will develop timing issues.

1 Like

Yep, that was it. I definitely tried GNSS_MODE = 67, but I think I tried that on 3.5.7 after 3.6.9 already saved it to 1, so I eliminated that as a culprit, not knowing that 3.5.7 wasn’t actually changing the configuration.

Thanks @Eosbandi and @WickedShell

edit: how do I mark a post as a solution?

little check mark box near the heart/like/link/reply buttons underneath the post you want marked as solution.

Thanks for this! I definitely ran into this problem and as soon as I set GPS_GNSS_MODE 67 everything worked much better - loads of sats, better lock etc. I am confused though how it got into this bad state as I never ran 3.5.7 on this copter before.

@andyp1per If you ever loaded a config file from someone that contained GPS_GNSS_MODE 1 you would have been suffering.

Had same problem (it even caused my drone to drift and crash). I will try the solution proposed!