Toward the end of the video you can see the crash. The plane is trying to follow a runway beam but winds up oscillating back and forth and eventually tip stalls. The only thing that saved me from ending up on the roof of the barn was accidentally flipping on the autopilot for 1/4 of a second as I was in a panic flipping every switch.
My beamfollow is what I suspect caused the crash. It works like this:
1) The "beam" is created and basically defines a path to follow. It is assigned a bearing.
2) I get the distance from the aircraft to the beam. 30m out the bearing command is perpendicular to the beam. As the aircraft gets nearer and nearer, the bearing command converges to the actual beam bearing
3) The aircraft follows the beam bearing by feeding the bearing error into the bank command (The aircraft simply banks toward the bearing)
If the aircraft is going decently fast, there aren't any issues. But something oscillates when I go slow, and especially when I just hover in the wind making no progress as in this video.
So the two bugs are:
1) Beamfollow oscillations induced by low airspeed
2) Altitude was lost making all the turns, making recovery impossible.
3) Probably flying 30 feet above the treetops in gusty winds made for all sorts of funky air currents.
I've learned 2 things from all this:
1) Don't ignore strange behavior. It WILL happen near the ground one day.
2) FAILSAFE MODES! Plane should recognize dangerously low altitudes or oscillations and enter a wings level climb and alert the user.
The damage? Stripped aileron servo gears, Cracked left aileron, busted pitot tube, chipped prop, and a few cracks on the fuse. She'll fly again in a few weeks!
Comments
@Ryan - I'm just trying to understand the various methods I'm seeing and pick which one makes the most sense for me. I think I have enough information, now I just need to play! I was simply observing that your formula doesn't do v^2 which seems like what you'd want. Could be a misunderstanding but I'll know soon.
As I am a cheap chinese cam man too, you know you can put a text file in to show the right date?
Call it TAG.txt
contents should be styled as follows
[date]
2010/10/20
14:10:00
bank angle = (turn_rate*V) / g
This of course seems weird to me, but here it is in a book.
http://books.google.com/books?id=NtHy4YZDF_0C&pg=PA185&lpg=...
The solution presented here makes the turn rate the same no matter what the airspeed, which sounds good at first. But imagine the aircraft is traversing a vector field made up of a grid of vectors. It takes the aircraft say 10 secs to go from grid vector 1 to grid vector 2, and we command a turn rate to go between the two. But lets say we go that same distance in 5 seconds. The same turn rate won't be fast enough. We need twice the turn rate. So I'd scale my desired turn rate by SOG (*2). But your formula already scales it by SOG, so we really have SOG^2.
Then there's the issue of wanting to turn at a slower rate the faster you go anyway, so you don't pull too many G's.
I asked a "Missile guy" about this (he does this for a living) and in his experience you just do the atan() and command a force, not a turn rate. He did say it "depends on what you want to optimize for" but he thought that in this case you don't want to do SOG. I can't say it's entirely clear to me yet, but I am not sure I personally have the "correct" answer for my autopilot yet.
But with that said, Ryan's solution makes me realize that I am doing it wrong in any case.