Paparazzi UAS  v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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!

1 <module name="imu_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.

  • 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">
<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>
<autoload name="imu_common"/>
<autoload name="imu_nps"/>
<header>
<file name="imu_vectornav.h" dir="modules/imu"/>
</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" dir="modules/imu"/>
<define name="IMU_TYPE_H" value="modules/imu/imu_vectornav.h" type="string"/>
</makefile>
</module>