Skip to content
raemin edited this page Feb 16, 2018 · 12 revisions

Two GPS protocols are supported. NMEA text and UBLOX binary. NMEA is less (memory) efficient and requires higher baud-rates.

Installation

  1. Enable the GPS accessory from the hardware tab and reboot Flight Controller
    enable GPS hardware
  2. Connect GPS to one UART/flexi port of the flight controllet. For navigation purposes, only the GPS Tx port should be conected to the Rx port of the flight controller. If you plan on modifying GPS firmware or settings, you should also connect GPS-Rx to the Tx port of the Flight Controller (see wiring diagram). This is also necessary if you want to use the u-blox auto-configure option (recommended).
  3. Set-up GPS from the Module Tab (as an initial setup use u-blox and auto-configure, see GPS Configuration for more details)
  4. Save and Reboot
  5. Look at the health gadget, if the GPS is Red/Grey, then the flight controller cannot connect to the GPS. If it is "just" red, that's good news: it is receiving data, but no position fix, which is normal if your inside a building.
    GPS HealthGadget

Wiring diagram

FlightController GPS
TX RX
RX TX
GND GND
5v/3.3v 5v/3.3v

Be cautious about the voltage. Using 5v to power 3.3v GPS could cause damage. Do not try to feed GPS with the 3.3v output of the flight controller: most controller are only designed to feed a satellite, some GPS can max out the voltage converter of the flight controller.

GPS Configuration

Set the gps protocol appropriately: MNEA (text based) or UBLOX (binary data)

Refer to the seller of the GPS for supported Serial baudrate. Note that GPS packet loss has been observed at 115200, try using 57600 if you experience this (and even 38400 for Beitian GPS). If it all fails just use the GPS "default" baudrate (usually 9600)

When using UBLOX it is a good idea to use GPS auto configure u-blox so your FC gets the GPS messages it needs (no need to setup the GPS in u-center). As a bonus dRonin will scan the UART at all baudrates in order to access the GPS and will then configure the GPS so as to work at the speed you've specified in the drop-down list.

If you are not using GPS auto configuration then ensure your GPS receiver sends out the correct messages at the right frequency. See below for manual UBlox settings.

Constellations: GPS is the US based network of satellites, GLONASS is the Russian competitor. If you select both, depending on your GPS hardware it will either use both simultaneously or pick-up the best one. If you want to use other networks such as Gallileo or Beidu see below for manual UBlox settings.

When using a UBLOX GPS the SBAS mode can be configured, the default is AUTO. If you use a regional specific setting you may achieve a faster GPS lock than using AUTO.

Meaning Region
AUTO Global
EGNOS Europe
WAAS North America
MSAS Asia
GAGAN India

The autoconfiguration is not stored in the GPS ROM. Roughly speaking, dRonin will autoconfigure the GPS on each reboot and the GPS will loose these settings after a power cycle.

UBlox GPS manual configuration

First bear in mind that not all GPS are made equals: some do store settings in non volatile memory while others do only keep settings until the battery backup is depleted (max 15days). With battery backup custom settings can be easily lost unless the GPS is powered on a regular basis. If you experience loss of settings, your only solution is to let dRonin auto-configure the GPS with the default settings (on each flight controller start-up).

All the following steps are performed automatically if the ublox-autoconfig option is selected. If you attempt to perform a custom setup you are better off letting dRonin autoconfigure the GPS and modify the default setup in a subsequent attempt. As previously mentioned, the auto-config settings are not written in the GPS ROM memory. In order to keep these settings, do not power off the GPS (i.e do not power off your flight controller), instead use the reboot button from the GCS hardware tab.

This being said, if you still want to setup the GPS manually in u-center, here is the detailed procedure:

You can connect to your GPS using an FTDI adapter (see tutorials on the net...), or use your FlightController as a pass-through:

  1. Open the hardware tab in dRonin.
  2. On the port that holds the GPS, select ComBridge instead of GPS.
  3. On the USBVCP port select ComBridge.
  4. Now a new comport will appear on your computer, this virtual port will forward all serial I/O to your u-blox GPS.
  5. Go to module tab, miscelaneous tab and select the Combridge baudrate. If the GPS was previously connected with ublox auto-config you should specify the same speed as the one used for autoconfig. If it does not work specify here the GPS default baudrate (see GPS manufacturer doc, usually 9600bps)
  6. Reboot the flight controller.
  7. Use UBox U-Center (an evaluation licence is available for download) and connect to the GPS (through the FC combridge).

in U-center, the connexion baud-rate (Receiver Menu > Baudrate SubMenu).

Select the appropriate comport (Receiver Menu > Port SubMenu)
Ucenter Comport (abstract from OPwiki).

Display the Packet Console (Press F6), so you can see what messages your receiver is sending to your computer. If no text appears on the console, check your comport/baudrate configuration both in the GCS and u-center.

Display the View/Configation-View menu (Press Ctrl+F9).

Navigate to CFG, Select Revert to default configuration, Click Send.

Revert GPS to Default (abstract from OPwiki)
At this point you might need to disconnect and reconnect at the default baudrate - probably 9600 baud (do not forget to update the Combridge baudrate in the module tab of the GCS)

Navigate to PRT (Ports)

Set Target to 1 - Uart 1 Set Protocol In to 0+1+2 Set Protocol Out to 0+1 Set Buadrate to 38400, 57600, 115200 Press Send

This will immediatly "break" communication to the GPS. So Disconnect from u-center, update the GCS Combridge baudrate, reboot flight controller, get back to u-center Change baud rate to match, then Connect.

Navigate again to PRT and inspect the packet console to make sure messages are being sent and acknowledged.

Navigate to MSG. In order to ensure the FC doesn't waste time processing unneeded messages, enable the following on UART1 alone with a rate of 1. When changing message target and rates remember to click Send after changing each message:

NAV-POSLLH (coordinates)
NAV-VELNED (velocity)
NAV-DOP (dilution of precision)
NAV-SOL

GPS Msg

Enable the following on UART1 with a rate of 1 (or 5/10 to reduce bandwidth) and load on the FC.

NAV-SVINFO (Satellite list: this is a big message, so no need to update at 10hz!)
NAV-TIMEUTC (time)
NAV-STATUS (Receiver Navigation Status: Fixtype, etc...)

As previously mentioned if you're using a 10hz GPS, updating the satellite lists at 10hz is big hit on the bandwith (above all if your baudrate is below 56k). In this case it is a good approach to update satellites, time and status 5 or 10 time less than the coordinates of the GPS.

GPS Msg SVInfo

All other message types should be disabled.

Navigate to Rate (Rates) and change the global update rate: slow (old) GPS are 1000ms (1Hz), while (current) faster GPS are 100ms (10Hz). If you use a single network exclusively (GPS or GLONASS with no SBAS) Set Measurement period to 100 ms, Set Navigation rate to 1, Click Send. Some (Chinese) GPS receiver cannot be set to use 100ms so try 200ms (5hz) - this is less precise.

This will cause the GPS receive to send the require messages out 10(100ms)/5(200ms) times a second.
GPS 10Hz Rate

Navigate to NAV5 (Navigation 5) and Set the Dynamic Model to Portable or Airbone1G and click Send. GPS Nav5

Navigate to SBAS (SBAS Settings)

Set `Subsystem` to `Enabled`.
Set `PRN Codes` to `Auto-Scan` (on the screen shot we force the SBAS to the European network instead of autoscan).
Click `Send`.

GPS Sbas

Finally save the configuration.

Click `CFG` (Configuration) in the Configuration View.
Select `Save current configuration` and click `Send`.

GPS Cfg

Ublox advanced setup

Assuming you've previously connected the u-blox GPS with the auto-configure option, just disable this option or it will override your custom settings on next connect. If the GPS module tab is not available you can de-activate auto-configure through the "system" tab. Bear in mind that the auto-configure option has also configured the GPS baudrate, so use this baud-rate for the combridge speed and also in u-center.

Gallileo & SBAS

If your devices comes with >3.01 firmware, you can assign some channels for Galileo; typically steal from some channels from a GNSS that you are unlikely to use (maybe QZSS, BeiDou in Western Europe). Save this in the default configuration. BN-880 & BN-180 can use up to 3 GNSS (plus SBAS) simultaneously.

In u-center, Click GNSS

GNSS Cfg Enable Min Max Signal
GPS X X 8 16 L1CA
SBAS X X 1 3 L1CA
Gali X X 4 8 E1
Beid X 8 16 B1
IMES[ X 0 8 L1CA
QZSS X 0 3 L1CA
GLON X X 8 14 L10F

Click SBAS, select EGNOS (for europe) in the PRNCode list

Note that recommended maximum navigation rate supported is 5 Hz for standard multi-GNSS operation (GPS + SBAS + GLONASS + QZSS) and 10 Hz for single GNSS operation. This frequency drops down to 3hz with Gallileo.

UBlox Navigation model

From the UBlox documentation:

  • Pedestrian - Applications with low acceleration and speed, e.g. how a pedestrian would move. Low acceleration assumed. MAX Altitude [m]: 9000, MAX Velocity [m/s]: 30, MAX Vertical, Velocity [m/s]: 20, Sanity check type: Altitude and Velocity, Max Position Deviation: Small. THIS IS NOT RECOMMENDED FOR FAST QUADs!
  • Portable - Applications with low acceleration, e.g. portable devices. Suitable for most situations. MAX Altitude [m]: 12000, MAX Velocity [m/s]: 310, MAX Vertical Velocity [m/s]: 50, Sanity check type: Altitude and Velocity, Max Position Deviation: Medium.
  • Airborne < 1G - Used for applications with a higher dynamic range and vertical acceleration than a passenger car. No 2D position fixes supported. MAX Altitude [m]: 50000, MAX Velocity [m/s]: 100, MAX Vertical Velocity [m/s]: 100, Sanity check type: Altitude, Max Position Deviation: Large. RECOMMENDED FOR AUTONOMOUS NAVIGATION

Additional settings

  • Some power consumption profiles are defined, given the low consumption of the GPS, it can be worth disabling these power saving features
  • AssistNow is a feature that allows faster. This feature relies on third party webservers, but some GPS do have an "Autonomous" mode, and locally store some satellite details. The data collected is only valid for a few hours as a given satellite is not likely to remain "in view" for more than 3hours.
  • If all you want is a home arrow (no autonomous navigation), you can set NAV5 to portable and accept 2D or 3D locks which is faster than 3D only. In this case select the portable navigation model as airborne xG models do discard 2D fix.

Hardware

There are many GPS receivers available on the market, people have reported success with the following receivers:

  • Genuine ublox GPS as sold by Drotek are specifically manufactured for UAV : these are usually twice as more expensive as chinese counterparts, but do come with an additional memory chip and a good battery, both of which are mandatory if you want to enable custom settings in u-center.
  • Neo M8N : these are the recommended one. Clones do not have memory chip so settings are not stored permanently (better to let dRonin auto-configure on each reboot). Bigger antenna is usually less troubles...
  • Beitian BN-180 : good enough for home arrow but limited navigation capabilities given the small antenna. No memory chip.
  • Ublox Neo-7M GPS with Compass and Pedestal Mount ( hobbyking ). This older GPS does work but fix is somewhat slower and it cannot work simultaneously on multiple satellites networks (will pickup GPS or GLONASS, whichever is better).
  • RY825AI 18Hz UART USB interface GPS Glonass BeiDou QZSS antenna module flash ( eBay ). This one does come with a compass and a baro: this can be a good solution for "acro" flight controllers (as long as your flight controller has enough free UART).

Recommendation for choosing the GPS GNSS element

Note : this documentation is derived from the Taulabs, CleanFlight, OPWiki and Inav help.

Clone this wiki locally