EasyStar Project

I’m not going to be able to work on this project for awhile, so I thought I would post about it, partially so that I don’t forget the details myself : )For those of you who don’t know, I’m currently working on a UAV based on a Multiplex EasyStar and an Arduino Diecimila. My main goal currently is to simply get it to fly from waypoint to waypoint, but in the distant future my goal is to extent flight time as long as possible. I’ve been working on the project for the past couple months, and it’s my first foray into both RC and serious microprocessor programming. Currently, the navigation algorithm is extremely simple, and relies entirely on GPS – if it’s too low, go up, if it’s not on the right heading turn the rudder until it is. No accelerometers, no gyros. I know I’ll eventually have to add some sort of method for the plane to know its own orientation when I start doing serious flying, but for now I’m just trying to get all of the hardware collected and the basic software written.The navigation and GPS processing algorithms I wrote from scratch, using trigonometry and such. I believe that they’ll only work in the Western hemisphere, but I’m really not sure. I find the absolute heading to one point from another by calculating latitude and longitude components of the distance (over the curve of the Earth) from the one point to the other, then treating those distances as legs of a flat 2-d triangle. I can then find the angle from absolute North to the destination point. It’s probably almost too precise, but it’s the way that makes the most sense to me, and the processor seems to be able to handle it well. I’ve pretty happy with the results of car-based tests of the autopilot…the update rate of the entire system is about 3 Hz, which I think is fine for a slow, stable glider.The aircraft has never actually flown under autopilot control, but everything has been tested on the ground and seems to work. So, when I next get a chance to work on it, my first priority will be to clean up the rat’s nest of wires on the protoshield...then install something to keep it stable in the air and start testing. It’s probably going to be on hold until December, when the semester is finished, but I think I will have enough time then to get it working in the air.Pictures and code for those who are interested follow...cheers!

Haha it looks terrible...but prototypes never look clean. You can just barely see an Arduino Protoshield underneath...NavigationMain.zip
E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Jacob, i've not just had visions, I've seen it actually happen :)

    I've used an altitimeter with a 200 mS sample rate (5X faster than GPS) and a standard deviation of 1.2 meters on each reading (probably 5X better than GPS) and an autopilot could not hold the EZ level based on that information regardless of gain. And what was confounding is that when you looked at the logs, the autopilot indeed did think it was keeping things level until things went south. But when you actually were watching the airplane, it very quickly started oscillating and those generally got larger and larger until I had to take control.

    Intuitively it does seem possible, but practically it isn't.

    Background: http://www.rcgroups.com/forums/showthread.php?t=843174
  • Moderator
    Yes, I love my EZs, but then again, I also love my FMAs.
  • Yeah, I've had visions of my UAV plunging toward the ground or stalling then plunging toward the ground because of the lack of orientation info. I do think, from what I've seen of the EasyStar, that I'll be able to do short test flights without orientation feedback -- piloting it up to a safe altitude then letting it climb to a higher one, for example. But this is just an intermediate step, really, and I do plan on knowing orientation eventually.
  • Moderator
    Do you feel the info & resolution you get from the GPS is appropriate to rely on as the ONLY form of sensor?
    Attitude? / orientation?
This reply was deleted.