Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
U-blox GPS (UART)

Module XML file: gps_ublox.xml

Driver for u-blox GPS modules parsing the binary UBX protocol.

Example for airframe file

This example contains all possible configuration options, not all of them are mandatory!

1 <modules>
2  <load name="gps_ublox.xml">
3  <configure name="GPS_PORT" value="UARTx" />
4  <configure name="GPS_BAUD" value="B38400" />
5  <configure name="GPS_LED" value="2" />
6  </load>
7 </modules>

Module configuration options

Configure Options

  • name: GPS_PORT value: UARTx
    Description: UART where the GPS is connected to (UART1, UART2, etc
  • name: GPS_BAUD value: B38400
    Description: UART baud rate
  • name: GPS_LED value: 2
    Description: LED number to indicate fix or none

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw gps_ublox.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="gps_ublox">
<doc>
<description>
U-blox GPS (UART)
Driver for u-blox GPS modules parsing the binary UBX protocol.
</description>
<configure name="GPS_PORT" value="UARTx" description="UART where the GPS is connected to (UART1, UART2, etc"/>
<configure name="GPS_BAUD" value="B38400" description="UART baud rate"/>
<configure name="GPS_LED" value="2" description="LED number to indicate fix or none"/>
</doc>
<header>
<file name="gps.h" dir="subsystems"/>
</header>
<!-- uncomment these when not called explicitly from main anymore -->
<!--init fun="gps_init()"/-->
<!--periodic fun="gps_periodic_check()" freq="1." autorun="TRUE"/-->
<!--event fun="GpsEvent(on_gps_solution)"/-->
<makefile target="ap">
<file name="gps.c" dir="subsystems"/>
<file name="gps_ubx.c" dir="subsystems/gps"/>
<define name="USE_GPS"/>
<define name="GPS_USE_LATLONG"/>
<raw>
UBX_GPS_PORT_LOWER=$(shell echo $(GPS_PORT) | tr A-Z a-z)
ap.CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_ubx.h\"
ap.CFLAGS += -DUSE_$(GPS_PORT) -D$(GPS_PORT)_BAUD=$(GPS_BAUD)
ap.CFLAGS += -DUSE_GPS -DGPS_LINK=$(UBX_GPS_PORT_LOWER)
GPS_LED ?= none
ifneq ($(GPS_LED),none)
ap.CFLAGS += -DGPS_LED=$(GPS_LED)
endif
</raw>
</makefile>
<makefile target="nps">
<file name="gps.c" dir="subsystems"/>
<file name="gps_sim_nps.c" dir="subsystems/gps"/>
<define name="USE_GPS"/>
<define name="GPS_USE_LATLONG"/>
<raw>
nps.CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_sim_nps.h\"
</raw>
</makefile>
<makefile target="sim">
<file name="gps.c" dir="subsystems"/>
<file name="gps_sim.c" dir="subsystems/gps"/>
<define name="USE_GPS"/>
<define name="GPS_USE_LATLONG"/>
<raw>
sim.CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_sim.h\"
</raw>
</makefile>
</module>