Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
airspeed_ets module

Airspeed ETS (I2C).

Driver for the EagleTree Systems Airspeed Sensor v3 connected via an I2C port. This device measures airspeed from 4m/s to 156m/s with about 0,5 m/s resolution

Notes:

  • Connects directly to a flightcontroller board I2C port.
  • Has I2C signal level conversion build in.
  • Multiple sensors can be chained together.
  • Sensor may be in the default or in 3rd-party mode.

Per default the sensor is in Eagltreemode, but if you have set your sensor to 3rd-party mode only then must you add the define AIRSPEED_ETS_3RD_PARTY_MODE to your airframe

This driver has only been tested with v3 of the sensor hardware, older versions might or might not work.

Sensor module wire assignments:

  • Red wire: 3V-16V
  • 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="0" />\n '
b'<define name="AIRSPEED_ETS_SCALE" value="1.76" />\n '
b'<define name="AIRSPEED_ETS_START_DELAY" value="1.5" />\n '
b'<define name="AIRSPEED_ETS_SYNC_SEND" />\n '
b'<define name="AIRSPEED_ETS_3RD_PARTY_MODE" />\n '
b'<define name="AIRSPEED_ETS_USE_FILTER" value="TRUE" />\n '
b'<define name="AIRSPEED_ETS_LOWPASS_TAU" value="0.15" />\n '
b'<define name="USE_AIRSPEED_ETS" value="TRUE|FALSE" />\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: 0
    Description: sensor reading offset for sensor in proprietary mode (default: 0)
  • name: AIRSPEED_ETS_SCALE value: 1.76
    Description: sensor scale factor for sensor in proprietary mode (default: 1.8)
  • name: AIRSPEED_ETS_START_DELAY value: 1.5
    Description: set initial start delay in seconds(float), somtimes needed if sensor initialization is not OK, default 0.2s
  • name: AIRSPEED_ETS_SYNC_SEND value: None
    Description: flag to transmit the data as it is acquired
  • name: AIRSPEED_ETS_3RD_PARTY_MODE value: None
    Description: Read raw value for sensor in third-party mode
  • name: AIRSPEED_ETS_USE_FILTER value: TRUE
    Description: Enable or disable a filter on the sensor output values
  • name: AIRSPEED_ETS_LOWPASS_TAU value: 0.15
    Description: Time constant for second order Butterworth low pass filter .15 is about 1hz
  • name: USE_AIRSPEED_ETS value: TRUE|FALSE
    Description: Set airspeed in state interface for this sensor
  • name: AIRSPEED_ETS_SDLOG value: TRUE|FALSE
    Description: start logging to SD card for Chibios only

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 v3 connected via an I2C port.
This device measures airspeed from 4m/s to 156m/s with about 0,5 m/s resolution
Notes:
+ Connects directly to a flightcontroller board I2C port.
+ Has I2C signal level conversion build in.
+ Multiple sensors can be chained together.
+ Sensor may be in the default or in 3rd-party mode.
Per default the sensor is in Eagltreemode, but if you have set your sensor to 3rd-party mode
only then must you add the define AIRSPEED_ETS_3RD_PARTY_MODE to your airframe
This driver has only been tested with v3 of the sensor hardware, older versions might or might not work.
Sensor module wire assignments:
- Red wire: 3V-16V
- 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="0" description="sensor reading offset for sensor in proprietary mode (default: 0)"/>
<define name="AIRSPEED_ETS_SCALE" value="1.76" description="sensor scale factor for sensor in proprietary mode (default: 1.8)"/>
<define name="AIRSPEED_ETS_START_DELAY" value="1.5" description="set initial start delay in seconds(float), somtimes needed if sensor initialization is not OK, default 0.2s"/>
<define name="AIRSPEED_ETS_SYNC_SEND" description="flag to transmit the data as it is acquired"/>
<define name="AIRSPEED_ETS_3RD_PARTY_MODE" description="Read raw value for sensor in third-party mode"/>
<define name="AIRSPEED_ETS_USE_FILTER" value="TRUE" description="Enable or disable a filter on the sensor output values"/>
<define name="AIRSPEED_ETS_LOWPASS_TAU" value="0.15" description="Time constant for second order Butterworth low pass filter .15 is about 1hz"/>
<define name="USE_AIRSPEED_ETS" value="TRUE|FALSE" description="Set airspeed in state interface for this sensor"/>
<define name="AIRSPEED_ETS_SDLOG" value="TRUE|FALSE" description="start logging to SD card for Chibios only"/>
</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="AIRSPEED_ETS_READ_PERIODIC_PERIOD" value="0.001"/>
<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>