User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: The AutoPlane Project

Mon Mar 05, 2012 2:29 am

Someone else will eventually point this out, so, I might as well do it now.  If you're talking about an actual airplane that can carry one, or more people, the regulatory bureaucracy is going to ground you permanently, or at least for a very long time.  As it is, they have to currently close down airspace for at least 15 km around an airport doing this sort of testing in order to prevent interference with aircraft carrying innocent bystanders (i.e., pilots and passengers).  Modifying a real aircraft in any way must be done by people certified to do so if it's a commercially-built aircraft.  If it's an experimental aircraft, it has to be at least inspected by qualified inspectors, and they're going to want to see a very detailed technical plan, along with all of the equipment designs, schematics, as-built drawings, etc.  For starters, WiFi isn't going to be anywhere near as reliable as you're going to need to do this properly for lots of reasons, starting with range/orientation and electromagnetic interference.  Plus, what happens when the aircraft inevitably does fly out of range?  How does it autonomously fly back to within range?  Obviously, a lot of GPS-based software would be needed, but, what happens when, not if, the GPS receiver fails?  What happens when, not if, anything fails, and especially more than one thing fails?

You would be much better off experimenting with a radio-controlled, electric-powered model aircraft, although it would have to be big enough to carry the R-Pi, batteries, and any other ancillary circuitry.  You would still have all of the "What happens when ... ?" scenarios listed above, but, at least you wouldn't have a real airplane falling out of the sky from thousands of feet when, not if, a problem occurs.  BTW, I wouldn't even begin with a model aircraft, I would start with a ground model vehicle and get that working in two dimensions, before embarking on three dimensions.  You could do a lot of troubleshooting even with an aircraft model mounted on a ground model vehicle, thereby saving money on crashing model airxraft, which is going to happen.  Going another level of abstraction, why not just do it all in virtual reality, since the R-Pi has such a great GPU and HDMI video output?  Once you get the simulation working, then you can start spending money crashing model aircraft.

I don't intend to be a wet blanket, I'm just pointing out some things you're going to find out about soon enough.  I do hope you pursue this, just do so safely.  Good luck!
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

emg
Posts: 88
Joined: Wed Jan 11, 2012 11:01 pm

Re: The AutoPlane Project

Mon Mar 05, 2012 11:14 am

lol. I'm pretty sure OP was wanting to control a RC model.

OP, are you planning on using the RPi to integrate with your flight sensors? If so, IMHO, wrong tool for the job. Have a look at existing Arduino based boards; much better suited. You may still be able to use the RPi in an executive function, but for capturing/acting on real-time sensor data and driving servos, it is not suitable. Have a look at ArduPilot.

User avatar
nick.mccloud
Posts: 804
Joined: Sat Feb 04, 2012 4:18 pm

Re: The AutoPlane Project

Mon Mar 05, 2012 12:14 pm

Goal 3a - buy a shed load of insurance just in case you crash in to anything expensive.

jonititan
Posts: 30
Joined: Sat Aug 06, 2011 2:05 pm
Contact: Website

Re: The AutoPlane Project

Mon Mar 05, 2012 12:31 pm

Unfortunately you won't be able to do it as a hobby project.

If you are a billionaire then you might be able to but otherwise you can't.

To see why go to the CAA website and read CAP722

This only applies if you are in the UK but the rules are similar for other countries.

User avatar
SN
Posts: 1014
Joined: Mon Feb 13, 2012 8:06 pm
Location: Romiley, UK
Contact: Website

Re: The AutoPlane Project

Mon Mar 05, 2012 9:25 pm

go do some research on the parrot ar drone - this may be a better platform and it already creates its own wireless lan over which you can communicate
Steve N – binatone mk4->intellivision->zx81->spectrum->cbm64->cpc6128->520stfm->pc->raspi ?

linorics
Posts: 8
Joined: Sun Feb 12, 2012 3:10 pm

Re: The AutoPlane Project

Mon Mar 05, 2012 11:37 pm

First off "Love the idea".

I've done some research in the WiFi area. First off if we look at the out door range of 802.11g you get 300 ft max and with 802.11n you get 500ft max.

I can see two topologies for the wireless.

1.) Centralized, get one powerful router in the middle of the field running dd-wrt(open source router software). Possibly a wifi amp and better antenna.

e.g. http://www.amazon.com/Premiert.....B0030LVCD0

Limitation: Your range will be limited

2.) Grid Network, get some lower powered routers running dd-wrt and hook them together as repeaters around the field.

Cons: cost would be higher

As far as the programs talking to on another, if you dont want them inside the same process you could use UNIX sockets. I plan on doing this with an RC truck using a grid network.

I love this idea. Cant wait to see where it goes.

smeird
Posts: 1
Joined: Tue Mar 06, 2012 12:25 am

Re: The AutoPlane Project

Tue Mar 06, 2012 12:35 am

Have you seen http://www.diydrones.com loads of info on both equipment and capabilities , also info on what constitutes a self guided missle etc.

EricMiddleton
Posts: 47
Joined: Wed Jan 18, 2012 3:47 am

Re: The AutoPlane Project

Tue Mar 06, 2012 6:15 am

I don't know about laws in the UK specifically, but laws regarding UAVs in the US require the pilot to maintain visual contact with the craft AND have a dedicated controller to manually fly the aircraft in case of automation failure. Your current WiFi system probably won't allow you to maintain radio link at all times, so you may have to get a separate radio link just for manual control. Also, for what it's worth, I'm planning on making my own UAV based around the RPi (a quadrocopter not an airplane), and instead of using WiFi, I'm actually planning on using a mobile broadband card to allow me to fly it pretty much anywhere. Probably too hefty for your needs though.

st599
Posts: 28
Joined: Mon Sep 05, 2011 1:29 pm

Re: The AutoPlane Project

Tue Mar 06, 2012 8:32 am

You could use a Kalman filter and PID controller in the main code.

Why have lots of individual programs?

How is system redundancy achieved?

flipdewaf
Posts: 24
Joined: Wed Sep 14, 2011 7:38 pm

Re: The AutoPlane Project

Tue Mar 06, 2012 12:02 pm

Few things to think about:

Weight: Obviously with aircraft weight is the enemy, try to keep this as low as possible. Extra weight will make it need to go faster to get off the ground (also accelerating slwer to get there, harder to control, slower in flight, use your batteries quicker, harder to land (and many others beside).

The distribution of the weight is also very important, you have to keep the static margin within the capability of the aircraft used (keep it balanced right) but dont be tempted to move small bits long distances to get the required centre of gravity. Remember that as you move things away from the centre of gravity to balance things the inertia goes as the square of the distance so sticking a weight in the nose will likely make the aircraft sluggish (but remember that this may be an advantage later on).

Control systems: You'll basically be doing FBW (fly by wire) to control the aircraft but I assume that you won’t need quadruple redundency like airbus use. Basically FBW means that you (orperhaps your guidance computer) will have to ask the control computers to gave you a certain outcome. In reality you will have to set it up to continuously look for an outcome.

There are many different controls on a fixed wing aircraft but there are only so many you are likely to use on a project like this. Pitch, Roll, Yaw and thrust, although you can probably forget about yaw for this aircraft

For many of the controls you will need fairly high speed PID control to effectively 'hunt' for the desired outcome. You then have to choose what outcome it is that you are actually looking for, this could be:

For roll:

Roll input equates to a target roll rate

Roll input equates to a target Bank angle (Better for navigation so I’d go with this)

For airspeed

Throttle position equates to a target airspeed (I’d go with this one)

Throttle position equates to a target acceleration

For pitch

Pitch input equates to target pitch change rate

Pitch input equates to target acceleration (G Loading) (I’d suggest this one, as its easier to make level turns which is very important)

There are certain basic pieces of information you will have to know to complete an automated flight:

Altitude (above ground level is a must to avoid crashes) There are a number of ways to do this, GPS is not one of them.

Pressure altitude

Bank angle (need a gyroscope)

G Loading

It is very complicated to allow an aircraft to be controlled by a computer, you have to break down all the processes that a pilot goes through to control the aircraft which involves a lot of feedback loops and different instruments in a very dynamic environment. If you want to know more please ask me.

Fred

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: The AutoPlane Project

Tue Mar 06, 2012 12:29 pm

By "Gyroscope" do you mean some kind of true level sensor, or an accelerometer?  The accelerometer doesn't tell you your pitch or bank angles directly, only their accelerations, it needs software integration to maintain a true bank/pitch angle.

I think you need one big program - you write one program to control the elevators/ailerons/rudder, continually reading sensors to achieve this.  Your direction to fly in takes a lower priority. (Robot subsumption architecture is one fancy phrase to google.)

Also, do you know any control theory? (PID control loops, etc. will probably be needed among many other things.)

EricMiddleton
Posts: 47
Joined: Wed Jan 18, 2012 3:47 am

Re: The AutoPlane Project

Tue Mar 06, 2012 8:14 pm

If you don't have a lot of background in control theory, try Udacity. They have a free class on robotic cars that is running right now (http://www.udacity.com/overvie.....urse/cs373). All of the things you learn can easily be applied here.

kghunt
Posts: 383
Joined: Sun Mar 04, 2012 9:28 am

Re: The AutoPlane Project

Tue Mar 06, 2012 10:19 pm

Why use wifi at all? Why not 3G/GPRS and a basic external webservice that hosts a heartbeat data file. The the plane will heartbeat every few seconds and pick up commands from the web service. Then you could have controls on a mobile device that post to the same web service to update the heartbeat file.

And similarly the plane could post
Sensor data to the web service. You could write in logic to say power down if 3 heartbeats failed etc.

User avatar
viciouspenguin
Posts: 32
Joined: Sat Mar 03, 2012 9:14 pm
Contact: Website

Re: The AutoPlane Project

Tue Mar 06, 2012 11:02 pm

theres a plethora of mobile network units;

http://www.coolcomponents.co.u.....p?cPath=26

all quite lightweight....
FishPi: An autonomous drop In the Ocean.

CookieMonster
Posts: 46
Joined: Tue Dec 27, 2011 12:05 am

Re: The AutoPlane Project

Wed Mar 07, 2012 12:47 am

I second the suggestion to go to DIYDrones.com and read about the ArduPilot (mega). They've been doing this stuff for years.

The RPi has a way more processing than the ArduPilot (way more even than the mega), but far less I/O (than even the original ArduPilot). The DIY Drones folks upgraded (to the mega) for more I/O at least as much, probably more, than for CPU.

Bottom line: RPi's meager GPIO pins will not be up to the task. Yet a simple Arduino does have sufficient CPU to handle the math.

One thing you need to be aware of, those small, lightweight "gyros" are rate gyros, not position gyros such as used in old-timey autopilots. They do not tell you what your attitude is, they tell you if you how fast you are spinning. And they drift. A few degrees per second is not really "bad." You need other ways to provide a vertical vector (accelerometers and some careful math) to correct roll and pitch drift, and a horizontal vector (magnetic compass or GPS heading) to correct yaw drift.

Also, you can not simply integrate the rates from the gyros independently. Make an airplane out of your hand and do the following comparison. From straight and level, pitch up 3 degrees per second for 30 seconds. Next, roll right 3 degrees per second for 30 seconds. Look at your hand. Should be fingers up, palm to the left. Got it? OK, try doing the rotations in the opposite order: From straight and level, roll right 3 degrees per second for 30 seconds. Now pitch up 3 degrees per second for 30 seconds. Is your hand in the same orientation? Fingers to the right, palm forward? Hmmm...how ya gonna fix that?

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: The AutoPlane Project

Wed Mar 07, 2012 9:49 am

If the software crashes: If you're keeping a normal remote control it's wired to control 2-3 servos for the controls. The autopilot would have its own alternative wiring too.  You could select between the two with a (lightweight) relay so if the autopilot's power goes down the relay clicks off and the remote is connected back to the servos as normal.  This would be the manual switchover too, controlled by one channel on your remote.

(I know nothing about R/C radio gear by the way, I'm assuming you'll be able to control an on/off from a standard controller.)

By the way it might be simpler to leave the throttle connected to the radio at first.  The autopilot would just twiddle the ailerons/rudder/whatever to assist keeping straight and level.  Much less to do than build in all the navigation & take off/landing in one go.  (Still tricky though.)

flipdewaf
Posts: 24
Joined: Wed Sep 14, 2011 7:38 pm

Re: The AutoPlane Project

Wed Mar 07, 2012 10:15 am

Cookie Monster said: 


One thing you need to be aware of, those small, lightweight "gyros" are rate gyros, not position gyros such as used in old-timey autopilots. They do not tell you what your attitude is, they tell you if you how fast you are spinning. And they drift. A few degrees per second is not really "bad." You need other ways to provide a vertical vector (accelerometers and some careful math) to correct roll and pitch drift, and a horizontal vector (magnetic compass or GPS heading) to correct yaw drift.


I don't think that you can do attitude with accellerometers, at least not properly as if back pressure remains the same then a 1G manouver will be continued, look up stopped engine aerobatics on youtube and you'll see from the iced tea experiment why accelerometers might not like it. (although I'm willing to be proved wrong.)

A good Direction indicator should only drift 15 degrees per hour as the earth spins arount it.



Also, you can not simply integrate the rates from the gyros independently. Make an airplane out of your hand and do the following comparison. From straight and level, pitch up 3 degrees per second for 30 seconds. Next, roll right 3 degrees per second for 30 seconds. Look at your hand. Should be fingers up, palm to the left. Got it? OK, try doing the rotations in the opposite order: From straight and level, roll right 3 degrees per second for 30 seconds. Now pitch up 3 degrees per second for 30 seconds. Is your hand in the same orientation? Fingers to the right, palm forward? Hmmm...how ya gonna fix that?


As far as I can tell the beauty of controlling a fixed wing aircraft is that you can decouple the controls very effectively for "normal" flight, for aerobatic flight its a whole different ballgame but that is by the by although a simple code to go wings level would be a good one. Banking 90degrees or going into the vertical is not something that is done in general outside of being in the military or an aerobatic pilot or indeed a playstation pilot.

To turn you would simply have to bank to and stay at 30 degrees using one system whilst using the other system to maintain level flight, the harder you bank the tighter you turn with the limit probably being set by Max lift coeficient of the wings. If you were lfying a real plane you'd need to use the rudder to coordinate it properly but seeing as there is no passengers to make sick then it doesn't matter too much.

If it were me (and it could well be soon) I'd stat by using one of those polystyrene aircraft that only have control by 2 props and control steering and climbing through them. (more thrust=go higher, thrust differential = turn)

Fred

flipdewaf
Posts: 24
Joined: Wed Sep 14, 2011 7:38 pm

Re: The AutoPlane Project

Wed Mar 07, 2012 2:08 pm

The more I think about it (I should be working) the more I believe that maintaining level flight is the most important and unfortunately the most difficult thing here. The difficulty is knowing how high it is at any given time, you are probably looking to have altitude data accurate to within 1ft to maintain within 5ft. Thats about 3.4Pa, if there is a pressure sensor that can do this ok then no worries.

Edit:BMP085 may be up to the job with a bit of damping from a rubber tube.

Fred

kghunt
Posts: 383
Joined: Sun Mar 04, 2012 9:28 am

Re: The AutoPlane Project

Wed Mar 07, 2012 4:15 pm

HappyPaul55 said:


kghunt said:


Why use wifi at all? Why not 3G/GPRS and a basic external webservice that hosts a heartbeat data file. The the plane will heartbeat every few seconds and pick up commands from the web service. Then you could have controls on a mobile device that post to the same web service to update the heartbeat file.

And similarly the plane could post
Sensor data to the web service. You could write in logic to say power down if 3 heartbeats failed etc.


Hello,

I've decided not to use GPRS because I don't really have a clue about how to go about creating a lightweight "phone". I could use an old android phone but I'm already sticking my neck into the unknown and I don't want to push it out too far. If someone has extensive knowledge in this area then maybe I'll start to think about it. Also, I'm running out of inputs even if I wanted to. But, I'll keep an open mind if some has the required knowledge.

Thanks everyone

Paul


I have an old 3g dongle that is no bigger than a usb stick. With the plastics removed it is tiny. It even has a built in micro sd card reader. I already wrote a script to dial 3g connections on the command line some time ago using wvdial its very easy. Then that provides the RPi with an internet connection. Im definitely going to get this working again as it will be useful for other projects too.

CookieMonster
Posts: 46
Joined: Tue Dec 27, 2011 12:05 am

Re: The AutoPlane Project

Wed Mar 07, 2012 11:13 pm

flipdewaf said:


I don't think that you can do attitude with accellerometers, at least not properly as if back pressure remains the same then a 1G manouver will be continued, look up stopped engine aerobatics on youtube and you'll see from the iced tea experiment why accelerometers might not like it. (although I'm willing to be proved wrong.)


You are wrong. Yes, I understand what you are trying to say. I am a licensed pilot and when I was working on my instrument rating my instructor would set a full soda on the floor between us, not touch it until we landed. If I slopped a drop I failed. The wings always lift "up" thru the cabin floor. Even banked 45 degrees.

However, even old vacuum instruments do drift and your HSI always self adjusts to what it thinks "up" is. If you perform an extended duration climb, the HSI will be a few degrees pitched down when you finally end your climb and drop the nose to the true horizon because it was adjusting itself to the new, nose up "level". In most cases, the rate of correction is an order of magnitude greater than the drift and yet not so great that any flight regime causes correction errors to accumulate beyond just a very few degrees.

Now, for the autopilot, (1) the mathematics take this into account and (2) you don't fly in a right bank along a straight line. When you roll right, there is a tiny error building in the assumed "up" but after a minute you are not going north banked right, you are going south banked right so the correction is being applied top "north" instead of top "south" and thus while you circle there is a small error but it cancels itself rather than accumulate.

Go to DIYDrones.com as I said before. This is exactly how they do this. 3x gyros, 3x accelerometers, and either GPS heading to cancel yaw drift (works OK for moving things like airplanes) or a magnetometer compass for 'copters which don't always have a forward velocity.

CookieMonster
Posts: 46
Joined: Tue Dec 27, 2011 12:05 am

Re: The AutoPlane Project

Wed Mar 07, 2012 11:16 pm

flipdewaf said:


A good Direction indicator should only drift 15 degrees per hour as the earth spins arount it.


Yes. And is a multi-thousand dollar instrument with a physically spinning gyro (unless you are military/heavy iron and have for example, laser gyros). This is not a $6 solid state gyro the size of a thumbnail.

CookieMonster
Posts: 46
Joined: Tue Dec 27, 2011 12:05 am

Re: The AutoPlane Project

Wed Mar 07, 2012 11:40 pm

flipdewaf said:


As far as I can tell the beauty of controlling a fixed wing aircraft is that you can decouple the controls very effectively for "normal" flight, for aerobatic flight its a whole different ballgame but that is by the by although a simple code to go wings level would be a good one. Banking 90degrees or going into the vertical is not something that is done in general outside of being in the military or an aerobatic pilot or indeed a playstation pilot.


But the OP was going to put this in an R/C aircraft. They regularly do "unusual attitudes." Either way, it was simply an extreme example. You can not do simple integration of the pitch/roll/yaw rates because order matters to the result.


To turn you would simply have to bank to and stay at 30 degrees using one system whilst using the other system to maintain level flight, the harder you bank the tighter you turn with the limit probably being set by Max lift coeficient of the wings. If you were lfying a real plane you'd need to use the rudder to coordinate it properly but seeing as there is no passengers to make sick then it doesn't matter too much.


{R/C aircraft are "real airplanes." We call the ones that you can ride in "full scale."}

If you are flying a modern, certificated aircraft, it is pretty unusual to have to "step on the ball" when applying aileron. Differential throw (more up than down) and, in the case of, for example small Cessnas, the upward going aileron has a leading edge that drops *down* into the airstream providing "proper yaw" (as opposed to "adverse yaw") drag when more than a few degrees of control are applied.

Once a positive rate of climb is established you can pull your feet back and make yourself comfy until you are on short final and want to kick out the yaw for crosswind touchdowns. Unless you are going out for stall/spin practice or aerobatics. Rudder does come in handy for spin recovery.


If it were me (and it could well be soon) I'd stat by using one of those polystyrene aircraft that only have control by 2 props and control steering and climbing through them. (more thrust=go higher, thrust differential = turn)

Fred


Good choice. The toughest are actually EPP and some variants, eg. "elapor." You can just about drive over it, then go flying.

(EPS = expanded polystrene snaps when it hits the ground.)

Many beginners want to look cool more than they want success and choose to get a "predator" type UAV and they are not easy to fly.

CookieMonster
Posts: 46
Joined: Tue Dec 27, 2011 12:05 am

Re: The AutoPlane Project

Thu Mar 08, 2012 1:44 am

Cookie Monster said:


However, even old vacuum instruments do drift and your HSI ...



Dagnabbit. I thought I went back and changed HSI to artificial horizon. Teaches me to eat type and talk on the phone at the same time. Find all HSI. Replace with artificial horizon.

flipdewaf
Posts: 24
Joined: Wed Sep 14, 2011 7:38 pm

Re: The AutoPlane Project

Thu Mar 08, 2012 11:50 am


You are wrong. Yes, I understand what you are trying to say. I am a licensed pilot and when I was working on my instrument rating my instructor would set a full soda on the floor between us, not touch it until we landed. If I slopped a drop I failed. The wings always lift "up" thru the cabin floor. Even banked 45 degrees.



I haven't done any real instrument work yet, still pottering around at 3000ft in my traumahawk avoiding the heavies more commonly known as seagulls.


Now, for the autopilot, (1) the mathematics take this into account and (2) you don't fly in a right bank along a straight line. When you roll right, there is a tiny error building in the assumed "up" but after a minute you are not going north banked right, you are going south banked right so the correction is being applied top "north" instead of top "south" and thus while you circle there is a small error but it cancels itself rather than accumulate.



Let me see if I get this, the gyro will drift as I turn but the drift+(accelerometer*maths)=correct (I like maths)? If I do a full 2*Pi turn then drift+(-drift) = correct? I didn't do avionics at uni so my knowledge of gyros is limited to:- If I make a typhoon aerodynamically unstable and then put 2 EJ200's in it, it still won't want to turn.

You do fly banked in a straight line but the instructor tells you off for not bleeding speed in the correct way and that I shouldn;t do as he does..


But the OP was going to put this in an R/C aircraft. They regularly do "unusual attitudes." Either way, it was simply an extreme example. You can not do simple integration of the pitch/roll/yaw rates because order matters to the result.


Although your original was an extreme example that method still holds true for lesser examples but that wuold be my reason for decoupling the controls for the three axis. I realise that this wont work so well for extreme attitudes but I wasn't expecting there to be any of these (not intentionally anyway). A wings level type recovery system may well be good for this project. Airbus style envelope protection is what I had in my head.


{R/C aircraft are "real airplanes." We call the ones that you can ride in "full scale."}


Shhh, don't tell the R/C peeps I said that


Once a positive rate of climb is established you can pull your feet back and make yourself comfy until you are on short final and want to kick out the yaw for crosswind touchdowns. Unless you are going out for stall/spin practice or aerobatics. Rudder does come in handy for spin recovery.


Unless I was running late on the way to the airport in which case I always seem to get a case of stampy clutch foot.

I know they do all this stuff at DIY drones but I feel like its cheating to just copy them, kind of like working out the rubicks cube for yourself rather than getting someone to teach you.

Just to put everyone in the picture as to why I am excited about this, Iwant to bild something like this so I feel its better to gain the knowledge together (sort of) rather than just go and read it so as to have a better understanding. I have a PPL, although I don't fly for a living, I work as an engineer and have a masters in Aerospace Engineering. I believe that this project should be done in very attainable chunks and for me the first basic thing is flying straight and level(I'm sorry if I get annoying saying this repeatedly).

Fred

flipdewaf
Posts: 24
Joined: Wed Sep 14, 2011 7:38 pm

Re: The AutoPlane Project

Sat Mar 10, 2012 3:46 pm

HappyPaul55 said:


Great read going on here.

I've found myself reaching the top of my knowledge regarding Aerospace Engineering and starting to get a bit lost. If you can provide short explanatory answers to my following question that'd be great.

Why do I need an Air pressure sensor when GPS can provide accurate Altitude. I tested my android and I knew when I stretched out my arm. Surely that's accurate enough?


Your android may well have known that you moved due to the accelerometers but there is generally no betting on the GPS in you phone being any better than around 10m and then it'll be augmented by other things. Next time you are on the motorway and you go off at a junction, the GPS will likely follow the motorway for a bit as it is just guessing that you are carrying on on the road. Air pressure is very reliable and tends not to do funky things, it works if there is a hill in the way it can also be damped reliably as well (just a long rubber tube will do it). Ideally you'd use them both as a sense check.


Gyroscopes vs Accelerometers; Why do you think I need both. I thought Accelerometers were relative to the plane and Gyroscopes are relative to the world. Therefore I only need world measure to keep it level. I know this has been discussed quite a bit but I'm finding difficult to keep holding on to the great minds in this topic.

Cookie Monster said:


Go to DIYDrones.com as I said before. This is exactly how they do this. 3x gyros, 3x accelerometers, and either GPS heading to cancel yaw drift (works OK for moving things like airplanes) or a magnetometer compass for 'copters which don't always have a forward velocity.


I shall not be using one of there boards or software but their solution, maybe. Why use 3 gyros and accelerometers when two would provide enough information?


Firstly you will need all 3 gyros as you will be operating in a 6 degree of freedom environment. When you turn on any one axis a resulting turn on a different axis will be a function of two axis and likely the result will be a function of the two not used to start with. (probably doesn't make sense so I'll give an example) You are flying straight and level and all is well, roll is along the axis going from nose to tail, pitch is on the axis going through the wings and yaw on the axis coming out the top of your head. You pitch the plane nose up to 30 degrees and the roll axis still comes out the nose of the plane but when you roll to the right there is a movement in the ground perceived yaw axis, the wing that is going down actually goes forward a little, when you get above 45degrees nose up the dropping wing actually goes forward more than it goes down.

A quick look online shows that MEMS gyros wonder fairly badly and accelerometers are very noisy, a function known as a Kelman filter can sort it by combining the data from the two. The theory behind it is fairly simple but the maths is a bit horrid (I don't like matrix maths at all). It is basically an error estimation system that self updates. If I was you I would try to steal some code to implement it and not worry too much about it if it works.


Sorry for the all the why's, but with so many thoughts floating around and some conflicting, I'm not sure where to look. I could always try and use Google but prefer getting my knowledge from real people who are thinking of doing something similar or the same as I.

Few, that was a long post.

Thanks everyone who has inputed into this topic or has commented on this documentation.

I plane to start building/playing with all the hardware on the 15th, until then I'll continue to write on here and on the documentation and continue to better understand planes.


Don't be sorry for the why's,

Its better to look a little bit silly now that very silly later on, it has taken me many years to learn a lot of these things so one shouldn't expect to learn them over night.

Fred

Return to “Other projects”