Paparazzi UAS  v6.2.0_stable
Paparazzi is a free software Unmanned Aircraft System.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
gps_intermcu module

Remote GPS via intermcu.

Parses the IMCU_REMOTE_GPS message and publishes it onboard via ABI.

Example for airframe file

Add to your firmware section:

<module name="gps_intermcu"/>

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.

  • on message IMCU_REMOTE_GPS call gps_intermcu_parse_IMCU_REMOTE_GPS(buf)

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw gps_intermcu.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="gps_intermcu" dir="gps" task="sensors">
<doc>
<description>
Remote GPS via intermcu.
Parses the IMCU_REMOTE_GPS message and publishes it onboard via ABI.
</description>
</doc>
<dep>
<depends>gps,@datalink</depends>
<provides>gps</provides>
</dep>
<autoload name="gps_nps"/>
<autoload name="gps_sim"/>
<header>
<file name="gps.h"/>
</header>
<init fun="gps_intermcu_init()"/>
<periodic fun="gps_intermcu_periodic_check()" freq="1." autorun="TRUE"/>
<datalink message="IMCU_REMOTE_GPS" fun="gps_intermcu_parse_IMCU_REMOTE_GPS(buf)"/>
<makefile target="ap|fbw">
<file name="gps_intermcu.c"/>
<raw>
ifdef SECONDARY_GPS
ifneq (,$(findstring $(SECONDARY_GPS), intermcu))
# this is the secondary GPS
$(TARGET).CFLAGS += -DGPS_SECONDARY_TYPE_H=\"modules/gps/gps_intermcu.h\"
$(TARGET).CFLAGS += -DSECONDARY_GPS=GPS_IMCU
else
$(TARGET).CFLAGS += -DGPS_TYPE_H=\"modules/gps/gps_intermcu.h\"
$(TARGET).CFLAGS += -DPRIMARY_GPS=GPS_IMCU
endif
else
# plain old single GPS usage
$(TARGET).CFLAGS += -DGPS_TYPE_H=\"modules/gps/gps_intermcu.h\"
endif
</raw>
<test firmware="rotorcraft">
<define name="PRIMARY_GPS" value="GPS_IMCU"/>
</test>
</makefile>
<makefile target="fbw">
<define name="USE_GPS"/>
</makefile>
</module>