This is my second topic of the year
I would like to ask something about TECS of APM:Plane.
There is something that I think is not written on the wiki.
**1)**What is this?
I searched on the wiki but I didn’t find anything :S
**2 and 3)**In auto mode is used the 2 (throttle) or 3 (airspeed)?
If I set cruise throttle to 50% but I set cruise arispeed to 10m/s that is 25% of throttle, in Auto mission, which one is used? Is used airspeed 10m/s or throttle 50%?
I’m pretty sure that (1) is TECS_SPDWEIGHT, which determines how much the plane will use pitch to control airspeed. Values closer to 0.0 will cause no pitch to correct airspeed, and values closer to 2.0 will make pitch very reactive to airspeed. The default value of 1.0 generally works quite well. Try changing the field and seeing if the TECS_SPEEDWEIGHT parameter changes to confirm.
In auto mode, the plane will use airspeed (3). The cruise throttle (2) will act as the airplane’s “starting point”, so having it somewhat close to the throttle the airplane will need to maintain the commanded airspeed will reduce throttle jumps when transitioning between modes.
Thank you for the explaination about 2 and 3.
Now it is clear for me (=
So, thank you again.
About 1. I am not sure that your explaination is right :S
Look at this:
The values are different.
Can you explain better this point?
Looks like my initial guess was wrong. It’s the airspeed calibration ratio, ARSPD_RATIO. You’d have to query one of the devs or look through the source to understand what it does. I doubt you want to change it.
Short answer: ARSPD_RATIO is the adjustment for air density (rho) and linear pressure-sensor error.
In AP_Airspeed::read() (the method that reads the airspeed sensor) the formula for airspeed measurement is seen:
airspeed = .3sqrt((raw_pressure_msmt - sensor_offset) * ARSPD_RATIO) + .7(last_speed_measurement)
Breaking it down, we see there’s a… “30% updated moving time-average filter” (That’s my words, anyone know the technical name for this type of filter?) on the calculation.
From Bernoulli’s principle we find that we expect airspeed to vary with the square-root of pressure, so that part makes sense.
So ARSPD_RATIO and sensor_offset are the “slope” and “y-intercept” parameters mapping the sensed pressure to what we believe is the actual pressure, and also accounting for the 2*rho constants in Bernouli. I think this explains why the initial value is sent near 2.
Thank you to everyone, now thanks to you I have my answer (=