Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
gps module

Generic GPS functions.

This provides generic GPS functions and multi GPS support. Still requires at least one module providing the actual GPS implementation.

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

1 <module name="gps">
2  <define name="GPS_POS_BROADCAST" value="FALSE|TRUE" />
3  <configure name="GPS_LED" value="2" />
4 </module>

Module configuration options

Configure Options

  • name: GPS_LED value: 2
    Description: LED number to indicate fix or none

Define Options

  • name: GPS_POS_BROADCAST value: FALSE|TRUE
    Description: Broadcast GPS position instead of sending it to the ground station only. This requires to use PPRZLINK version 2 and a capable modem

Module functions

Init Functions

These initialization functions are called once on startup.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw gps.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="gps" dir="gps">
<doc>
<description>
Generic GPS functions.
This provides generic GPS functions and multi GPS support.
Still requires at least one module providing the actual GPS implementation.
</description>
<configure name="GPS_LED" value="2" description="LED number to indicate fix or none"/>
<define name="GPS_POS_BROADCAST" value="FALSE|TRUE" description="Broadcast GPS position instead of sending it to the ground station only. This requires to use PPRZLINK version 2 and a capable modem"/>
</doc>
<settings>
<dl_settings>
<dl_settings name="gps">
<dl_setting MAX="2" MIN="0" STEP="1" values="AUTO|PRIMARY|SECONDARY" module="subsystems/gps" VAR="multi_gps_mode" shortname="multi_mode" param="MULTI_GPS_MODE">
<!-- uncomment this if you want strip buttons for the multi GPS modes
<strip_button name="GPS AUTO" icon="gps.png" value="0" group="gps_mode"/>
<strip_button name="GPS PRIMARY" icon="gps1.png" value="1" group="gps_mode_setting"/>
<strip_button name="GPS SECONDARY" icon="gps2.png" value="2" group="gps_mode_setting"/> -->
</dl_setting>
</dl_settings>
</dl_settings>
</settings>
<header>
<file name="gps.h" dir="subsystems"/>
</header>
<init fun="gps_init()"/>
<makefile>
<configure name="GPS_LED" default="none"/>
<file name="gps.c" dir="subsystems"/>
<define name="USE_GPS"/>
<define name="GPS_LED" value="$(GPS_LED)" cond="ifneq ($(GPS_LED),none)"/>
</makefile>
</module>