> One other thing I forgot to mention is that I'm also considering > an R/C > heading-lock gyro. I'm not sure exactly how these work, however... Any > experience, anyone? Don't forget your biggest problem -- you have to account for angular momentum (a.k.a. centrifugal force) in a turning aircraft. Remember in a fixed-wing aircraft in a coordinated (important... are all turns your UAV makes coordinated with correct aileron and rudder inputs?) 60-degree bank turn, an accelerometer will register an almost perfect 2G constant "pull" directly toward the floor of the aircraft which is of course, 60 degrees off of level. If the aircraft is banked very slowly and in a coordinated fashion, "occupants" like the accelerometer will barely "feel" the entrance to the bank. This is one of the human-factors causes of the classic high-speed spiral dive when operating in IMC without a horizon reference. Thus you need another input which can sense this banking tendency. I think you're going to have to use a combination of techniques to sense "level" in an aircraft of any type. The standard solution is to use a gyroscope which is leveled on the ground prior to aircraft motion, of course. The smaller the gyro and the more internal friction in the bearings, the more it will tend to "precess" or tip and stay tipped after aggressive maneuvers. High-dollar UAV's (i.e. military) use a variety of inputs from redundant gyros (usually ring-laser type - light doesn't have friction so precession errors are nil), GPS, and other flight data sensors (airspeed, compass, standard navaids) to determine the exact attitude of the aircraft in relation to the ground and to ignore inputs from sensors which have failed or are sending data that "doesn't make sense" to the flight management computer(s). The really high-end stuff can take these inputs and calculate aircraft position and orientation even if the system reset in flight by doing "odd-man-out" anaylsis of the data. A much more practical way to keep a UAV upright in a tight budget would be to design a wing with a very high degree of dihedral -- many training RC aircraft used to have this, thus giving the aircraft a tendency to right itself. Of course, too much of this tendency toward stability will make the aircraft impossible to bank if not enough aileron and rudder force is applied... and applying more aileron requires more rudder input for a coordinated turn, so you end up at a mathematical slippery slope where you can overdesign the stability of the wing in relation to the force you have available from any of the movable control surfaces. Catch-22. Also depending on whether or not your aircraft will have any tendency to leave controlled flight (stall/spin, etc.) you may find that some gyros are going to reach a mechanical lockout point where they "tumble" as they reach the end of their mechanical travel. If your software cannot account for a gyro failure (loss of electricity for powering the gyro, a tumble, etc.) it may send your aircraft wildly out of control when the gyro fails. I would say perhaps some of the gyroscopic stabilization systems for RC hellicopters might be appropriate for a relatively simple commercial solution to your problem, but they will have published limits. I've read about such systems but never used one on an aircraft. The pendulum won't work for the reason mentioned above about angular momentum. In that same 60-degree bank turn, the pendulum for all intents and purposes will be hanging pointed directly toward the "floor" of the aircraft. Heading lock gyro's are simply turning in a vertical plane instead of a horizontal one, and typically they have a 360 degree rotation capability, continuously. (i.e. the aircraft can continue to turn around and around and around and you won't lock the gyro.) Heavy pitch changes in the horizontal plane will cause friction at the ends of the gyro, and will cause this gyro to precess. A "heading hold" type of gyro doesn't care much about precession since you don't reference it until the aircraft is in stable, relatively level, flight. Then you have the aircraft bank appropriately to return the gyro to the original position. Over time, that heading will wander one direction or the other, depending on where the friction is in the gyro system. It will be interesting if you continue with the accelerometer idea as to how you overcome the angular momentum issue. That comment about using the IR detector to tell where "up" and "down" are is interesting in a low-cost solution. It will be fun to see what you come up with. -- Nate Duehr, nate@natetech.com Quando Omni Flunkus Moritati "When all else fails, play dead." -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu