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!
<module name="mag_pitot_uart">
b'<define name="IMU_TO_MAG_PHI" value="0" />\n '
b'<define name="IMU_TO_MAG_THETA" value="0" />\n '
b'<define name="IMU_TO_MAG_PSI" value="0" />\n '
b'<configure name="MAG_PITOT_PORT" value="UART5" />\n '
b'<configure name="MAG_PITOT_BAUD" value="125000" />\n '
</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" task="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>
<dep>
<depends>uart,@imu</depends>
<provides>mag</provides>
</dep>
<header>
<file name="mag_pitot_uart.h"/>
</header>
<init fun="mag_pitot_init()"/>
<event fun="mag_pitot_event()"/>
<makefile>
<configure name="MAG_PITOT_PORT" default="UART5" case="upper|lower"/>
<configure name="MAG_PITOT_BAUD" default="250000"/>
<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)"/>
<file name="mag_pitot_uart.c"/>
<file name="pprz_transport.c" dir="pprzlink/src"/>
<test>
<define name="MAG_PITOT_PORT" value="uart0"/>
<define name="USE_UART0"/>
</test>
</makefile>
</module>