Pressure Board Navarro.
by Matthieu Navarro (2010)
combine differential and absolute pressure sensor (ETS raw sensors) controlled by a dspic return scaled values over I2C
Example for airframe file
Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!
2 <define name="PBN_AIRSPEED_SCALE" value="(1./0.54)" />
3 <define name="PBN_ALTITUDE_SCALE" value="0.32" />
4 <define name="PBN_PRESSURE_OFFSET" value="101325.0" />
5 <define name="USE_AIRSPEED_PBN" value="TRUE|FALSE" />
Module configuration options
Define Options
- name:
PBN_AIRSPEED_SCALE
value: (1./0.54)
Description: quadratic scale factor to convert differential pressure to airspeed
- name:
PBN_ALTITUDE_SCALE
value: 0.32
Description: linear scale factor for altitude
- name:
PBN_PRESSURE_OFFSET
value: 101325.0
Description: pressure offset
- name:
USE_AIRSPEED_PBN
value: TRUE|FALSE
Description: set airspeed in state interface
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.
- pbn_periodic()
- Frequency in Hz: 10
- 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 pbn.xml file:
<!DOCTYPE module SYSTEM "module.dtd">
<module name="pbn" dir="sensors">
<doc>
<description>
Pressure Board Navarro.
by Matthieu Navarro (2010)
combine differential and absolute pressure sensor (ETS raw sensors)
controlled by a dspic
return scaled values over I2C
</description>
<define name="PBN_AIRSPEED_SCALE" value="(1./0.54)" description="quadratic scale factor to convert differential pressure to airspeed"/>
<define name="PBN_ALTITUDE_SCALE" value="0.32" description="linear scale factor for altitude"/>
<define name="PBN_PRESSURE_OFFSET" value="101325.0" description="pressure offset"/>
<define name="USE_AIRSPEED_PBN" value="TRUE|FALSE" description="set airspeed in state interface"/>
</doc>
<settings>
<dl_settings>
<dl_settings NAME="pbn">
<dl_setting MAX="30" MIN="0" STEP="1" module="sensors/pressure_board_navarro" VAR="pbn.airspeed_filter"/>
</dl_settings>
</dl_settings>
</settings>
<header>
<file name="pressure_board_navarro.h"/>
</header>
<init fun="pbn_init()"/>
<periodic fun="pbn_periodic()" freq="10"/>
<event fun="PbnEvent()"/>
<makefile>
<file name="pressure_board_navarro.c"/>
</makefile>
</module>