Saturday, April 17, 2021 at 17:13:00 UTC
Return to the Summary in Ecstatic Lyrics Blog
I took my plane to the RC field for the sort-of first tests of my flight controller. I had tested it before, but only in auto-leveling and altitude-maintaining modes. This time I tested the fully-automatic modes, and I recorded video.
In this first video, I'm still flying manually but with the auto-leveling assist feature.
At 5 seconds into this clip, the plane gets caught up in a wind gust which rolls it in such a way that I think I would have crashed it if I'd been flying manually because in the moment I was lost to understand what was happening and what I needed to do. However, in auto-leveling mode, if I just release the controls, the plane will level itself. So it was able to recover on its own, though it was flying in the opposite direction, and so the plane then flew over the parking lot, which normally I would avoid doing.
This second video covers take-off to landing, and is the first where I used fully automatic flight.
Time offsets & notes:
0:20 Manual flight: Here I use only the automatic leveling feature of the flight controller.
3:03 Programmed flight: Here the plane immediately dives to the lower programmed altitude and begins flying in a circle, which is a bit mis-shaped due to the wind.
4:32 I think I switched back to manual mode here, but I'm not sure. If this was landing mode then I don't know why it did what it did for this 9 seconds.
4:41 I switch to programmed landing mode. The plane again goes down to the programmed altitude, circles so that it's facing the correct direction, flies down the field, circles back, lines itself up with the runway, and immediately hits the ground because its altitude is too low.
At 3:03 you can see why I wasn't in too much of a hurry to switch it out of automatic altitude control in the flight a couple of weeks ago when it dove straight into the ground. In the simulator, whenever it changes altitude suddenly due to me changing flight modes, it always does a quick dive to the lower altitude, so at first I was a bit surprised since I wasn't expecting it, then I was like "oh, I know what it's doing, it'll be fine" and then it didn't turn up when it should have and hit the ground. However, in this video it actually turns up when it is supposed to. It also doesn't point straight down, since I limited the nose-down angle to 60° after that crash.
As for the failed landing, GPS altitude isn't the most accurate thing, and so my first guess was that it was just reading about 10 ft. too low. However, I note that on the laptop screen monitoring the flight that there aren't any GPS fixes for the last moments in the air, which makes me wonder if a contributing factor might have been loss of GPS signal, but I do know that a lot of packets get lost over the radio and so the plane may have had GPS data for that time.
The flight controller has a "black box" that records what data it was receiving and what decisions it made, so I'll be able to look at that later and determine if loss of GPS signal was a factor. I also plan to add an on-the-fly way to adjust altitude, as I thought it was too low throughout the landing and so I could have easily told it to fly a little higher.
Given that the attempt at automatic landing in the last flight was almost successful, I adjusted the route to fly 20 ft. higher, so that I could give it another chance.
Time offsets & notes:
0:32 - I switch into automatic landing mode.
0:38 - I lose all faith that it has any idea what it's doing, put it back into manual mode, and attempt to turn around before it hits the trees.
After quickly determining that my mother and I had no way to retrieve the plane, we decided to leave the park in order to obtain a ball with a string tied to it that I have for such occasions but which for some reason wasn't in the car. The plane was so high though that I wasn't sure I'd be able to throw the ball high enough to hit it.
On the way out of the park I saw some 20-year-olds getting ready for some football practice and figured they could probably throw a football high enough. So I asked for their assistance. They tried about 10 times, and were able to throw the ball high enough, but all of the limbs around made it difficult to actually hit the plane. So they tried other things like attempting to climb up the tree a bit to shake it more effectively than we could from the ground, and they also found a long pipe in the woods which was too heavy and not long enough to reach the plane. Eventually it occurred to me to use the pipe as a lever to rock the tree back and forth, which caused the plane to fall into a lower tree from which they were easily able to retrieve it. I gave them $20 for their help.
Unfortunately the camera battery went dead before the plane was retrieved, so there is no video of that.
I'll have to analyze the "black box" data later to get a better idea of what went wrong, but I noticed when the plane was in the tree that the GPS module had fallen off and was hanging by its wires. I didn't notice this before the plane was in the tree, so perhaps it happened during the crash, but if it happened earlier in the flight, it could have caused exactly this, as the compass is in the GPS module and so the plane would have had no idea which direction it was flying.
After the first automatic flight test, I took a screenshot of the tracking software on the laptop, and then merged it with a screenshot from the route planner.
I'm really amused to see this because, while I've seen this using the flight simulator many times, this is the first confirmation I have that what happens in the flight simulator resembles what happens in real life.
Here the white line shows where the plane actually flew, though the flight path before it began trying to follow the blue circle had already expired when I took the screenshot. So the start is where it's making those loops, which unsurprisingly don't quite follow the blue circle due to wind, then I switch it into manual mode for a moment and then when I switch it into landing mode it attempts to fly into the orange circle with 1100 in the middle of it, then down and around the 1050 circle, then curve around the 1040 circle and then it hits the grass just before it gets to the runway.
I notice that there's a rather straight line segment next to the "1040" circle. That could be the radio link losing packets, or it could be that it momentarily lost GPS. I'll have to look at the data recorded on the SD card on the plane to see if that was a factor or not, but overall I think the main culprit was that it was just flying lower than I intended.
The altitude at this field is 1000 ft., and the 1050, 1040 and 1030 circles were all 20 ft. lower. (Also the 1050 circle might have been a bit lower on the map, so it might have followed it closer than it appears to have.) So at the time it hit the ground it was trying to fly at only 10 ft, which is about as accurate as my GPS seems to be horizontally, and vertical accuracy is usually worse. So I'm not surprised it hit the ground before it got to the runway.
I think what I'll do to make it work better in the future is make it take control stick input as a suggestion to assume that the GPS data needs a slight adjustment. I knew it was too low the whole time it was going around the 1050 circle, so I could have easily commanded it to fly 10 ft. higher and it probably would have landed right on the runway.
Return to the Summary in Ecstatic Lyrics Blog