How To Optimize GPS Receiver Settings in U-Center To Get More Satellite Locks

by Oscar
Gps Satellite Number Lock Increase Betaflight 3d Fix Change Settings Ucenter Configuration

Not getting GPS satellite lock? Takes a long time to get a 3D fix? Here’s how I change configurations in my GPS modules to improve GPS performance on my FPV drones. If you are having the same issue you can give it a try.

banggood

Just to give you an idea how much improvement it gave me, I did it on one of my 5″ with BN220 GPS.

Before this mod, I used to get a 3D fix in around 2 minutes, with a maximum satellites of 14. After applying the settings described in this post, I now get a 3D fix in around 1 minute, with a maximum satellites of 23 (with VTX antenna blasting 1200mW 3cm on top of it!). I also used to get 0 satellite lock inside the house, now I get 8-10 on a good day!

Disclaimer: oscarliang.com is not responsible for any loss or damage caused by following instructions on this page, your use of the information on this page is at your own risk.

If you need help setting up GPS in Betaflight, here is a tutorial.

There are affiliate product links in this post, it doesn’t cost you extra but gives me a small commission when you buy from these links. It helps to keep the website going.

Which GPS Receiver?

You can configure the Beitian BN220 and BN880 using u-center. BN880 is larger, heavier and more expensive, but it has a built-in compass. Betaflight doesn’t require a compass, so BN220 is generally good enough.

Gps Modules Bn180 Bn220 Bn880 Size Comparison

Buy the Beitian BN220 here:

Buy the Beitian BN880 here:

If you want to configure your GPS, then the BN180 is a no-go as it doesn’t save configuration changes due to the lack of flash memory.

Download U-Center

The software used to program GPS modules is called u-center. For GPS with M8 chips (such as the BN220 and BN880), we need V22.07 (NOT the V2).

Download here: https://www.u-blox.com/en/product/u-center

FTDI Adapter

You will need an FTDI adapter to program the GPS module, it’s only a few bucks.

Buy an FTDI adapter here:

You can use your flight controller to program your GPS (more later), but you can’t change baud rate. I still recommend getting an FTDI adapter, it’s a versatile and useful tool to have around. You can also use an Arduino board loaded with custom code, but it’s more complicated than using a plug-and-play FTDI adapter. Feel free to google it I won’t go into detail here.

Gps Receiver Module Ftdi Adapter Connect Wiring Serial Tx Rx 5v Gnd Program

The cable that comes with the BN-220 is plug and play with the FTDI adapter, no soldering required. The connections are:

  • 5V to 5V
  • GND to GND
  • TX to RX
  • RX to TX

Make sure to set the jumper to 5V in the FTDI adapter.

Open Device Manager in Windows and pay attention to Ports (COM and LPT). As you connect the FTDI to your computer via USB cable, a new COM port should appear.

Windows Device Manager Com Ports Silicon Labs

Generally, you shouldn’t need to worry about driver if your computer is already working with your flight controller, which means driver is already installed. But if driver is needed, you will see a warning sign icon on that COM port.

Connecting GPS in U-Center

Open u-center, click “Receiver” and enable Autobauding.

Gps U Center Connection AutobaudingIn the same dropdown menu, click the first option “Connection“, and select your FTDI COM port. If it works, the connection icon on the top left should turn green. On the bottom, u-center will update the type of GPS chip, COM port, Baudrate and which protocol (NMEA or UBLX) it’s using at the bottom of the screen.

Gps U Center Connection Select Com PortOne way to know if the GPS is connected successfully, is to check this window if you are getting any data through. If not, wait a minute, if still nothing, try a different baud rate and check your wiring.

Gps U Center Connection Data Coming In Confirm

Backup and Restore Configurations

Make sure you backup your current GPS configurations before making any changes, if anything goes wrong you can go back.

Go to Tools, Receiver Configuration.

Gps U Center Backup Restore Configuration

To backup, select a location to save the file and click “Transfer GNSS -> File“. A new window will pop up to show progress, ignore errors “message rejected” which is normal.

To restore configuration, go to Tools, Receiver Configuration, select the configuration file that you want to restore, and hit “Transfer file -> GNSS“.

If you have multiple GPS modules, you can also save the optimized configuration and just apply it to all of your GPS without repeating the whole process.

How to Save Configuration Changes

To see all the GPS options you can change, go to “View“, and “Configuration View“.

Gps U Center View Configuration

On the left hand pane are all the GPS settings, and on the right are the option values and parameters for that setting.

Gps U Center Configuration And Settings Send Save User Interface Gui

To save changes you made permanently, involves two steps:

  1. After you change a setting, click “Send” at the bottom of the screen. However this will only save it temporally.
  2. To permanently save the changes, you have to also go to “CFG (Configuration)“, then select “Save current configuration“, and click “Send” again.

Gps U Center How To Save Setting Configuration To Nvram Permenantly

Why is this?

The initial “Send” will apply the change to the GPS, however it’s not yet written to the GPS memory (non-volatile RAM, aka NVRAM), so when you restart the GPS (power cycle), all changes will be lost and revert to the original setting. Only when you go to CFG, select save current configuration and send, will write the changes to the NVRAM. This feature allows you to test settings without bricking your GPS.

Optimal Settings

The settings we want to change are:

  • Baud Rate
  • Refresh Rate
  • Satellite Constellations
  • Power Mode

Maybe your GPS already comes with optimal settings, in which case you don’t need to change it.

GPS modules might be pre-configured for different applications by the manufacturer, therefore you might want to do a factory reset before playing with the config. It’s up to you.

Go to View -> Configuration View, select “CFG (Configuration)” on the left, select “Revert to default configuration” on the right, and press “Send” at the bottom. This will restore the factory settings to your GPS (written to NVRAM), but you can always restore the original settings that I showed you how to back up earlier.

Baud Rate

Go to “PRT (Ports)” in View -> Configuration View.

Gps U Center Prt Ports Configuration Change Baud Rate Protocol In Protocol Out Ubx Nmea Rtcm2

Select the following options:

  • Target: 1- UART 1
  • Protocol in: 0+1+2 UBX+NMEA+RTCM2
  • Protocol out: 0+1 UBX+NMEA
  • Baudrate: 57600

Then click on SEND at the bottom left of the window. Do not save it to NVRAM yet!

Since you have changed baud rate from 9600 to 57600, u-center is no longer communicating with the GPS. If you try to save this setting to NVRAM now, it won’t work (after a power cycle it will revert to the previous value 9600). You must disable “Autobauding” in the Receiver dropdown menu, and change your connection baud rate in u-center to 57600 before saving configuration to NVRAM.

Gps U Center Change Connection Baud Rate To 57600

Betaflight supports the following baudrate: 9600, 19200, 38400, 57600, 115200. A higher baudrate is required for faster refresh rate we want to increase later. Generally, setting baudrate to 57600 is enough for 5Hz refresh rate. Some even use 115200 with 10Hz refresh rate, but 5Hz and 57600 works great for me.

Refresh Rate

Increasing refresh rate will increase power consumption and use more resources in the GPS module. The default is 1Hz, but we can increase it to 5Hz for more frequent update.

Gps U Center Increase Refresh Rate From 1hz To 5hz 1000ms 200ms Measurement Period

Go to View -> Configuration View -> RATE (Rates).

Change the “Measurement Period” value from 1000ms to 200ms, it will update the “Measurement frequency” from 1Hz to 5Hz. Now save it to NVRAM.

You should also notice the blue LED on your BN220 flashes faster (5 times a second instead of once per second).

Adding Galileo Constellation

The M8 chip is capable of receiving signal from several constellations of satellites, including:

  • GPS (USA)
  • GLONASS (Russia)
  • GALILEO (Europe)
  • BEIDOU (China)

You can select up to 3 systems, and usually Galileo isn’t enabled by default, so we want to use that to increase the number of satellite we can see.

Go to View -> Configuration ->GNSS (GNSS Config), and apply these settings. This is the config that came with one of the BN220 and it works really well (much better than others that weren’t using the same settings), so I just continue to use these settings on all my GPS.

Basically just check everything under Configure, under Enable uncheck Beidou, IMES, QZSS, and check everything under Signals. set the number of channels to use to 32.

Gps U Center Gnss Configuration Add Galileo

Power Mode

The default power mode is set to “Balanced“, I prefer to set this to “Full Power“! I suppose it will use more power but it would be negligible for our drones since GPS uses very little power compared to the motors :)

Gps U Center Pms Power Management Setup Full Power Balanced Mode

Dynamic Platform Model

The different dynamic platform model settings adjusts the navigation engine for different applications. The settings improve the receiver’s interpretation of the measurements and thus provide a more accurate position output. Setting the receiver to an unsuitable platform model for the given application environment is likely to result in a loss of receiver performance and position accuracy.

Gps U Center Dynamic Platform Model

In Nav5 (Navigation 5) => Dynamic Model, select “0 – Portable”, which supposedly has better accuracy than the Betaflight default (Airborne <4g).

Saving Optimized Config

Make sure you have written the settings to the flash memory as described in here.

Then save the optimized configuration as a file by going to Tools => Receiver Configuration. Enter a file name such as “BN220-optimized.txt”. Click the option “Transfer GNSS -> File“.

Gps U Center Save Optimized Configuration

Disconnecting GPS

After you have finished setting up your GPS receiver, disconnect it by either clicking on the green connection icon on the top left, or the disconnect option in the Receiver menu before unplugging the USB cable or disconnecting the GPS from the FTDI adapter.

Gps U Center Disconnect

Betaflight GPS Settings

After configuring your GPS, you need to make some small changes in Betaflight.

  • Set protocol to UBLOX
  • Disable “Auto Baud” (in Configuration tab)
  • Set the Baudrate to 57600 (in Ports tab)
  • Enable “Use Galileo” (in Configuration tab), for older Betaflight that don’t have this option in the GUI, you can enter this in CLI: set gps_ublox_use_galileo = on

Gps Setup Betaflight Configuration Enable Feature Config Baud ProtocolNow, restart the quad by removing battery / USB cable and connecting it again.

Configurating GPS via FC

Once you’ve mounted the GPS in the drone, it’s not easy to remove it or change the wiring to use an FTDI adapter. Fortunately you can also use your flight controller to program it. You just need to connect the USB cable to the FC, no need to touch the wiring. However you won’t be able to change Baud Rate this way, but that’s fine if you have already optimized baudrate previously with an FTDI adapter.

Gps U Center Betaflight Cli Serial Passthrough

Connect USB cable to FC. If the USB cable isn’t powering the GPS, then you have to plug in a LiPo to power the drone, but make sure to REMOVE PROPELLERS FIRST! And consider using a fan to prevent the VTX from overheating

Open Betaflight Configurator, and hit the Connect button, remember the COM port for your FC. Go to the CLI tab and enter this command, gpspassthrough (uart number -1) (GPS baudrate).

For example, if your GPS is connected to UART6 with baudrate 57600:

gpspassthrough 5 57600

Close the configurator (click the cross at the top right) to free up the COM port for u-center to connect. Open u-center, connect the flight controller COM port and set baudrate to 57600.

When you disconnect the LiPo and USB cable, your FC will automatically quit serial passthrough mode.

Betaflight Auto Config Rewrites Settings

Thanks to “A” in the comment section who pointed out the fact that Betaflight actually rewrites some of our GPS config when auto config is enabled, so we should disable auto config. However you cannot simply disable it without making a “compatible” configuration.

To do this, you have to

  • Export your optimized config
  • Connect the GPS to Betaflight (so it will auto config your GPS), export the config again
  • Compare the two files and see what Betaflight changed
  • We want to keep our optimized config and leave the rest the same as the Betaflight config

Here I will explain in a bit more detail.

Now that you have updated your GPS with optimized settings, connected the GPS to the FC (with Auto Config option enabled), Betaflight should have already overwritten your GPS config. That’s exactly what we want. Go back to u-center, and export the config file, give it a name like “BF-Autoconfig.txt”.

Gps U Center Save Betaflight Auto Config ConfigurationNow open the two config files we saved (optimized.txt and BF-autoconfig.txt), and do a compare (it’s a plugin in Notepad++), you can see exactly what settings Betaflight changed from our optimized config.

Copy all the lines starting with “CFG-MSG” from BF-autoconfig.txt file (the one that has been over-written by Betaflight) and replace them in our optimized config. Do not copy/replace any other lines!

Gps U Center Compare What Betaflight Auto Config ChangeSave this config file as “optimized-final.txt”.

Now back to u-center, and load this config file “optimized-final.txt”. Don’t forget to check the option “Store configuration into BBR/Flash” (or you could also go to CFG (configuration) and click the Send button there to save changes to the flash memory), otherwise your config will be lost when you power off the GPS.

Gps U Center Load Optimized Configuration Save To Bbr Nvram Memory

Then disconnect the GPS and power off the quad.

We should now disable “Auto Config” in Betaflight GPS settings. But before we do that, make sure you disconnect the GPS from the flight controller so it doesn’t over-write our GPS again! Power cycle the flight controller.

Gps U Center Disable Auto Config Baudrate

You can now connect the GPS to the quad and check if it’s working by going to the GPS tab in Betaflight Configurator (also check the GPS icon on top).

Viola!

Gps U Center Check Betaflight Gps Tab Signal Map Fix

That’s it. Let me know if this helped you get more satellites and faster lock. If you want you can always restore your original settings if you made a back up.

Leave a Comment

By using this form, you agree with the storage and handling of your data by this website. Note that all comments are held for moderation before appearing.

21 comments

DHELEONY 28th January 2023 - 4:05 am

hola oscar saludos , tengo unGPS TBS M8.2 GLONASS ¿puedo realizar este proceso para obtener mejor rendimiento en mi GPS?
Conjunto de chips: ublox UBX-M8030
Memoria flash para guardar la configuración.
Frecuencia: L1, 1575,42 MHz; L2,1561.10MHZ ; L3,1602.00MHZ
Tasa de baudios: 4800bps-921600bps (predeterminado: 9600bps)
Canal – 72 canales
Sensibilidad – (Seguimiento: -164dBm) | (Captura: -159dBm) | (Arranque en frío – 147dBm)
Arranque en frío: promedio de 26 segundos
Inicio en caliente: promedio de 24 segundos
Arranque en caliente – Promedio de 1 segundo
Precisión – (Posición horizontal: Autónoma <2 m de promedio) | (SBAS <2,0 m de media) | (Señal de pulso de tiempo: RMS 30 ns)
Altura máxima – 50000 m
Velocidad máxima – 500 m / s
Aceleración máxima – ≦ 4G
Frecuencia de actualización: 1-10 Hz
Tamaño – 20 x 22 x 6 mm
Peso – 5,2 g
Voltaje de entrada: 3.3V-5V

Reply
David 26th January 2023 - 5:51 pm

Hi, I can not write any setup on my hglrc m80. It comunicates correctly and I can see recieved data but can not write anything. Could you help me?

Reply
Oscar 26th January 2023 - 8:07 pm

Some GPS just doesn’t work with u-center or doesn’t have memory to save settings. Too many people have reported this mod doesn’t work on the M80, so it’s probably just that. I have only tested BN220 with this mod.

Reply
Alexis 30th January 2023 - 7:48 pm

Hi, I tested these improvements with a BN 180 and a M80:
_ M80: modifications were not saved because there is button battery, therefore there is no way to save the setting in memory.
Datasheet is mentionning Galileo capacity, but as firmware calibration doesn’t enable it, no way to get Galileo sats.
_ BN 180: there is a battery so possible to save, with lot of difficulties (difficulties to get data from UART, etc.), I succeed to perform upgrades.
I have ordered a BN220 to replace the M80.
CU,

Reply
Shawn England 31st January 2023 - 3:57 am

I had limited success with my HGLRC M80 pro. the BN880 however was significantly improved by following this guide.

Reply
Fabian 24th January 2023 - 8:50 pm

Nice Article, like always.

I bought a new GPS M10 chip flywoo(red) which uses the new u-center 2 software. Settings are difficult to find, but its possible. Also it’s not possible to save actual config. My Reseach, maybe its helpful:
Device Configuration -> Advanced configuration:
– CFG-RATE (set timing, already to 0,1s)
– CFG-SIGNAL (enable systems/channels)
– CFG-UART1 (Baudrate, 115200 already seems to be default)
Change settings and click set. The “configuration changes” list will be build. If finished click send. After testing/finished klick Save on Configuration actions on the left to store in ram+BBR.

Maybe something is wrong…no guarantee :-)

Question: Are you sure its better to use glonass instead of beidou gnss? My research shows (for germany) that beidou has much more sats available independent of day-time. The m10 chip can handle 4 instead of 3 parallel. Therefore I would activate GPS+Galileo+SBAS -> and now the question Glonass OR Beidou? I think beidou would be better.

Looking forward to read your m10 review :-)

Reply
jwms 24th January 2023 - 5:50 pm

Another thing you can enable is AssistNow Autonomous.

developer.thingstream.io/guides/location-services/assistnow-user-guide
u-blox.com/en/product/assistnow

UBX-CFG-NAVX5
Under Navx5
By default, satellites are saved for a certain amount of time. This setting ups the retention time to like 6 days.

“AssistNow Autonomous provides aiding information without the need for a host or external network
connection. Based on previous broadcast satellite ephemeris data which has been downloaded to and
stored by the GNSS receiver, AssistNow Autonomous automatically generates accurate satellite
orbital data (“AssistNow Autonomous data”) that is usable for future GNSS position fixes. The
concept capitalizes on the periodic nature of GNSS satellites: their position in the sky is basically
repeated every 24 hours. By capturing strategic ephemeris data at specific times over several days,
the receiver can predict accurate satellite ephemeris for up to six days after initial reception.”

If you have a fancier GPS, the AssistNow Offline which requires some sort of storage on the device, it lets you download a dataset of satellite data which will help assist in getting satellite fixes.

Also, depending on the number of satellite constellations, you may want to adjust the polling rates.
UBX-CFG-RATES

The BN-880 is a much better GPS as it has an active antenna vs the passive antenna on the lower models. You get fixes a lot better.

Reply
JSK 25th January 2023 - 9:02 pm

I have an older ‘Beitian 220’ GPS that came with an Eachine few years ago. I did try Assistnow Autonomous, my gps positioned not ideally on quad would sometimes take almost 10 minutes to get 8+ sats… I went through the hassle of registering on u-blox for the Assistnow Offline token, uploaded a week worth of data to the flash (surprised this one has flash onboard – It seems to have room for multiple weeks worth of the offline data), now locks happen in 1 to 3 minutes. Some GPS are not genuine u-blox, some don’t have flash or battery backup… When shopping for future gps I will ensure it has flash, bat, and is genuine.

Reply
JuHu 23rd January 2023 - 5:28 pm

Where you mentioned messages rejected in relation to backing up the firmware… I noticed I got that any time the refresh rate was high and/or the baudrate was low. And when I checked the backup file there seemed to be lines missing so it seems like those errors are the computer asking for each setting line by line and not having enough time to get some of the responses. If I increased the baud rate or decreased the refresh rate it fixed it but I’d need to remember to change it if I used the backup file. Great article though. It seems like this was something many people had tried but not understood very well. Id be interested to see what settings inav and betaflight temporarily change. If anyone knows please send me a link

Reply
JuHu 23rd January 2023 - 5:40 pm

PS if you need an idea for a new article I’d love too see a how to on using the spectrum analyzer function in ucenter to check for interference from things like hd cams. I’m not certain things like the m8n or even m10s can even use this functionally but if they can this would be super helpful. If you can’t find any info on this just say so and I’ll find a link to it.

Reply
Tom 23rd January 2023 - 12:08 pm

holy shoot I am getting 13 satellites in my basement! why isn’t this the default config in Betaflight? IT SHOULD BE!

Reply
A 25th January 2023 - 9:41 am

I already posted this in Discord some days ago. I think they already take a look there:
discord.com/channels/868013470023548938/1052457584772255784/threads/1066611643779399781

Reply
Sylvain 23rd January 2023 - 8:29 am

Hmm really interesting!
Meybe a feature request could be added in Betaflight GutHub and Inav Git hub to automatically set those parameters ar boot. or at least have them available in th CLI??

Reply
Superfer 23rd January 2023 - 7:20 am

When I switch this command: Protocol out: 0 UBX, in my bn880, the blue led stops flashing… and once there, betaflight won’t recognize the gps, even with the auto setup on. I have had to chose 0 + 1… to make it flash again. Is it any particular issue of the bn880?

Reply
Oscar 23rd January 2023 - 10:50 am

don’t worry about that one, just select 0+1, shouldn’t be any performance difference.

Reply
CesiumSalami 22nd January 2023 - 3:34 pm

FYI – You can still change the baud rate using an FC – you just need connect initially using your desired baud rate via the ports tab AFAIK – just turn off auto baud to begin with as it’s not really a great system. At least that’s my process and it’s verified to work via ucenter in my case (i just run 115k/10hz). Also you need to turn off auto-config in BF otherwise it will issue configuration commands over your existing ones. Depending on the version of BF that will bring update rates back to 5hz most likely even though practically everything supports 115k and 10hz. For instance, turning on Galileo in BF will disable QZSS. Although most pilots won’t benefit from QZSS anyways unless you live in a very specific region of the word. Also you’ll need to set the protocol to UBLOX permanently.

Reply
A 22nd January 2023 - 2:27 pm

I did a video how I did it so that the config is not overwritten from. Betaflight
youtu.be/T2sxinglmwQ

Reply
M 22nd January 2023 - 6:40 am

One more point, if you select auto config in betaflight could it be that some gps internal settings are overwritten again
https://github.com/betaflight/betaflight/blob/master/src/main/io/gps.c#L623
Maybe this needs to switch off ore a exlenation would be quite cool what will be overwritten/changes from betaflight!?

Reply
Blufkip 20th January 2023 - 9:57 pm

Can I use my CP2102 tool for this?

Reply
M 22nd January 2023 - 6:34 am

Can you maybe store your settings file here, so that I can directly flash your settings for bn 220?

Reply
Levan 20th January 2023 - 9:04 pm

u-blox.com/en/ This is a resource for Datasheets if you don’t know if your GPS module is flashable or not.

Reply