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: Gareth Roberts
Subject: Re: [Paparazzi-devel] airspeed_adc with Ardupilot airspeed sensor
Date: Mon, 02 Jul 2012 15:56:30 +0100
User-agent: Opera Mail/12.00 (Linux)

Hi Tilman,

It's the same sensor as the ardupilot classic - it's not great.
http://cache.freescale.com/files/sensors/doc/data_sheet/MPXV7002.pdf?pspll=1

The ardupilot classic code is less nasty to read usually.

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);
airspeed = sqrt((float)airpressure / AIRSPEED_RATIO) * 100;
        #endif


        airspeed_error = airspeed_cruise - airspeed;
}

#define AIRSPEED_RATIO 0.1254 // If your airspeed is under-reporting, increase this value to something like .2

Cheers,
Gareth


On Mon, 02 Jul 2012 12:39:38 +0100, Tilman Baumann <address@hidden> wrote:

I just got a Ardupilot Airspeed sensor from DIYDrones.
(Eagletree was b it too expensive)
http://code.google.com/p/ardupilot-mega/wiki/Airspeed

The way Ardupilot calculates the airspeed seems similar, but not quite the same.
https://code.google.com/searchframe#iTqA9ErfVSM/ArduPilotMega/trunk/sensors.pde

I have not fully grokked it yet how to derive AIRSPEED_QUADRATIC_SCALE and AIRSPEED_BIAS from that.
They seem to be using AIRSPEED_RATIO 0.1254 for this sensor.

But since this is such a default sensor, I was thinking chances might be good that someone has already done that?

Thanks
  Tilman

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



reply via email to

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