DIY Drones


Sigh....I am going to give Peter Hollands an award for finding the "juiciest bug" in the released waypoint firmware for the UAV DevBoard. The bug has been fixed, and the firmware has been re-released as version 1.8b.

The bug was in the yaw drift gyro compensation calculation. It would only show up for waypoint legs with a heading between 327 degrees and 360 degrees. The result was that the actual heading would slowly vary between 327 and 360 degrees. The symptoms were barely noticeable.

The way that Peter discovered the bug was with a combination of ground testing and telemetry, while he was testing out some really nice programs that he wrote for processing telemetry. Peter noticed an anomoly during ground testing for headings between 327 and 360 degrees.


Waypoint firmware for the UAV DevBoard is available in both MatrixNav version 1.8 and AileronAssist version 1.8 from the UAV DevBoard home page, with the following features:

• Waypoints are 3D.
• Location of the points is specified relative to the initialization location of the board.
• You have the option of using either cross-track error navigation, or using navigation toward target waypoints.
• Arrival at a waypoint is based on the concept of a "finish line". This produces a reliable assessment of arrival, without any chance of loitering.
• The primary source of steering is the direction cosine matrix, so steering continues reliably and smoothly even when the GPS loses lock during banked turns.
• Rudder-elevator mixing in MatrixNav, based on the values of the direction cosines, prevents loss of altitude during turns.
• You can specify more than 1000 waypoints.

Just to be clear, the X and Y coordinates of each waypoint are specified with respect to the power up point. It is not specified with respect to the previous waypoint in the list. The X coordinate is the distance, in meters, along the east direction, from the power up point. The Y coordinate is the distance, in meters, along the north direction, from the power up point.

Best regards,
Bill Premerlani

Share  Twitter

Chris Anderson Comment by Chris Anderson on September 15, 2009 at 8:11pm
Congrats on this achievement--very exciting! How are waypoints entered?
Chris Anderson Comment by Chris Anderson on September 15, 2009 at 8:18pm
Whooops sorry; should have read before I spoke. From the documentation:

"The waypoints are defined in the file waypoints.h that is a header file in the
project source code for the firmware. There are two items you need to specify
in the file:
• whether or not you want to use cross-tracking
• the coordinates of the points."

They are in the form:

"const struct relative3D waypoints[] = {
{ 0 , 0 , 100 } ,
{ 100 , 173 , 100 } ,
} ;"

Or, even cooler:

#define CROSSTRACKING
#define CORNER 100
#define CLEARANCE 25
const struct relative3D waypoints[] = {
{ CORNER , CORNER , CLEARANCE + 100 } ,
{ CORNER , - CORNER , CLEARANCE + 75 } ,
{ - CORNER , CORNER , CLEARANCE + 50 } ,

No provision for absolute lat/lon waypoints?
William Premerlani Comment by William Premerlani on September 15, 2009 at 9:10pm
Hi Chris,

Absolute lat/lon waypoints are on my list of things to do. I can see that they can be useful. I plan to eventually offer the options of relative points, and/or absolute points.

In order to get something working in time for this month's T3 contest, I decided to release the firmware with just one option, and finish the other option later.

Personally, I find the relative points in meters much easier to work with than absolute points in lat/lon, it takes only a few minutes with the ruler function in GoogleEarth to measure the locations of your waypoints with respect to the place that you intend to power up.

Plus, by specifying the waypoints with relative coordinates, you wind up with a portable pattern. You can move the waypoints without having to reprogram them.

For example, at the field that I do most of my flying, more often than not there are strong winds that could come from pretty much any direction on a given day, they can even shift direction in an hour. I like to keep my plane upwind, just in case. I find it very convenient to be able to make a last minute decision on the location of the origin, even though I might have to walk a considerable distance to get it just where I want it.

Best regards,
Bill
William Premerlani Comment by William Premerlani on September 15, 2009 at 9:18pm
Hi Chris,

Something I forgot to mention in my previous comment: the example waypoint list that is included in the waypoint firmware is the pattern for this month's T3 contest. All you have to do to use it at any location is to initialize the board where you want the center of the pattern to be.

Bill
Peter Meister Comment by Peter Meister on September 15, 2009 at 9:51pm
Uploading it now, will test tomorrow. I want to congratulate Bill on an amazing accomplishment. This is a monumental day for DIY Autopilots.
NS Rana Comment by NS Rana on September 19, 2009 at 11:11pm
Hi Billu !

Ultimate performance by MatrixNav rev8 in my Wing Dragan 3 channel Electric Pusher Plane !!

There was excellent weather conditions and almost no winds in Gurgaon & Sohna, since last two days, so I could dare to fly my plane.

First I fly my plane in Devilal Stadium, Gurgaon, with RTL feature only, by setting only one waypoint. The MatrixNav done very well as expected from it, The plane came back well in two flights without missing.

Then I went to the huge flying ground of Sohna and observed very mild winds blowing. It was almost excellent conditions for flight.Since winds were very mild so disabled CROXTRACKING in the code.

I identified around 8 large inter-distance waypoints based on gound survey. I veryfied all the gains and my control surfaces trims

Compilied the firmware in the flying field itself and uploaded the HEX file to PIC30F4011 in my Red Board (UAV Dev Board Rev 2).

I did four flights with two full Lipo packs. The performance of MatrixNav rev8 was astonishing great !

Then based on its great performance and the continued good weather conditions, I decided to do something dangerous !!

I selected only four very large interdistance waypoints (with alt. hold of 400mt at three waypoints) so that the ground near abouts related to the farthest waypoit was not visible at all. It was really dangerous thing for my plane as well as for my UAV Dev Board. But the great performance of the MatrixNav 8 tempted me to take this risk. I suggest for rest of the guys no to do it.

You know what happened ?

When the plane did not see coming back even after 15 minutes in the air, I was very much worried and had many many bad thoughts in my head. My driver said "sahab chalo gadi mein dekhne chalte hain" means let us take the vehicle and go to find the plane.

I was still very much optimistic about my faith in MatrixNav 8 and I said let us wait for next 10 minutes.

I was continuously looking toward the last waypoint from where my plane was supposed to come. After 5-6 minutes I saw and could make out that it was my plane in the sky. Belive me this time also the plane came back without failure and MatrixNav 8 proved itself.

What I observed that while coming back, the motor of the plane was not running and the plane landed 50 meters away from the power up latlongs. I found the main battery was below 9 volt and and ESC did not run the motor. But since the Autopilot (UAV Dev Board rev 2) was powered using 4.8v, 2500mAh pack, that is why this miracle happened. High altitude selection was another plus point of the plane coming back.

But really thanks to MatrixNav 8 and hats off to Bill !! of course Billu Bhaiya !!!

Thanks & Best Regards

Rana
William Premerlani Comment by William Premerlani on September 20, 2009 at 9:57am
Hi Rana,

I thought that I replied to you earlier here, but for some reason my comments do not appear here, I am not sure why.

I am pleased that your plane made it back ok. I also agree with you that no one else should try what you did. Its best to always keep you plane in visual range.

After thinking about it some more, I believe that your plane traversed your course several times.

The default settings for altitude hold will perform an aggressive climb, but they will not perform an aggressive descent. You would have to change the altitude hold pitch settings to do that. The way the software is released is with sailplane pilots in mind. Once your plane gets more than 10 meters above the desired height, it shuts off the motor and glides. And, unless you change the default setting for that situation, the controls will then perform a level glide.

In the case of your flight, once your plane got to 400 meters height, the fastest it was going to come down was going to be a level glide. Assuming a 10 to 1 glide angle, that means it would travel 4 kilometers before it came down.

So, what I think happened was that your plane went around and around your course several hundred meters high, until it ran out of power. Then it continued to traverse your course while gliding. I would also guess that the waypoint that it landed near had the lowest height, so that is why it landed there!!

It looks like you are the first one to use MatrixNav to perform an autonomous landing.

Best regards,
Bill
NS Rana Comment by NS Rana on September 20, 2009 at 7:45pm
Billu Bhaiya,

I think you analyzed it earlier than me about how my plane came back. If there was no additional battery pack for the receiver then the resuly might have been different as in that case MatrixNav 8 +the Dev Board might have died because of hunger rather than any thing else.

My next targets are;
1. I want to use onboard video camera with 2.4 GHz, 500mW video transmitter but I am afraid if the video transmitter can cause any interference to the 2.4GHz Futaba's receiver.

2. I have one large engine powered electric pusher plane, ultimate stable frame UAV platform. This plane was the only one in New Delhi, it was lying with Mr. Nagar who is an ex. pilot of Jet Airways, he got its kit from Germany and assembled it and done more than 100 flights without even a minute injury (damage) to the plane in any of the flight.

He was not much interested to fly this plane any longer, I showed my interest in this plane and he gave me the plane with engine just 180US$ equivalent amount. I love this plane, if you want to see how it looks like then there is vide of same plane but someone else at YouTube;

This plane can carry 2kg of additionl weight and go upto 2km height, but it can go even higher.
I finally want to test flight this plane using Aileron Assist 8. What you suggest ?

Billu Bhaiya, it could be my foolish idea but can you think of merging MatrixNav 8 into AileronAssist 8 ?

Thanks & Best Regards

Rana
NS Rana Comment by NS Rana on September 20, 2009 at 10:18pm

Billu Bhaiya,
Forgot to mention the YouTube link.

http://www.youtube.com/watch?v=IxUiPWvQnyg


Thanks & Best regards

Rana
William Premerlani Comment by William Premerlani on September 21, 2009 at 3:58am
Rana,
Merging MatrixNav with AileronAssist is on our list of things to do. Ben Levitt is heading it up. What he is doing is developing a single version of the firmware with many options, including V-tails, elevons, etc. For example, you will be able to control rudder, ailerons, elevator, and throttle if you want. Ben figured out how to achieve 5 PWM inputs and 6 PWM outputs.
Best regards,
Bill

Comment

You need to be a member of DIY Drones to add comments!

Join this Ning Network

© 2010   Created by Chris Anderson

Badges  |  Report an Issue  |  Privacy  |  Terms of Service

Sign in to chat!