Hi everyone, This is my first Forum/ APM Experience... I am trying to have my X8 fly with the airspeed sensor but I am having a really strange behavior.
I have the APM 2.5 directly from 3Drobotics, Came totally assembled with their Airspeed sensor. I loaded the version 2.73 of Arduplane and basicly trew the aircraft in the air after a couple of ground tests.
On the groundm what bugs me the most is the PFD moving up and down a couple of degrees (+- 5) at about 1hz This happens only when the ''use airspeed'' fonction is enabled otherwise the PFD is rock solid. (no need to mention that the plane is level and not moving. )
The Airspeed sensor is also quite erratic itself when on the ground but I thought no big deal since the sensor usually is not accurate for small pressures diferences.
Flew OK but there are a lot of strange behaviors in the air as well... First one is that It would slow the throttle down when in downwind... Usually if it would be flying with a true airspeed it should increase throtle to compensate the altitude loss of a more agressive bank turn... Seems tol me like it is in fact flying Ground speed while in Airspeed mode and the reverse is true, It would increase throtle when in downwind if the option is disabled...
It might sound quite confusing. So I would like to know if there are solution to theses problems :
1. Why is the PFD is ossiclating when ''use airspeed'' is enabled
2. Is there a way other then the ''use airspeed'' variable to know if the APM is using and thrusting the airspeed sensor.
The airspeed being erratic on the ground is normal, as the airspeed goes as square root of pressure difference. It will settle down once you above about 5m/s, and get more and more accurate as it gets faster. Do make sure you calibrate it though, by plotting airspeed and groundspeed from a flight pattern and adjusting ARSPD_RATIO.
The PFD (which we usually call the HUD in this forum) should only be affected by the airspeed if you don't have GPS lock. Once you have 3D GPS lock the APM will use the GPS velocity numbers to do centripetal correction. If you don't have GPS lock it will use the cross-product of airspeed vector with the gyros, which is why it affects attitude at very low speeds.
To know why it is lowering the throttle downwind I'd need to see a tlog (telemetry log). If flying with ALT_CTRL_ALG=0 and ARPSD_USE=1 then it should be adjusting throttle to maintain airspeed.
You might also like to try the new 2.74beta3 release with ALT_CTRL_ALG=2 to use the new TECS speed/height controller. That is a much more sophisticated airspeed controller, and will completely replace the existing controller in a future release. Have a look at the tuning guide for more information.
If you post a tlog then we can go into a more detailed analysis of the flight.
Awsome Thanks a lot for the help! Here is the Tlog file. I hope that I nailed the issue correctly and not mis-interpreted the data.
The Waypoints are really close to each others... my safety pilot was a little stressed. Next time I'll try to move them farther a little.
Thanks again for your inputs!
In the log file you sent me there are a lot of parameter changes during the flight, so it's a bit tricky to evaluate, but there are a few things I can help with.
First off, I suspect you may have loaded a config file from someone else. That is commonly done in the APM community, but it isn't always a good idea (see this page). In this case that config file must have been pretty old, because it contained some config values that we've long since discovered are a bad idea, such as setting INS_MPU6K_FILTER to 42. That should be set to zero (which gives a 10Hz filter in the current code).
I also see you enabled/disabled ARSPD_ENABLE and ARSPD_USE at various points in the flight. I'll concentrate on the first auto mission, with airspeed enabled. That is this part of the flight:
The navigation is clearly not great. That is because you have default NAVL1_PERIOD, which is a conservative value designed to prevent planes crashing when flown with defaults, not designed for good navigation. Drop that from 25 to 18 or so, or read the tuning guide.
Now let's look at your attitude tuning. You had:
that led to this:
that isn't awful given it's untuned, but there is significant roll lag, so I think your RLL2SRV_P should be larger (try 0.7) and you should add some I term (change RLL2SRV_I to 0.05 and RLL2SRV_IMAX to 1500).
Now let's look at your pitch tuning. You had:
and got this:
that is really very bad. We see times that the APM wanted to achieve a pitch of 5 degrees and the plane actually pitched at 25. The red and green lines should really line up. Is your center of gravity right? Have you trimmed the plane correctly in manual flight?
You clearly need more P and I term in this controller, but first ensure the trim and CoG are right. I think this poor pitch tuning is the key cause of your issues.
For completeness lets look at your airspeed calibration:
So once you've fixed your pitch trim/CoG problem, have a look at the tuning guides in the plane.ardupilot.com documentation. Also, I'd suggest you wipe your EEPROM and start from defaults, then tune just the things you want to tune. Read the documentation on each parameter you change, and if you don't understand the parameter then don't change it, or ask on the forum.
Good luck with your next flight!
Great! Really helpful! there is a lot of work on the table so I will get to it! Thanks again for your help. It will be easier now that I know what to look for.