I have been using an APM 2.5 in an actual aircraft connected to my laptop running Mission Planner just for recording pitch/roll/yaw and comparing it to the "gold standard" G1000 logged data while doing a few roll and pitch step control tests. When I expect a 30 degree roll angle that is held for several seconds as seen on the G1000 data, I get the initial roll angle (sometimes a lot less though) on the recorded MP data but then it drifts back towards zero over five seconds or so. Similar results for pitch. The rates and accelerations look reasonable (hard to really tell - unless the maneuver is dramatic).
I realize that this actual aircraft environment - especially the 100+ knots - is not what has been expected or tested for Ardupilot use, but I wondered if anyone has any ideas to try to improve the APM results. I see that I should probably upgrade the firmware to 2.6.8 since the accel noise reduction has been improved. Maybe this environment is a little too extreme. It's possible that I need to move the APM closer to the CG - I am unsure just how far away it is right now - it seems to be near the quarter chord position and is centered left to right. Also, should I isolate the APM with more foam? I don't feel much vibration and I have two layers of velcro between the airframe and the APM. Any ideas would be appreciated.
Replies
I have included some quick plots of the difference between G1000 (top) and APM data - just focus on the BLUE pitch data traces. You can see that the APM data retreats from the correct value right away - the same thing happens with roll data. This is still 2.6.5 data with the gains for GPS and accel corrections down in the .2 area
@Ralph Paul and Soren,
Thanks very much for your expertise in trying to understand what I could do to make the APM pitch/roll attitude performance better! I am starting the APM with it level on the ground and disabling any further level even though I start and stop the Mission Planner logfiles before and after a 30 second test run. I have the UBLOX GPS and it is always tracking fine and I believe the magnetometer is enabled (this is an APM2.5 and I simply load the firmware (2.6.8) - no mods). I have the PARAMS (AHRS_GPS_GAIN) = .3 and AHRS_RP_P = .3. If either of you have any guidance as to setting these or other parameters, I would greatly appreciate it.
Hi,
I guess your full-size plane takes longer time to accelerate, and end at a faster speed than a model does when put into a dive.
At the start of the dive, the gyros will detect the rotation.
During the dive, the APM will see a net acceleration (wrt. gravity) that is composed of forward acceleration and upward (opposition to gravity by lift). Its mounting plane is normal to that. On other words, for quite some time it will see the same as if it were lying on a desk on the ground.The gyro integrals will be pulled towards zero.
When the plane starts to reach its terminal velocity in the dive, forward acceleration will stop and the APM should start to see an acceleration straight up again (up in global terms, not airframe-local).
So the accelerometer estimate is incorrect for some time. Try find the parameter AHRSRP_P in Advanced Parameter List and see how far you can turn it down before gyro drift gets significant... If you can put the APM in an environment with a very stable temperature - and let it warm up to operation temperature before flight - maybe you can take it even further.
With roll, it is pretty much the same situation - if you fly graceful coordinated turns and a tennis ball on the floor of the plane will barely move, then estimation by acceleration will think everything is perfectly level.
Anyway that is my guess.
Regards
Soren