paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] airspeed_adc with Ardupilot airspeed sensor


From: Tilman Baumann
Subject: Re: [Paparazzi-devel] airspeed_adc with Ardupilot airspeed sensor
Date: Tue, 03 Jul 2012 10:07:54 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120614 Thunderbird/13.0.1

On 02/07/12 16:29, Hector Garcia de Marina wrote:


On Mon, Jul 2, 2012 at 5:18 PM, Tilman Baumann <address@hidden> wrote:
On 02/07/12 15:56, Gareth Roberts wrote:
Hi Tilman,

It's the same sensor as the ardupilot classic - it's not great.
but cheap. :D



From http://code.google.com/p/ardupilot/source/browse/ArduPilot_2_8/sensors.pde

// in M/S * 100
void read_airspeed(void)
{
       #if GCS_PROTOCOL != 3
       airpressure_raw = ((float)analogRead(AIRSPEED_PIN) * .10) + (airpressure_raw * .90);
       airpressure     = (int)airpressure_raw - airpressure_offset;
       airpressure     = max(airpressure, 0);
I suppose up until here it's all filtering?

Yes,

airpressure_raw = ((float)analogRead(AIRSPEED_PIN) * .10) + (airpressure_raw * .90);

is a first order low pass filter. You must be careful here, as the coefficients are hard coded, if you change the
sample time, the cut frequency changes. You should put this coefficients as functions of the sample time.
I was actually thinking of ignoring that part. The airspeed_adc module seems to be using a average filter over a number of samples (if I read the code right).
Do you think this sensor will need the above style filter? Will another sensor work more reliably?
Which sensor was used with the airspeed_adc module successfully?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]