Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
mag_pitot_uart module

Remotely located magnetometer and pitot tube over uart (RS232) communication

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="mag_pitot_uart">
2  <define name="IMU_TO_MAG_PHI" value="0" />
3  <define name="IMU_TO_MAG_THETA" value="0" />
4  <define name="IMU_TO_MAG_PSI" value="0" />
5  <configure name="MAG_PITOT_PORT" value="UART5" />
6  <configure name="MAG_PITOT_BAUD" value="125000" />
7 </module>

Module configuration options

Configure Options

  • name: MAG_PITOT_PORT value: UART5
    Description: select which uart it is connected to
  • name: MAG_PITOT_BAUD value: 125000
    Description: set the baudrate of the uart

Define Options

  • name: IMU_TO_MAG_PHI value: 0
    Description: rotation of magneto compared to the magneto in roll axis
  • name: IMU_TO_MAG_THETA value: 0
    Description: rotation of magneto compared to the magneto in pitch axis
  • name: IMU_TO_MAG_PSI value: 0
    Description: rotation of magneto compared to the magneto in yaw axis

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.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw mag_pitot_uart.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="mag_pitot_uart" dir="sensors">
<doc>
<description>Remotely located magnetometer and pitot tube over uart (RS232) communication</description>
<configure name="MAG_PITOT_PORT" value="UART5" description="select which uart it is connected to"/>
<configure name="MAG_PITOT_BAUD" value="125000" description="set the baudrate of the uart"/>
<define name="IMU_TO_MAG_PHI" value="0" description="rotation of magneto compared to the magneto in roll axis"/>
<define name="IMU_TO_MAG_THETA" value="0" description="rotation of magneto compared to the magneto in pitch axis"/>
<define name="IMU_TO_MAG_PSI" value="0" description="rotation of magneto compared to the magneto in yaw axis"/>
</doc>
<header>
<file name="mag_pitot_uart.h"/>
</header>
<init fun="mag_pitot_init()"/>
<event fun="mag_pitot_event()"/>
<makefile>
<!-- Configure default UART port and baudrate -->
<configure name="MAG_PITOT_PORT" default="UART5" case="upper|lower"/>
<configure name="MAG_PITOT_BAUD" default="250000"/>
<!-- Enable UART and set baudrate -->
<define name="USE_$(MAG_PITOT_PORT_UPPER)"/>
<define name="USE_$(MAG_PITOT_PORT_UPPER)_TX" value="FALSE"/>
<define name="$(MAG_PITOT_PORT_UPPER)_BAUD" value="$(MAG_PITOT_BAUD)"/>
<define name="MAG_PITOT_PORT" value="$(MAG_PITOT_PORT_LOWER)"/>
<!-- Sources and PPRZLink for transport -->
<file name="mag_pitot_uart.c"/>
<file name="pprz_transport.c" dir="pprzlink/src"/>
</makefile>
</module>