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_datalink module

Remote GPS via datalink.

Parses the REMOTE_GPS and REMOTE_GPS_SMALL datalink messages and publishes it onboard via ABI.

Example for airframe file

Add to your firmware section:

1 <module name="gps_datalink"/>

Auto-loaded modules

The following modules are automatically loaded (just as if you had added them in the airframe file)

Module functions

Init Functions

These initialization functions are called once on startup.

Periodic Functions

These functions are called periodically at the specified frequency from the module periodic loop.

Datalink Functions

Whenever the specified datalink message is received, the corresponing handler function is called.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw gps_datalink.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="gps_datalink" dir="gps">
<doc>
<description>
Remote GPS via datalink.
Parses the REMOTE_GPS and REMOTE_GPS_SMALL datalink messages and publishes it onboard via ABI.
</description>
</doc>
<autoload name="gps"/>
<autoload name="gps_nps"/>
<autoload name="gps_sim"/>
<header>
<file name="gps.h" dir="subsystems"/>
</header>
<init fun="gps_datalink_init()"/>
<periodic fun="gps_datalink_periodic_check()" freq="1." autorun="TRUE"/>
<datalink message="REMOTE_GPS" fun="gps_datalink_parse_REMOTE_GPS()"/>
<datalink message="REMOTE_GPS_SMALL" fun="gps_datalink_parse_REMOTE_GPS_SMALL()"/>
<makefile target="ap|fbw">
<file name="gps_datalink.c" dir="subsystems/gps"/>
<raw>
ifdef SECONDARY_GPS
ifneq (,$(findstring $(SECONDARY_GPS), datalink))
# this is the secondary GPS
$(TARGET).CFLAGS += -DGPS_SECONDARY_TYPE_H=\"subsystems/gps/gps_datalink.h\"
$(TARGET).CFLAGS += -DSECONDARY_GPS=GPS_DATALINK
else
$(TARGET).CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_datalink.h\"
$(TARGET).CFLAGS += -DPRIMARY_GPS=GPS_DATALINK
endif
else
# plain old single GPS usage
$(TARGET).CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_datalink.h\"
endif
</raw>
</makefile>
<makefile target="fbw">
<define name="USE_GPS"/>
</makefile>
</module>