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

VectorNav VN100 (SPI)

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!

<module name="ins_vn100">
b'<configure name="VN100_SPI_DEV" value="spiX" />\n '
b'<configure name="VN100_SLAVE_IDX" value="SPI_SLAVEX" />\n '
</module>

Module configuration options

Configure Options

  • name: VN100_SPI_DEV value: spiX
    Description: select spi peripherals (default spi1)
  • name: VN100_SLAVE_IDX value: SPI_SLAVEX
    Description: spi slave index

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.

  • vn100_periodic_task()
    • Frequency in Hz: 60
    • Autorun: LOCK
      Periodic function automatically starts after init and can't be stopped.
  • vn100_report_task()
    • Frequency in Hz: 4
    • 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 ins_vn100.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="ins_vn100" dir="ins" task="estimation">
<doc>
<description>VectorNav VN100 (SPI)</description>
<configure name="VN100_SPI_DEV" value="spiX" description="select spi peripherals (default spi1)"/>
<configure name="VN100_SLAVE_IDX" value="SPI_SLAVEX" description="spi slave index"/>
</doc>
<dep>
<depends>spi_master,gps</depends>
<provides>imu,mag,ins,ahrs,gps</provides>
</dep>
<header>
<file name="ins_vn100.h"/>
</header>
<init fun="vn100_init()"/>
<periodic fun="vn100_periodic_task()" freq="60"/>
<periodic fun="vn100_report_task()" freq="4"/>
<event fun="vn100_event_task()"/>
<makefile>
<configure name="VN100_SPI_DEV" default="spi1" case="upper|lower"/>
<configure name="VN100_SLAVE_IDX" default="spi_slave0" case="upper|lower"/>
<define name="USE_$(VN100_SPI_DEV_UPPER)" />
<define name="USE_$(VN100_SLAVE_IDX_UPPER)" />
<define name="VN100_SPI_DEV" value="$(VN100_SPI_DEV_LOWER)" />
<define name="VN100_SLAVE_IDX" value="$(VN100_SLAVE_IDX_UPPER)" />
<file name="ins_vn100.c"/>
<test firmware="fixedwing">
<define name="VN100_SPI_DEV" value="spi1"/>
<define name="SPI_MASTER"/>
<define name="USE_SPI1"/>
<define name="DOWNLINK_TRANSPORT" value="pprz_tp"/>
<define name="DOWNLINK_DEVICE" value="uart0"/>
<define name="USE_UART0"/>
</test>
</makefile>
</module>