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

Vectornav INS Driver.

No detailed description...

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="ins_vectornav">
2  <configure name="VN_PORT" value="uart3" />
3  <configure name="VN_BAUD" value="B921600" />
4 </module>

Module configuration options

Configure Options

  • name: VN_PORT value: uart3
    Description: UART to use
  • name: VN_BAUD value: B921600
    Description: UART baudrate

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.

Event Functions

These event functions are called in each cycle of the module event loop.

Periodic Functions

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

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw ins_vectornav.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="ins_vectornav" dir="ins">
<doc>
<description>
Vectornav INS Driver.
</description>
<configure name="VN_PORT" value="uart3" description="UART to use"/>
<configure name="VN_BAUD" value="B921600" description="UART baudrate"/>
</doc>
<autoload name="gps"/>
<autoload name="ins_sim"/>
<autoload name="ins_nps"/>
<header>
<file name="ins.h" dir="subsystems"/>
</header>
<init fun="ins_vectornav_init()"/>
<periodic fun="ins_vectornav_monitor()" freq="1.0" autorun="TRUE"/>
<event fun="ins_vectornav_event()"/>
<makefile target="ap">
<configure name="VN_PORT" default="uart3" case="upper|lower"/>
<configure name="VN_BAUD" default="B921600"/>
<define name="USE_$(VN_PORT_UPPER)"/>
<define name="VN_PORT" value="$(VN_PORT_LOWER)"/>
<define name="$(VN_PORT_UPPER)_BAUD" value="$(VN_BAUD)"/>
<define name="GPS_NB_CHANNELS" value="1" description="define a single GPS channel to show pacc on GCS GPS page"/>
<file name="vn200_serial.c" dir="peripherals"/>
<file name="ins.c" dir="subsystems"/>
<file name="ins_vectornav.c" dir="subsystems/ins"/>
<file name="ins_vectornav_wrapper.c" dir="subsystems/ins"/>
<define name="INS_TYPE_H" value="subsystems/ins/ins_vectornav_wrapper.h" type="string"/>
<file name="gps.c" dir="subsystems"/>
<define name="USE_GPS"/>
<raw>
ifdef SECONDARY_GPS
ifneq (,$(findstring $(SECONDARY_GPS), vectornav))
# this is the secondary GPS
ap.CFLAGS += -DGPS_SECONDARY_TYPE_H=\"subsystems/ins/ins_vectornav_wrapper.h\"
ap.CFLAGS += -DSECONDARY_GPS=GPS_VECTORNAV
else
ap.CFLAGS += -DGPS_TYPE_H=\"subsystems/ins/ins_vectornav_wrapper.h\"
ap.CFLAGS += -DPRIMARY_GPS=GPS_VECTORNAV
endif
else
# plain old single GPS usage
ap.CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_ubx.h\"
endif
</raw>
</makefile>
<!-- TODO: make this dynamically loadable - will hopefully work better
once nps and HITL are separate targets -->
<!--makefile target="hitl">
<file name="nps_ins_vectornav.c" dir="nps"/>
</makefile-->
</module>