"Cruise control" for an e-glider.

I am building an e-glider that is controlled normally until you release the sticks. Then the autopilot kicks in and keeps the model around and starts looking for thermals or starts the motor when the glider is too low. No waypoints, its all about finding thermals.


Here is a video of my first long autonomous flight.

Reichard Champion ATV 2011 from Glider UAV on Vimeo.


2013 Update

Finally, an update about my project:

I have converted the telemetry log into subtitles, so You can see what's going on. This video explains a "Thermalling method for Model Glider Autopilots" in more detail.

I am gradually replacing my autopilot code with MatrixPilot. Please have a look and feel free to comment.


2014 Update

Local Endurance Thermalling mission in MP

Currently I fly with a Topmodel CZ Linea with an Auav3 autopilot and a Topmodel CZ Fantasy with a UDB5 autopilot board.

Recently I removed my "ATV autopilot pic-chip", so that I now have a 'MatrixPilot only' solution.
I wrote a LOGO script and some extra commands.

!!!!!   The code is public and free to use   !!!!!

I posted al the needed code and mods here: (May 24 '14)

   "Support for (E-)Glider local endurance thermalling mission in MP"
     Post on MatrixPilot forum

Special thanks to the MatrixPilot development team.


2015 Update

MatrixPilot got upgraded with the helical turn method. I changed my code to follow this development.
To add the auto land function, i needed better brake control. After that i created the auto landing script.
The codebase has moved to Git. My code is here: https://github.com/KeesGuijt/MatrixPilot.



Views: 8547

Reply to This

Replies to This Discussion

Hi Jason,

Good to hear from you. Too bad you had so little time for your hobby.

Yes, I have been working on my code. Not too much has changed, but I have made some improvements that I'm dieing to try. I will make a fresh patch for you.

All the best,


Hi hft seeker,

An ultralight could be controlled by MatrixPilot. However, if you want to use LOGO, as I did, the range you are looking for may be an issue.

Maybe this is usefull:

MatrixPilot range

You could post a question about this on the MP discussion group.

Thermalling would, on the other hand, be a great way to extend your range!

Hope this helps,


Bill Premerlani made a fix to increase range of MatrixPilot some time ago. A person called Florin on the uavdevboard discussion group has tested long range of MatrixPilot on a uavdevboard in HILSIM with X-Plane 10. He flew a large airliner from Europe down past the equator to New Zealand (or may it was Australia) and back using the Autopilot in Autonomous mode. It all worked OK. As Kees says, by posting on the uavdevboard discussion list, you would probably get more answers. 

Best wishes, Pete

Hi Pete,

You are correct, I increased the navigation range of MatrixPilot some time ago at Florin's request. It now uses 32 bit integer arithmetic with 1 meter resolution for navigation, so waypoints can be anywhere on the globe and any altitude.

Regarding MatrixPilot LOGO, it should have unlimited scope as well, provided each LOGO flight segment is no longer than 32 kilometers, but that is a natural fit to the way LOGO works.

Florin's HILSIM flight with MatrixPilot was from Romania down to Australia, up to Pakistan, then back to Romania. I think he was flying a simulated 747. The flight took 36 hours.

Florin also recently did a balloon drop of a delta wing glider with MatrixPilot from 30 kilometers altitude and 20 kilometers down wind. The entire mission, from balloon launch to land, took around 3 hours. He has an interesting video that he reconstructed from the flight data showing a simulated view seen from the plane. It was basically tumbling for a while in 1/100 air density, then fluttering when it first encountered some air, and then settled down quite nicely. It flew in a straight line back to over Florin's head, then circled down to him.

The only modifications we made to MatrixPilot for the balloon launch was to integrate a cutdown function that would release the plane from the balloon either on command or in a fail safe condition.

Best regards,



I think that MatrixPilot LOGO has unlimited range, but it has never been tested beyond 32 kilometers.

However, it should be easy enough to test the LOGO range using HILSIM, so if anyone is interested in using LOGO for long range missions, let me know, I will do some testing to find out.

Best regards,


Hi. I had a nice flight I want to share with you.

First of all, my compliments to Bill for making helical turns a reality in MatrixPilot. Control is much smoother now.
When in auto mode, i can use fly by wire to guide the glider to a new thermal if i find one, just by leaning over the aileron stick a little,
knowing the turn will be coordinated perfectly (check the yaw string in the video!).

I combined the new helical turns code with some features to
support a new AIRFRAME: AIRFRAME_GLIDER. Specifically to make autonomous glider landings possible without a motor. Before I
was using brakes to limit altitude when in thermals. Now i use brakes to loose altitude when on a glideslope.
I took the motor control logic and hacked it to control brakes. Then i needed a nice way to integrate this with LOGO.
To my surprise, it can be done using only SET_ALT() and the F_LAND flag.
After that i realised that while model crashes can happen sometimes, most damage is caused when the model is allowed
to accelerate until it meets some unforgiving surface. Overspeed protection can prevent much damage in some cases. It uses the desiredSpeed
variable and starts braking when aispeed gets above 150% of desiredSpeed.
With the AIRFRAME_GLIDER i added a LOGO landing example script. It requires the WIND_FROM_ANGLE() command.
The automatic landing script for LOGO allows to connect to the correct landing circuit, even if wind has shifted after a long flight.
Depending on the situation of your flying field, you can script left or right circuits for multiple wind directions.
If there is some charge left, it can use the motor to climb a little first, or use brakes to descend to the starting point of the circuit. The phases of
the circuit are Downwind, Base and Final. Flareing is not implemented (landing is usually soft enough).

I had to switch from trunk to the MatrixPilot_wjp_helicalTurns branch. Trunk seemed to work at first (with a few fixes), but then i had some navigation and control issues.
Also, I found that the "Glide_Airspeed_control" feature no longer works (nor in the wjp branch). With flaps I was able to compensate, so airspeed can still be controlled a bit by LOGO.

The code can be found here: https://github.com/KeesGuijt/MatrixPilot

Reply to Discussion


© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service