Paparazzi UAS  v5.18.0_stable-1-g6993852-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ahrs_vectornav module

Vectornav VN200 over uart used as AHRS.

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="ahrs_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

Event Functions

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


Header Files

The following headers are automatically included in modules.h

Source Files

Raw ahrs_vectornav.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="ahrs_vectornav" dir="ahrs">
Vectornav VN200 over uart used as AHRS.
<configure name="VN_PORT" value="uart3" description="UART to use"/>
<configure name="VN_BAUD" value="B921600" description="UART baudrate"/>
<autoload name="ahrs_sim"/>
<file name="ahrs.h" dir="subsystems"/>
<event fun="ahrs_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)"/>
<file name="vn200_serial.c" dir="peripherals"/>
<file name="ahrs.c" dir="subsystems"/>
<file name="ahrs_vectornav.c" dir="subsystems/ahrs"/>
<file name="ahrs_vectornav_wrapper.c" dir="subsystems/ahrs"/>
<define name="USE_AHRS"/>
ifneq (,$(findstring $(SECONDARY_AHRS), vectornav))
# this is the secondary AHRS
$(TARGET).CFLAGS += -DAHRS_SECONDARY_TYPE_H=\"subsystems/ahrs/ahrs_vectornav_wrapper.h\"
# this is the primary AHRS
$(TARGET).CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_vectornav_wrapper.h\"
$(TARGET).CFLAGS += -DPRIMARY_AHRS=ahrs_vectornav
# plain old single AHRS usage
$(TARGET).CFLAGS += -DAHRS_TYPE_H=\"subsystems/ahrs/ahrs_vectornav_wrapper.h\"
<define name="PRIMARY_AHRS" value="ahrs_vectornav"/>
<define name="AHRS_TYPE_H" value="subsystems/ahrs/ahrs_vectornav_wrapper.h" type="string"/>
<define name="VN_PORT" value="uart0"/>
<define name="USE_UART0"/>