Triple autonomous flights with MatrixPilot


Yesterday, my GentleLady sailplane, under the guidance of MatrixPilot running on a UAV Devboard with an EM406 GPS and Jordi's magnetometer, achieved 3 consecutive autonomous flights, with the transmitter off most of the time. The above picture shows the tracks of the three landings. Waypoints 18 and 19 were arranged so that the plane was supposed to land halfway between them. The closest landing was 6 meters from the target, the farthest was 21 meters.


Here is how the flight sequence worked:


1. Power up with Tx on.

2. Shut off Tx, this causes the fail safe on my Rx to trigger MatrixPilot to go into waypoint mode.

3. Hand launch the sailplane.

4. Sailplane makes two circuits around the field and lands.

5. Turn on the Tx, this puts MatrixPilot back in manual mode.

6. Turn off Tx, this puts MatrixPilot back in waypoint mode.


Repeat 3 times.


Here are the three flight paths around the field:



Here is the side view of the landings:



You can watch an animated view of the flight track on Google Earth with this kmz file: LOG00122.kmz.


The kmz files are produced by a tool that Peter Hollands put together that reads the telemetry and generates the kmz file. It has some nice features, including displaying the orientation of the plane, the waypoints, the wind vectors, and magnetic field vectors.


Simply download the kmz file and double click on it, Google Earth will open it. You will not see any flight tracks when you open it, but there will be an animation tool visible that you can use to animate the tracks, and/or select portions for viewing.


There will also be items in the layers visibility for you to turn the display of the tracks, waypoints, etc., on and off.


If you are interested in looking at them, here are two other files associated with the flights.


First, there is the raw telemetry file:


LOG00122.txt


There is an excel spreadsheet with key telemetry items:


LOG00122.csv


I want to thank all of the members of the UDB team for their contributions, especially Ben, Peter, Adam, Ric, Sid, and Rana. You guys are always there for me. Thank you Jordi, for your magnetometer breakout board.


And thank you very much, Chris Anderson, for your encouragement and for this website.


Best regards,

Bill Premerlani

Views: 463

Tags: DCM, MatrixPilot, UDB, autonomous, landing, takeoff

Comment by UFO-MAN on June 19, 2010 at 3:30pm
Very cool Bill. Congrats! I am looking to integrate the magnetometer to my plane and test the latest version as well. (At the moment I am working on the HIL setup under Win 7 and VC Express Edition 2010 due to very windy weather. Keep up the good work.

UFO_MAN

Moderator
Comment by Morli on June 19, 2010 at 3:51pm
Congratulations Billu Bhaiya. Thank you very much for your hard work developing UDB and code enhancements. The Core team has been doing some amazing coding which makes it so much fun. We all look forward to new code goodies.
Thank you Chris.A for this Website , supporting and encouraging the whole DIYDrone community.

T3
Comment by William Premerlani on June 19, 2010 at 4:57pm
Hi Morli,

Thank you, and everyone else who is using or working on the UDB. One of the biggest reasons I do what I do is the thought that there are pilots out there who are enjoying the results.

Whenever I go out to fly, when I am facing the sky with my plane in one hand ready to soar free into the wind, I sometimes think about all of the other pilots around the world who do the same thing, and whose thoughts might wander to me just before they launch.

I am never alone at my flying field, even when there is no one there. You all are there with me.

Best regards,
Billu Bhaiya
Comment by Rana on June 19, 2010 at 8:51pm
Hi Billu Bhaiya !

Congrats and many many thanks for your hard work and continuous efforts you are putting to enhance the MatrixPilot firmware.

On mail you have confirmed me that you have used r427, but why not r428 ?

Saturday in the morning, we could do only one filght with short absolute waypoints. The firmware performed very well, did not mis any waypoint.

Billu Bhaiya, during manual landing, around one meter above touch down, we need to give slight input to the elevator, which make sure that nose of the plane of or front wheel of the plane does not touch the ground before rear wheels. How you are achieving it in the firmware ? It is the DR factor with which you are achieving such precision ?

For those who are finding difficult to import the kml file in GE;

Once again thanks a lot Billu Bhaiya for such a great accomplishment !
Thanks & Best Regards

Rana
Comment by Jerry Chapman on June 19, 2010 at 8:52pm
Thats really awesome Bill. Makes me want to finish and fly my Twinstar II.

T3
Comment by William Premerlani on June 20, 2010 at 3:00am
Hi Rana,

You are correct, you should use r428 or later of MatrixPilot for autonomous landings. I added the parameter ALT_HOLD_PITCH_LAND in that version after I sent you the email.

ALT_HOLD_PITCH_LAND is the target pitch for waypoints with the F_LAND qualifier. In other words, it sets the desired pitch angle of the plane for landing.

In my case, with a sailplane, there is a risk that the plane will glide along the entire length of the runway into the trees at the end of the runway, without landing. So, I use a negative value of ALT_HOLD_PITCH_LAND to push the plane down once it reaches the runway.

In your case, is sounds like you want a positive value of ALT_HOLD_PITCH_LAND to pull the nose up for landing. I hope that you have a long runway.

Best regards,
Billu Bhaiya

T3
Comment by William Premerlani on June 20, 2010 at 3:04am
Hi Rana,

One more thing about MatrixPilot. In r431, there is now an option for dead-reckoning. If you use dead-reckoning, you may have to retune the navigation gains, some pilots were complaining. So you can turn dead-reckoning off, if you prefer.

What I suggest that you do, if you are going to attempt an autonomous landing, is to practice it first on a "virtual" runway that is 50 meters above the real one, so that you can adjust the waypoints and the parameters before the real landing.

Best regards,
Billu Bhaiya
Comment by Rana on June 20, 2010 at 5:27am
Hi Billu Bhaiya !
Thanks a lot for your valuable suggestion for my case.
Yes we have a huge open ground of several square km and runway is not a problem, it is quite long.

Billu Bhaiya, since there is no pressure sensor / ultrasonic range finder being used with which the accurate ground distance can be obtained in the firmware, so how you are coming to know in the firmware that you are about to touch the ground so that secons before touch down, you can give little bit elevator input to avoid nose of the plane touching first ?

It is very important for me to know this thing before loading the code in the UDB of my NitroPlane where it is extremely important that if at the touch down little bit elevator is not given then it is likely that plane may have a crash landing.

Thanks & Best Regards

Rana

T3
Comment by William Premerlani on June 20, 2010 at 6:09am
Hi Rana,

In my case, I set my height margin to 5 meters, and a height of 10 meters for my last waypoint prior to landing. Altitude control was holding the height to within the margin. My EM406A was providing 1 meter accuracy. So, I knew that the height of the plane would be somewhere between 4 and 16 meters just prior to the landing flareout.

Then, for the very last waypoint, the one with the F_LAND option, altitude control is shut off, the throttle is shut off, and the pitch control holds pitch at ALT_HOLD_PITCH_LAND. So, the plane will glide with the throttle off, so it must eventually come down. It will glide along at whatever glide angle corresponds to that pitch angle.

Lets say that the glide with throttle off is 10 to 1. In that case, for the situation I just described, the plane will land somewhere between 40 and 160 meters from the last powered waypoint. That is why you need a long runway.

What I recommend that you do is run a pattern at least 50 meters up, with one waypoint with the F_LAND option, and then after the flight, take a look at the telemetry to see what the glide slope was. Then, adjust ALT_HOLD_PITCH_LAND to get the glide slope that you want. Once you have that, then it is time to try an autonomous landing. Of course, until you get everything adjusted properly, it will be best for you to be ready to take over the controls if the plane is coming in too low or too high.

Without a barometer or ultrasonic, it is hard to get accurate height control, so you have to select numbers that are conservative. Basically, you have to come in high, shut the throttle, and trim the pitch to get the glide angle you want. Because the throttle is off, obviously the plane will eventually land.

Of course, the wind is a key factor. Just the right amount of head wind is a big help in keeping the plane from gliding too far before touchdown.

Best regards,
Billu Bhaiya
Comment by Rana on June 20, 2010 at 8:28am
Hi Billu Bhaiya !

Many many thanks for sheding some more light on the landing part. There are I2C based small ultrasonic range finders which provide centimeter level accuracy.

One such is being used in my UAVX (Quadrocopter, for autonomous landing and also for hovering at very very low altitude.

Since you already developed I2C interface firmware library to communicate with the Magnetometer, sharing the same bust is it possible to add ultrasonic range finder too, because the UDB is also being used for Helis also.

While the plane is gliding @an angle to land and the throtle is also shut off, once the ultrasonic range finder measures 1-2 meters distance from ground, then the gliding angle which may be set to say -10 or -15 has to immediately made +ve 5 to 10 by doing so precision safe landing will be achieved. which is equivalent to landing made by expert pilot.

This input of mine will can be a very important feedback, because this first time UDB has entered into autonomous landing there is long way ahead.

Thanks & Best Regards

Rana

Comment

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

Join DIY Drones

© 2014   Created by Chris Anderson.

Badges  |  Report an Issue  |  Terms of Service