Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
imu_vectornav module

Vectornav VN-200 over uart used as IMU.

The default configuration doesn't show MAG data. Vectornav is factory calibrated

Example for airframe file

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

<module name="imu_vectornav">
b'<configure name="VN_PORT" value="uart3" />\n '
b'<configure name="VN_BAUD" value="B921600" />\n '
</module>

Module configuration options

Configure Options

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

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.

  • imu_vectornav_init()
    • Frequency in Hz: 1
    • Autorun: LOCK
      Periodic function automatically starts after init and can't be stopped.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw imu_vectornav.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="imu_vectornav" dir="imu" task="sensors">
<doc>
<description>
Vectornav VN-200 over uart used as IMU.
The default configuration doesn't show MAG data.
Vectornav is factory calibrated
</description>
<configure name="VN_PORT" value="uart3" description="UART to use"/>
<configure name="VN_BAUD" value="B921600" description="UART baudrate"/>
</doc>
<dep>
<depends>uart,imu_common</depends>
<provides>imu</provides>
</dep>
<header>
<file name="imu_vectornav.h"/>
</header>
<init fun="imu_vectornav_init()"/>
<periodic fun="imu_vectornav_init()" freq="1"/>
<event fun="imu_vectornav_event()"/>
<makefile target="!sim|nps|fbw">
<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="imu_vectornav.c"/>
</makefile>
</module>