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

Airspeed ETS (I2C).

Driver for the EagleTree Systems Airspeed Sensor. Has only been tested with V3 of the sensor hardware.

Notes: Connect directly to TWOG/Tiny/Lisa I2C port. Multiple sensors can be chained together. Sensor may be in the proprietary mode (default) or in 3rd-party mode. In 3rd-party mode you must define AIRSPEED_ETS_3RD_PARTY_MODE. A eLogger is needed to set sensor to 3rd-party mode, which is supposed to be more reliable than the default mode.

Sensor module wire assignments:

  • Red wire: 5V
  • White wire: Ground
  • Yellow wire: SDA
  • Brown wire: SCL

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

<module name="airspeed_ets">
b'<define name="AIRSPEED_ETS_OFFSET" value="offset" />\n '
b'<define name="AIRSPEED_ETS_SCALE" value="scale" />\n '
b'<define name="AIRSPEED_ETS_START_DELAY" value="delay" />\n '
b'<define name="USE_AIRSPEED_ETS" value="TRUE|FALSE" />\n '
b'<define name="AIRSPEED_ETS_3RD_PARTY_MODE" />\n '
b'<define name="AIRSPEED_ETS_SDLOG" value="TRUE|FALSE" />\n '
b'<configure name="AIRSPEED_ETS_I2C_DEV" value="i2cX" />\n '
</module>

Module configuration options

Configure Options

  • name: AIRSPEED_ETS_I2C_DEV value: i2cX
    Description: set i2c peripheral (default: i2c0)

Define Options

  • name: AIRSPEED_ETS_OFFSET value: offset
    Description: sensor reading offset for sensor in proprietary mode (default: 0)
  • name: AIRSPEED_ETS_SCALE value: scale
    Description: sensor scale factor for sensor in proprietary mode (default: 1.8)
  • name: AIRSPEED_ETS_START_DELAY value: delay
    Description: set initial start delay in seconds
  • name: USE_AIRSPEED_ETS value: TRUE|FALSE
    Description: set airspeed in state interface
  • name: AIRSPEED_ETS_3RD_PARTY_MODE value: None
    Description: read raw value for sensor in third-party mode
  • name: AIRSPEED_ETS_SDLOG value: TRUE|FALSE
    Description: start logging to SD card

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.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw airspeed_ets.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="airspeed_ets" dir="sensors" task="sensors">
<doc>
<description>
Airspeed ETS (I2C).
Driver for the EagleTree Systems Airspeed Sensor.
Has only been tested with V3 of the sensor hardware.
Notes:
Connect directly to TWOG/Tiny/Lisa I2C port. Multiple sensors can be chained together.
Sensor may be in the proprietary mode (default) or in 3rd-party mode. In 3rd-party mode you must define AIRSPEED_ETS_3RD_PARTY_MODE.
A eLogger is needed to set sensor to 3rd-party mode, which is supposed to be more reliable than the default mode.
Sensor module wire assignments:
- Red wire: 5V
- White wire: Ground
- Yellow wire: SDA
- Brown wire: SCL
</description>
<configure name="AIRSPEED_ETS_I2C_DEV" value="i2cX" description="set i2c peripheral (default: i2c0)"/>
<define name="AIRSPEED_ETS_OFFSET" value="offset" description="sensor reading offset for sensor in proprietary mode (default: 0)"/>
<define name="AIRSPEED_ETS_SCALE" value="scale" description="sensor scale factor for sensor in proprietary mode (default: 1.8)"/>
<define name="AIRSPEED_ETS_START_DELAY" value="delay" description="set initial start delay in seconds"/>
<define name="USE_AIRSPEED_ETS" value="TRUE|FALSE" description="set airspeed in state interface"/>
<define name="AIRSPEED_ETS_3RD_PARTY_MODE" description="read raw value for sensor in third-party mode"/>
<define name="AIRSPEED_ETS_SDLOG" value="TRUE|FALSE" description="start logging to SD card"/>
</doc>
<dep>
<depends>i2c</depends>
<provides>airspeed</provides>
</dep>
<header>
<file name="airspeed_ets.h"/>
</header>
<init fun="airspeed_ets_init()"/>
<periodic fun="airspeed_ets_read_periodic()" freq="10."/>
<event fun="AirspeedEtsEvent()"/>
<makefile>
<configure name="AIRSPEED_ETS_I2C_DEV" default="i2c0" case="upper|lower"/>
<define name="USE_$(AIRSPEED_ETS_I2C_DEV_UPPER)"/>
<define name="AIRSPEED_ETS_I2C_DEV" value="$(AIRSPEED_ETS_I2C_DEV_LOWER)"/>
<file name="airspeed_ets.c"/>
<test>
<define name="USE_I2C0"/>
<define name="USE_AIRSPEED_ETS"/>
<define name="DOWNLINK_TRANSPORT" value="pprz_tp"/>
<define name="DOWNLINK_DEVICE" value="uart0"/>
<define name="USE_UART0"/>
</test>
</makefile>
</module>