Difference between revisions of "Sensors/GPS"

From PaparazziUAV
Jump to navigation Jump to search
(Wording. Adding tipps on AssistNow feature.)
(→‎using U-Center: What should one do if the ublox module doesn't work.)
Line 187: Line 187:
===using U-Center===
===using U-Center===


''Note: Before attempting manual configuration consider using the [[Module/GPS_UBlox_UCenter|u-blox UCenter module]] instead. If automatic configuration does not work with more recent modules you should report it to the mailing list and may attempt the manual procedure below. But be aware that a wrong configuration can cause Paparazzi not acquiring any GPS lock for sometimes hard to find reasons.''   
''Note: Before attempting manual configuration consider using the [[Module/GPS_UBlox_UCenter|u-blox UCenter module]] instead. If automatic configuration does not work with more recent modules you should report it to the mailing list or the Gitter chat and may attempt the manual procedure below. But be aware that a wrong configuration can cause Paparazzi not acquiring any GPS lock for sometimes hard to find reasons.''   


[[Image:U-center_screencap.jpg|thumb|u-center configuration software]]
[[Image:U-center_screencap.jpg|thumb|u-center configuration software]]
Line 197: Line 197:
* Note 2: You will need a driver for your FTDI cable if you run u-center on Windows, which can be found  [http://www.ftdichip.com/Drivers/D2XX.htm here].
* Note 2: You will need a driver for your FTDI cable if you run u-center on Windows, which can be found  [http://www.ftdichip.com/Drivers/D2XX.htm here].


* Note 3: You can run u-center on Linux by installing "Wine" ([http://www.winehq.org/site/download-deb Installation of Wine]) and set up COM1 as /dev/ttyUSB0. You need to create a symbolic link from the COM device to TTY like this:
* Note 3: You can run u-center on Linux by installing "Wine" ([http://www.winehq.org/site/download-deb Installation of Wine]) and set up COM1 as /dev/ttyUSB0. You need to create a symbolic link from the COM device to TTY like this (assuming your serial device is /dev/ttyUSB0):
  mkdir -p ~/.wine/dosdevices
  mkdir -p ~/.wine/dosdevices
  ln -s /dev/ttyUSB0 ~/.wine/dosdevices/COM1
  ln -s /dev/ttyUSB0 ~/.wine/dosdevices/COM1

Revision as of 07:49, 3 June 2016


GPS Receivers

An overview of GPS receivers used in combination with Paparazzi. The list is by far not complete. A lot more devices will work flawlessly with Paparazzi. If you have a GPS receiver you have used with Paparazzi that is not listed here, it would be great if you could add that information to this page.

1BitSquared G0 GPS

G0 GPS

1BitSquared sells a Paparazzi UAV compatible GPS module called G0. It is designed to neatly fit on top of the Elle0 autopilot. It can also be used with any other Paparazzi UAV compatible hardware. G0 GPS module features a large ground plane with optional ground plane skirt, as well as RF shielding on the back of the module.

The large ground plane improves the directionality of the unit helping reject multi-path. When using the G0 GPS unit on a multi-copter it results in less drift when taking off the ground, and improves GPS lock when flying from waypoint to waypoint.

The EMI shielding on the back of the unit decreases the amount of noise injected from the aircraft avionics into the GPS unit, improving the noise to signal ratio. An increased signal results in a more robust satellite lock, and more reliable fully autonomous and guided flight operations.

G0 GPS module is using a U-Blox that is providing very fast speed updates that are crucial for accurate navigation within Paparazzi UAV. Additionally Paparazzi UAV supports the binary U-Blox protocol that is very efficient to parse compared to the very vaguely defined NMEA text protocol. Just enable the UCenter Module in your airframe file and Paparazzi will configure the module for best performance without the need for user interaction.

For more information go to the G0 GPS wiki page.


Swiftnav Piksi

A very special receiver is the OpenSource (almost all...) Swiftnav Piksi GPS receiver. How to use this device with Paparazzi is described on the a specific page

Swiftnav Piksi


LS20031 GPS Receiver

LS20031

Sparkfun sells the LS20031 GPS module which uses NMEA (Paparazzi support for NMEA is BETA right now.) This Locosys GPS module supports WAAS (U.S. DGPS), EGNOS (EU DGPS), and MSAS (Japanese DGPS).

More information on configuring the GPS via PMTK can be found here

Globalsat BU 353

BU-353 GPS receiver

USB US Globalsat GPS-Mouse

Typical Uses:

  • Parrot AR Drone 2.0
  • Ground Station GPS (direct support with Linux / gpsd)

Not appropriate for many airborne applications due to extra USB-serial circuitry and weight of housing and internal magnet

Basic compatibility with Windows, Mac and Linux.
More information at the GPS/BU_353 site.

uBlox

U-blox color warm 60.gif uBlox is a Swiss technology company that develops very good positioning modules. They are the recommended GPS modules for use with Paparazzi autopilots. Note that u-Blox produces the modules only. They do not sell complete boards to end users. These are sold by a multitude of vendors.

Why uBlox:

  • Low cost (i.e. NEO6-M)
  • Small size
  • Excellent performance (u-Blox 7 and 8 series)
  • Up to 10Hz update rate
  • 5V tolerant UART
  • Works out of the box with Paparazzi's u-Blox auto-configuration module

The Tiny series features an onboard LEA series GPS receiver and patch antenna, while most other boards boards require an external receiver+antenna such as the Paparazzi GPS or SAM-LS.

u-blox LEA GPS Receiver
u-Blox SAM-LS GPS receiver (w/built-in Smart Antenna)
u-Blox LEA-6H GPS receiver with Sarantel Helix Antenna

Note: The proprietary UBX protocol is used as it offers more information and efficiency than the universal NMEA protocol. For details take a look at the code in sw/airborne/subsystems/gps/gps_ubx.c.

u-Blox LEA Series Receivers

LEA-5H installed on the Tiny

The Lisa series, TWOG, Classix and AVR-based boards require an external GPS module and antenna. The Tiny features an integrated receiver and antenna. Either type is designed for u-blox 4, 5 and 6 series GPS receivers and the proprietary UBX binary protocol. An external battery or capacitor is typically used to enable the GPS to retain data while powered off for significantly faster signal re-aquisition. Any of the LEA-4, LEA-5 and LEA-6 series receivers can be used including the less expensive LEA-4A, 4S, 5A and 5S and similar low cost 6-series models as the special boot configuration code required for these models is already written as a module.

  <!-- autobaud - runtime configuration of - ROM-only modules: use ucenter-module to configure your UBlox with no cable nor windows u-center -->
  <load name="gps_ubx_ucenter.xml" />
  • 4Hz Position update rate
  • Supports active or passive antennas
  • Supports DGPS, WAAS, EGNOS, and MSAS
  • Low position noise figure


Paparazzi Stand-alone uBlox GPS Receivers

Paparazzi source provides a design for an external GPS board. An external GPS board is required for other boards like Lisa, TWOG, Elle0 and Classix. Programming it is similar to the Tiny2.11 GPS configuration. If you build your own you will want to upload the latest u-blox firmware before you configure. See Get Hardware for sources of assembled boards.

The Paparazzi design in https://github.com/paparazzi/paparazzi-hardware/tree/master/sensors/gps/gps_13. The board is very small and light as it has only the components required. It is powered from the 5v line on the "downloads" connector of a TWOG. Also note it is a 4-layer PCB that means better noise resistance. The board has pins for USB connection but requires a different cable and a solder jumper to be move from the ground (default) to 3.3v input to enable the USB port on the module.

V1 BOM.xls
Eagle Parts List Output.txt
See Get Hardware page for suppliers.

Wiring Diagram

TWOG to Standalone GPS Cable Schematic
GPS13 v0.9 Ucenter cable (ftdi)
BoozGPS (quadrotor gps V1.1 2009/5) Ucenter cable (ftdi)

uBlox to ARdrone 2

How to connect USB to uBlox Helix GPS for Parrot ARDrone2

To connect a uBlox with Helix antenna via a USB to serial cable that you can just plug into your ARdrone 2

3rd Party u-blox Reference Design Boards

LEA-5H Full Board Pinout

The only other GPS board in use seems to be u-blox reference designs or similar to it. They have LEA-4H, LEA-5H and LEA-6H (typically) and several interfaces. Often a larger antenna as well.

The board in the photo is a RF DESIGN LEA-5H-SMART.

The jumpers adjacent to the TTL interface connectors need to be closed with low value resistors for paparazzi uart port use. Also a battery has to be added with an appropriate charging resistor to enable RTC functionality.


NAVILOCK NL-507ETTL

NAVILOCK NL-507TTL

The NAVILOCK NL-507TTL u-blox TTL Modul 60416 features an LEA-4 series receiver and 25mm patch antenna on a 30mm x 30mm board.


SPK GS407

SPK GS407

This is the model Sparkfun recommends as a replacement for the old GS406. It's essentially the same, but uses the newer 6-series receiver, and is not using a ribbon cable as an interface. It uses Sarantels SL1206 active antenna. It's recommended to buy This extension cable to use with it.

u-blox NEO-6M

Hobbyking NEO 6M back

This is the cheapest GPS module with antenna for ~13€ at Hobbyking.

They come with different (sized) patch antenna, mounted on a seperate PCB. The main PCB and antenna PCB are fixed with hot glue together and can be seperated by hand.

Navilock NL-652ETTL

Nice module with u-blox 6 chip and without the annoying cable that the HK NEO-6m has. Navilock NL-652ETTL

u-Blox C04-6H Reference Design

u-blox C04-5H

u-Blox sells a complete module with antenna for around $200 and will also provide complete schematics, BOM, and PCB files for free if you wish to make your own. Two versions are offered, one with an 18mm patch antenna and the other with the Sarantel P2 helical antenna. See http://www.ublox.com/en/evaluation-tools-a-software/reference-designs/for-gps-chips/c04-6h.html for more info.

Drotek Boards

Drotek's u-Blox GPS boards work well and are not expensive.

uBlox GPS configuration

using U-Center

Note: Before attempting manual configuration consider using the u-blox UCenter module instead. If automatic configuration does not work with more recent modules you should report it to the mailing list or the Gitter chat and may attempt the manual procedure below. But be aware that a wrong configuration can cause Paparazzi not acquiring any GPS lock for sometimes hard to find reasons.

u-center configuration software

U-Center is a very comprehensive freeware program intended for the configuration and evaluation of u-blox receivers.

  • Note 2: You will need a driver for your FTDI cable if you run u-center on Windows, which can be found here.
  • Note 3: You can run u-center on Linux by installing "Wine" (Installation of Wine) and set up COM1 as /dev/ttyUSB0. You need to create a symbolic link from the COM device to TTY like this (assuming your serial device is /dev/ttyUSB0):
mkdir -p ~/.wine/dosdevices
ln -s /dev/ttyUSB0 ~/.wine/dosdevices/COM1

or what worked in Ubuntu 9.10

ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com1

This command will create the symbolic link from ttyUSB0 to COM1. See Info on Wine for "dosdevices" setup. Just download the u-setup.exe and run it with Wine, follow prompts. This has been tested with Ubuntu7.10 and Ubuntu 8.04 so far.

Depending on your connection method and your udev configuration your serial device may have a different path. Just look it up using dmesg or tail -f /var/log/syslog after plugging in.

The u-blox and Tiny UARTs both operate at 3.3V TTL levels and are 5V TTL tolerant. You must use a level shifter such as the common MAX232 to connect these devices to a standard PC serial port. The easiest and most recommended method is to connect to a USB port instead of serial with an FTDI USB-TTL converter cable available from Digikey, Mouser, or direct from FTDI. You can also use the UU0 adapter designed and manufactured by 1BitSquared. Instead of a cable it has a USB-A connector directly on the board. Other similar converters are available from pololu / sparkfun. A stand-alone GPS such as the SAM-LS will require clean 3.3V/50mA power and a common ground with the TTL converter.

  • U-blox occasionally releases firmware updates. Log on to the u-blox website using paparazzi for username & password to view or download the latest firmware images. There have 'never' been any updates released for the Antaris-4 series used in the Tiny.

Start U-center and choose your com port from the pull down list under the connect button near the top left corner of the window. Choose your baudrate from the pull down box to the right of the connect button or select the auto-baud button to the right of that. U-blox default is 9600 baud. This must be changed to 19200 or higher to accomodate the 4Hz update rate. It needs to match whatever your module is configured to (if you configured it with the U-blox U-Center or the u-blox UCenter module).
connect, baud, and autobaud buttons

Uploading the Configuration File

Download the appropriate configuration file below and use u-center to load in onto your receiver. Under the Tools menu, choose GPS configuration. Be sure the box 'Store configuration into BBR/Flash' is checked and hit the button File>>GPS. A few errors and retries are normal, but a significant number of errors may indicate a poor connection and the software will notify you if it is unable to send all the data successfully.

Automatic Configuration at Startup

You can also use the u-blox UCenter module which will take over the task of initializing the GPS for you when you power your autopilot.

Manual Configuration

If you prefer to setup your receiver manually or have a model not listed above, here are instructions to configure your receiver in u-center. Open the message window (menu View->messages view) to start the configuration process by changing the following settings:

LEA-4P

  1. Right Click on the NMEA Icon and choose disable child
  2. Choose UBX->CFG->NAV2(Navigation 2) - set it to use Airborne 4G (tells the Kalman filter to expect significant changes in direction)
  3. UBX->CFG->PRT - set USART1 to 38400bps (must match the value in your Airframe file)
  4. Change the baudrate of U-Center to 38400bps if the connection is lost at this point
  5. UBX->CFG->RXM(Receiver Manager) - change GPS Mode to 3 - Auto (Enabling faster bootup only if signal levels are very good)
  6. UBX->CFG->RATE(Rates) - change the Measurement Period to 250ms (4 Hz position updates)
  7. UBX->CFG->SBAS : Disable (SBAS appears to cause occasional severe altitude calcuation errors)
  8. UBX->NAV (not UBX->CFG->NAV): double click on POSUTM, SOL, STATUS, SVINFO, VELNED. They should change from grey to black
  9. UBX->CFG->CFG : save current config, click "send" in the lower left corner to permanently save these settings to the receiver

LEA-5H

  1. Right Click on the NMEA Text on top of the tree and choose disable child messages
  2. Choose UBX->CFG->NAV5(Navigation 5) - set it to use Airborne 8 <4G. This tells the Kalman filter to expect significant changes in direction.

    Note that this setting is only good for faster moving airplanes. For a fixed position hovering heli, 'pedestrian' setting is better

  3. UBX->CFG->PRT - set USART1 to 38400bps (must match the value in your Airframe file)
  4. Change the baudrate of U-Center to 38400bps if the connection is lost at this point
  5. UBX->CFG->RATE(Rates) - change the Measurement Period to 250ms This gives a 4 Hz position update since 4 x 250ms is one second.
  6. UBX->CFG->SBAS : Disable (SBAS appears to cause occasional severe altitude calcuation errors)
  7. UBX->NAV (not UBX->CFG->NAV): double click on POSLLH, SOL, STATUS, SVINFO, VELNED. They should change from grey to black
  8. UBX->CFG->CFG : save current config, click "send" in the lower left corner to permanently save these settings to the receiver
  • Cycle the power and verify that the new configuration was saved
  • To reset the receiver to the factory defaults go to UBX->CFG->CFG, select 'Revert to default configuration', and click Send at the bottom left corner. To permanently save these values choose 'Save current configuration' and click Send.
  • To backup the configuration to a file on your PC: under the tools menu, choose GPS configuration, then click GPS>>file. This file can be re-loaded in a similar manner to configure additional identical receivers. Be sure the box 'Store configuration into BBR/Flash' is checked when reloading a configuration file to make the changes permanent.
  • To update the firmware on a LEA-5H get u-center >= 5.03, revert the GPS receiver to the default configuration, get an appropriate image from u-Blox (fitting your receivers serial number), find the flash identification flash.txt file in the u-center install directory and be prepared to wait a long time.
  1. NOTE: If you have a Tiny with LEA-5H module you must use u-center and manually setup the parameters as shown above (at least switch to 38400 baud manually before transferring the configuration file).
  2. NOTE: POSUTM is not available on LEA-5H. Instead, use POSLLH.

LEA-6H

We use the same configuration as for version 5

  1. Right Click on the NMEA Text on top of the tree and choose disable child messages
  2. Choose UBX->CFG->NAV5(Navigation 5) - set it to use Airborne 8 <4G. This tells the Kalman filter to expect significant changes in direction.

    Note that this setting is only good for faster moving airplanes. For a fixed position hovering heli, 'pedestrian' setting is better

  3. UBX->CFG->PRT - set USART1 to 38400bps (must match the value in your Airframe file)
  4. Change the baudrate of U-Center to 38400bps if the connection is lost at this point
  5. UBX->CFG->RATE(Rates) - change the Measurement Period to 250ms This gives a 4 Hz position update since 4 x 250ms is one second.
  6. UBX->CFG->SBAS : Disable (SBAS appears to cause occasional severe altitude calcuation errors)
  7. UBX->NAV (not UBX->CFG->NAV): double click on POSLLH, SOL, STATUS, SVINFO, VELNED. They should change from grey to black
  8. UBX->CFG->CFG : save current config, click "send" in the lower left corner to permanently save these settings to the receiver.

    Make sure you activate "2 - I2C-EEPROM" if using a ROM-based NEO chipset with external EEPROM (like HK 31135)

  • Cycle the power and verify that the new configuration was saved
  • To reset the receiver to the factory defaults go to UBX->CFG->CFG, select 'Revert to default configuration', and click Send at the bottom left corner. To permanently save these values choose 'Save current configuration' and click Send.
  • To backup the configuration to a file on your PC: under the tools menu, choose GPS configuration, then click GPS>>file. This file can be re-loaded in a similar manner to configure additional identical receivers. Be sure the box 'Store configuration into BBR/Flash' is checked when reloading a configuration file to make the changes permanent.
  • To update the firmware on a LEA-6H get u-center >= 6.21, revert the GPS receiver to the default configuration, get an appropriate firmaware file from u-Blox, find the flash identification flash.txt file in the u-center install directory and be prepared to wait a long time.(seriously)

uBlox Tips

Reset to Default Settings

The GPS module can be reset to its original default settings by pulling BOOT_INT high(3.3V) during a power cycle (Antaris Manual, p. 122). It may be required after a wrong firmware upgrade or a bad configuration change.

Invalid argument

Problem: I keep getting this error with my nice shiny Tiny v2.1 with a LEA-5H: Invalid_argument ("Latlong.of_utm") Solution: Select the correct GPS subsystem.

WAAS issues

WAAS has been officially operational and "suitable for safety-of-life applications" since 2003. The default setting of all u-blox receivers ignores WAAS correction data and only uses the WAAS satellites for regular navigation like any other satellite. U-blox recommends further limiting this setting to exclude any stray EGNOS/MSAS satellites in North America, and completely disabling all SBAS functions for use outside North America. In 2006 one formerly reliable Paparazzi aircraft began having great GPS problems and displaying very erratic altitude calculations, disabling WAAS immediately resolved the issue and this phenomenon was recreated several times for verification. Turns out a new WAAS satellite was being added to the system and the others were being moved that week for better distribution. Our advice is to first test if SBAS works well in your region.

The default used by the u-blox UCenter module keeps SBAS enabled.

Assist Now

u-Blox modules that have a flash memory can keep the almanac correction data for up to 35 days into the future. That will give you a 3d GPS fix within seconds. AssitNow Offline data can be uploaded to the module while it is connected to the u-center application. To use this feature you need to provide a u-Blox account credentials that you can receive from the u-Blox registration site.

Antenna options for the Tiny and Paparazzi GPS units

See GPS/Antenna.

Tips

There is a huge amount of good information on the internet about GPS specifics that gives some good insight into GPS. This Paparazzi wiki is not intended to repeat already available information, some is added here.

EGNOS

EGNOS augments the GPS satellite navigation system and makes it suitable for safety critical UAS applications. EGNOS became operational on 1 October 2009. ESA claims that it can determine position to within 2 meters compared with about 20 meters for GPS alone. Note that the service is currently provided only in western Europe. For further information take a look on the ESA EGNOS website.

For the latest update about functionality of EGNOS please check the website: European GNSS Supervisory Authority"

DGPS (Differential GPS)

Differential GPS is any method of improving GPS accuracy by comparing the GPS-indicated position of a nearby location to the known value and transmitting any error to the mobile unit. DGPS was originally created as a means of bypassing the deliberately introduced inaccuracies in civilian GPS signals. The original method used low frequency ground radios to relay correction data to the mobile unit and is still used today at airports, shipping ports, and even individual farms. Satellite Based Augmentation System (SBAS) is a modern form of DGPS where the ground stations relay correction data to a GEO-Stationary satellite, which then relays it to the mobile unit on standard GPS frequencies eliminating the need for a separate radio reciever. SBAS is currently available in 3 regions, WAAS, EGNOS, and MSAS regions. U-blox receivers support all common varieties of DGPS read the u-blox SBAS application note.

  • It is important to note that DGPS methods only improve the accuracy of the position calculation, not the precision. Since Paparazzi navigation is typically performed relative to the power-on location, any static error that could be corrected with DGPS is irrelevant.