User part
I am trying to understand what ARSPD_RATIO
is really doing and how to use it.
Calibration process is described here: Calibrating an Airspeed Sensor — Plane documentation
My main questions:
- Should
ARSPD_RATIO
be recalibrated if the weather conditions changed? - What does
ARSPD_RATIO
mean from physical point of view? Is this parameter related to air density? Or is this parameter just compensate pitot tube imperfections during measurements?
Developer part
Pitot tube equation
- As described in classic document: (Pitot Tube) pitot tube should use this equation:
velocity = sqrt(2*(totalPressure - staticPressure) / airDensity)
In Ardupilot, airspeed sensor pressure values converted to speed using such code:
airspeed_pressure
is in fact (totalPressure - staticPressure)
param[i].ratio
is a ARSPD_RATIO
parameter.
solving this gives us a result that:
ARSPD_RATIO = 2 / airDensity
This makes sense because ARSPD_RATIO
default value is 2
and airDensity
is in most cases close to 1
.
TAS (True air speed)
- There is a logic in
AP_Baro
class from converting EAS (airspeed sensor value) to TAS (true air speed). Function_get_EAS2TAS()
calculates scale factorEAS2TAS
.
ThisEAS2TAS
scale factor is used like this:
tasDataNew.tas = airspeed->get_airspeed(selected_airspeed) * EAS2TAS;
It’s all make sense. EAS2TAS should scale the airspeed for different air density. But I still have some questions.
Questions for developers
-
I can’t find where TAS (true airspeed) is logged. Only raw airspeed value without EAS2TAS value is logged (
ARSP.Airspeed
). Can I useARSP.Airspeed
to analyse pitot tube work? Because since there is no air density correction it should always be a slight error in it. -
There a code in
libraries\AP_Airspeed\Airspeed_Calibration.cpp
that makes me totally confused:
ardupilot/libraries/AP_Airspeed/Airspeed_Calibration.cpp at 605a9d34e3c6b906203d4f67f98c1c72345d4bd1 · ArduPilot/ardupilot · GitHub
// calculate true airspeed, assuming a airspeed ratio of 1.0
float dpress = MAX(get_differential_pressure(i), 0);
float true_airspeed = sqrtf(dpress) * AP::ahrs().get_EAS2TAS();
2.1 Why we assume that airspeed ratio is 1.0
?
2.2 Calibration code use EAS2TAS() for ratio calculation. So resulting ARSPD_RATIO should already be scaled by EAS2TAS. Isn’t it a double scale factor apply for TAS?
2.3 If there is already air density compensation in ARSPD_RATIO should we recalibrate this value when the whether changes?
Thanks