I'm working with an APM2 after months of experience with an APM1 in an EasyStar. The new APM2 has an airspeed sensor and typically shows 8-10 mph when sitting on the bench. On its last flights, we tested Manual and got the plane trimmed and flying well. We tested Stabilize and it flew even better (!) in that mode. The last test was with RTL.
When switched into RTL, the plane turned back to Home. It was at just about the Default Altitude of 250 feet, but it started to descend. It was at about 200 feet when crossing Home and starting the RTL turn. It continued to descend through the turn to the point we had to go back to Manual and recover to safe altitude.
On the bench, whenever the APM2 goes into Auto or RTL, nav_pitch goes to -5 and the elevator servo is send into a corresponding nose-down position. The -5 degrees just happens to be the Min Pitch configuration setting. So, I know what's causing the dive, but why?
Can anyone say why the APM would command a descent when at target altitude in an Auto mode? I need to find the reason before attempting flight again. It's using version 2.28 firmware. The params file is attached. Thanks.
Some more research has focused this question. The "descent" problem is seen only when the airspeed sensor is enabled. When the Airspeed sensor is disabled, then the APM2 commands maximum nav_pitch in RTL mode on the bench. This is completely understandable since the "default altitude" is set to 250 feet.
So, the question becomes -- "Why does the APM descend in RTL when using the airspeed sensor?"
Is there anyone out there who works with the source and can explain how the APM uses airspeed when holding altitude?
Just to make sure I didn't miss something in the setup, I read through the Wiki's Airspeed Sensor setup page. (http://code.google.com/p/ardupilot-mega/wiki/Airspeed) The second sentence says--
"It is not recommended for most new users, however, as it does require additional tuning and adds one more layer of control to set up."
The page goes on to detail how to connect it to the APM and how to test for basic functionality. But there is nothing that I can find about how the airspeed sensor is tuned or what additional layer of control it adds. Would someone point me to the Airspeed sensor documentation so I can see how to tune it and how it affects operations?
These are extremely valid questions and I would also like answers to
If you have the airspeed sensor enabled, then pitch is controlled by airspeed. If the unit is not flying, there is no airspeed and in response a negative pitch command is given (to speed up).
If you have the airspeed sensor attached it is easy to test on the ground either through the CLI, or using telemetry, by simply blowing on the pitot tube and seeing the response.
Thanks for taking the time to help with this question. I agree that when the airspeed is "zero" then it would be appropriate to see down elevator to increase airspeed. The field observation (see the first post above) is that while flying in RTL mode, the airplane continued to descend well past Default Altitude. That airplane flew yesterday using GPS groundspeed data and it held altitude accurately. The question is why it descends through Default Altitude while flying in RTL using the airspeed sensor. Can you comment on that? Thanks.
I am having the same problem you explained above. When I switch to RTL the aircraft returns to "home" but it slowly looses altitude, eventually I have to take over as it gets to close to the ground. I, like you have a airspeed sensor enabled. I have not tried RTL with the airspeed sensor disabled but I will next time out. You above comments are from some time ago, did you ever get this issue rectified?
Thanks for the help.