I conducted a second flight test yesterday, and it was scary! I had a potential flyaway incident from which I was fortunately able to recover. Before describing what happened there was a prior incident that happened during an earlier test after switching out flight controllers from an APM to a Pixhawk 6C which might be relevant. I wanted to see if the motors would run more smoothly (with the APM they were not running in sync), and so I secured the quad to the basement floor by weighing it down with some ceramic tiles and then armed and throttled up the motors in the STABILIZE flight mode. As I gradually increased the throttle, all of a sudden, the motors ran up to full power and would not respond to my throttle commands. The quad started to lift off despite the tiles on the landing skids and I had to disarm the motors.
I posted this behavior to the Ardupilot community, and one guy said that it was because I had weighed down the aircraft; he said something about the Stabilize mode being “closed loop” and I somehow violated it by preventing the aircraft from moving. He assured me that it would be okay when I actually flew the aircraft. I didn’t buy his explanation, but I decided to go ahead with a flight test.
Now about yesterday’s flight. Prior to going out to the field, I had set a few parameters: LGR_RETRACT_ALT: 10 M and LGY_DEPLY_ALT: 8 M. And of course, I set the battery failsafe voltage to 21.5V and charged the lipo pack to 25.1V. Other parameters I had set: Geo Fence MAX Altitude 122 M (close to 400 feet), RTL_ALT 9 M.
For the test flight the following were my objectives:
Test ALT_HOLD flight mode to see if the quad would maintain altitude
Climb beyond 10 meters to see if landing gear retracts automatically
Exercise yaw, roll, pitch functions - check response to commands
Test RTL flight mode to test gps/compass functions and see if landing gear would automatically extend during landing.
Initially I had some trouble with the gimbal, which turned out to be that I had the camera mounted incorrectly. Once I got it fixed, set the camera to record, armed the motors and took off. Takeoff was smooth - no problems. Yaw and roll pitch seemed okay, so I switched to ALT_HOLD. The quad sorta held altitude, but the flight log showed a slight loss of altitude - I will need to goose the thrust percentage a tad.
Next, I climbed up and away in preparation to test RTL, but I noticed that the landing gear failed to retract automatically and I had to do it manually. I switched to RTL and the quad rose to 900 meters as programmed and began its descent for landing, The descent speed was really low - I will have to increase it a tad. But as it got really close to the ground the landing gear failed to extend, so I switched back to Stabilize in order to climb a bit and extend the landing gear manually. As I tried to throttle down to descend, it suddenly took off at full power and would not respond to my throttle commands. Fearing that it would climb out of sight, I switched flight mode back to RTL.
By this time, the aircraft had reached the geo fence ceiling. I don’t know if RTL was activated automatically or by my command - at any rate, it loitered a few seconds and began its slow descent back down. I let the autopilot maintain control while I watched. The landing gear was extended and it landed without mishap, at which point I disarmed the motors and breathed a sigh of relief.
I have zipped the folder containing the flight logs and put it in my Dropbox
https://www.dropbox.com/scl/fi/29seymjluxw84oj4xzd7p/1.zip?rlkey=6y18st6iqgou08qag3evvsbwb&st=nm9qy4hp&dl=0
I hope someone can take a look and offer some advice. In the meantime, the aircraft will remain grounded until I decide what to do.