Me and my team have come a long way since I first posted on RC-Groups with interest of building a UAV.
I started pretty much from square zero, other than having some experience with Lego Mindstorms. I didn't know why my Stamp was being shorted when I did not use a resistor with an LED. I managed to short circuit my Parallax Servo Controller 2-3 times, ultimately resulting inthe battery springing a leak. I didn't know what a green dot meant on aschematic, and I almost fried my FPU chip. But in time, I learned frommy mistakes.
I have much to thank to this website, Parallaxforums, and RC-groups. I personally have learned ten times more from this project thanthree year's worth of science and technology classes, and to have themoney and freedom to design/research whatever you're interested in is agreat feeling for an aspiring engineer. It is really a great experience.
After months of research, we drafted a project proposal and emailed it to BAE Systems, a defense contractor company with ties to the Honolulu school system, and our principal, with requests for sponsorship.
BAE Systems responded to us in about 2 weeks, expressing interest in our proposal and offering us $363 to build our prototype (They offered $455, but I declined the additional money as I decided to withhold buying the airframe until I was confident this project could be done). Then shortly afterwards, our principal responded, requesting us to do a PowerPoint presentation to her, a few teachers, and two engineers.So we created a PowerPoint and crammed as much detail into it as possible (complete with GoogleEarth footage zooming in on a simulation flight path =P), which impressed the principal, who decided on the spot to fund us the remaining $200 we needed to buy the Easy Star and a radio transceiver system. As it turned out, one of the engineers (who will be our mentor) actually has a hobby doing the exact same thing we were doing (he uses the Easy Star as well)!
While all this was happening, we were also building a ground-based prototype to test our autopilot system. We used relatively low-tech materials (as you can see in the photograph) but it works fairly well and has a good turning response. My only concern is that it is too slow to get any sort of accurate bearing from the GPS's differential positioning (In that case though, we'll just use a digital compass to simulate a GPS bearing reading).
Anyway, after printing out Chris's Basic Stamp autopilot source code, GPS demo source code, pages and pages of floating point coprocessor instruction and data sheets, and PSC documentation, and then analyzing it, highlighting it, and annotating it, I've finally grown confident enough to code my own navigation program from scratch, although I pretty much used Chris's source code as an autopilot bible while I coded.
The current program works in a similiar way to Chris's navigation program, except it uses the floating point coprocessor, which allows a much more liberal use of variable storage, not to mention a relatively high precision without having to resort to clever tricks with integer-only math. The only difference is that since the turning system is a differential drive with continuous rotation servos, the turning angle is inserted into a function for the duration of turn, rather than the position of the rudder.
There are some logic and mathematical errors, especially with unit conversions, and when I work with bits, bytes, words, etc, since I don't really have any formal computer science training, so those concepts are foreign to me, but I think for the most part it looks okay. (It compiles!)
I am thinking of upgrading to the BS2P though, since currently I'm not sure how to implement waypoint lookups, other than just using constant arrays (do those even exist?!). The increased speed and scratchpad RAM will be nice.
So here is the program. For some reason, you can't directly view it on our website since it gives you a 404 error (it works offline), but you can still download it by going to the homepage and right-clicking --> save as, but you would need the Basic Stamp Editor to view it. (http://www.project-uav.net/index.html) I don't suggest you read our website other than the front page though, since it is mostly redundant information and mainly for academic purposes.
Otherwise, I've also uploaded the code to pastebin, so you can view it there too. Unfortunately without syntax highlighting it is a huge eyesore, but hopefully you can follow it.
http://www.pastebin.org/18059
P.S. I type as soon as a thought gets in my head, so in retrospect it kinda sounds like I'm rambling, so please excuse that.