"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: 8545

Reply to This

Replies to This Discussion

Here is a picture of the 270 deg. thermalling technique used by full scale pilots.....


Thermal Soaring is very interesting and enjoyable. Living in north Texas we don't have much slope lift so Thermal Soaring is how we do it. Once you learn to Find lift then you learn to get in it and ride it. If the lift is good and you can stay Centered in the bubble which is drifting with the wind you can go way up even out of sight in very short time, minutes. The nest trick is learning to Bail Out. This is not as easy as you may think because thermals are like vacuums and will suck you into the cloud above them. This happened to me when I first started flying sailplanes and I never say that Gentle Lady again. Needless to say I was hooked on Thermal Soaring. It is very easy to get flight times of 45 minutes to over an hour when conditions are right. I even thermaled  In the rain with a 200 ft. cloud ceiling once for about ten minutes and the hard part was staying below the clouds or fog. Thermals are bubbles of warm air that leave the ground about every 5 minutes and you can see them and feel them. As they leave they drift downwind as they rise upward. In a strong one you can stand a sailplane on one wing tip and almost spin your way right up. So when you get your thermal tracker working and start catching lift you then need to have a way to bail. This is a problem you want to have, right? One other thing, thermals are addictive. l started chasing free flight models when I was a child hundreds of years ago and still love it. You should always put your contact info on your model in case you loose it and someone finds it before you do. Gotta love it.

Hi Mark,

I couldn't agree with you more. Thermalling is addictive. Even more so in my part of the country, I live not far from the sea, with wind usually coming from the sea. But I wind comes from land, then chances improve. I too have to keep my model from "leaving into space". We have an altitude limit of 300m (1000 ft), so i programmed the butterfly-function (airbrakes) to gradually deploy above 300m. Also, the termalling code is turned off above 300m. It is nice to see how the model then gets glued to the altitudelimit as the thermal moves by. But sometimes even these measures aren't enough, and the model keeps climbing. I allways monitor the flight for these moments. Gotta love it.



Hi there! Im a mechanical engineering student, and im doing a project very similar to this. Neat to see that there other people who think this is worth perusing. I live in New Zealand.

Im in the very early stages of my project. Iv just received my APM unit so i can finally get started! Im using a radian for my airframe. I suspected that the wingspam (~2m) was too small, but it looks like you have achieved a working prototype with a similar size model.

Im happy to find that there are others apart from nasa developing these, it certainly makes it a little less intimidating! It looks like theres a small autonomous soaring community starting to develop.
IMO, one day this technology is going to rule! Longer flight time is always needed.
I agree! Once we reach the critical point where we can keep the aircraft in the air indefinitely, all kind of applications open up. It would be like a super low level satellite. I certainly believe this is attainable.

It sounds like GliderUAV has reached a stage where the glider is even more efficient than what is needed to maintain altitude. However there is still a barrier to indefinite flight time; the battery will eventually be drained by the flight computer and the servos.

Iv heard lots of ideas about using solar power to overcome this barrier. However the more solar panel area you add, the heavier it becomes, and the more power you need.. etc. It may become feasible if solar panels become light and efficient enough (another critical point).

Here’s another idea: use the excess lift to charge the battery. We could wire a motor and propeller in reverse to act as a generator. We would probably want it at the back of the aircraft otherwise it would destabilize it. I can’t think of any reason why this wouldn’t work. Once you get to a certain altitude you could load the generator instead of using air brakes.

I love the idea of robots that sustain themselves. Theyre robo-animals haha. Theres so many cool applications for this. You could have the glider follow you around like a pet, always hanging out within a few hundred meters of you. Man the future is going to be cool!



My motor is at the front, and sometimes starts windmilling on its own. Stability is not that bad then. I have also thought about modifiing an ESC so it can generate power and motor braking can be controlled at will. It's not that crazy.

Good luck with your project.

Im guessing that the drag would be proportional to the loading on the motor, so freewheeling would be the best case scenario. Your probably right though, the effect may not be significant.

Im sure that others have thought of the generation idea before. I just find it exciting because it seems like it would be relatively easy to implement and it allows us to overcome the last barrier to staying airborne. Well thats if you dont count storms and angry falcons!

I dont think that falcons will attack it =) Most of the birds ignore my rc plane =)


About that generator idea - I've thought about it already. The main concern is the efficiency of generators - it is lower than 100%, so not all energy could be used. Another thing - we just have to try and measure.


GliderUAV, how long can your software be aloft? Have you tried something like 6 hours or more? Thermals tend to change and to stop.



I'm still trying to make longer flights, but possiblilties are limited where I live. But if I don't need to use all of the the battery for motorclimbs, then there is plenty for running the servo's and electronics for serveral hours. The software has no time constraints.

First having flown thermal ships for years let me say yes birds will attach your airplane. They will fly under it then flip on their back and grab it shake it tear it up and do all sorts of damage. In most cases they just fly away from it but they can and  will attack if they feel like it. Thermal ships were some of the first to use computer radios and advanced composite building techniques. One of the tricks is to change the airfoils by reflexing the trailing edge. This lets you get to the next thermal quicker and loose less altitude. Airspeed is altitude we say. when yo get in lift you add camber to maximize lift by lowering the trailing edge a couple of degrees. Remember if you are not in lift then you are in sinking air. Some times sink can be very powerful. If you want to hunt for lift and you can't see the aircraft then you are going to have to detect lift and sink and determine the best way to move between them. Sounds fun. Good luck.



I received a question about how I wrote my navigationcode.


1. I store the GPS position when I start the motor for the first time

2. A fixed value is coded to limit max distance to the centre

3. Every second, the distance North/South and East/West between the startuppoint and the current location is calculated.

4. the two distances are devided by the fixed factor (2) to form x and y coordinates for an array

5. a lookup is performed in this array:


-- aimed right of centre, for left turns
const byte NavMatrixSoft[]= --
 30, 30, 22, 22, 22,  7,  7,  7,165,165,
 30, 30, 22,  0,  0,  0,  0,  7,165,165,
 68, 68,  0,  0,  0,  0,  0,  0,142,142,
 68,  0,  0,  0,  0,  0,  0,  0,  0,142,
 68,  0,  0,  0,  0,  0,  0,  0,  0,142,
 52,  0,  0,  0,  0,  0,  0  ,0,  0,157,
 52,  0,  0,  0,  0,  0,  0,  0,  0,157,
 52, 52,  0,  0,  0,  0,  0,  0,157,157,
 75, 75,105,  0,  0,  0,  0,112,120,120,
 75, 75,105,105,105,112,112,112,120,120
}     -- headings / 2


6. If the found value is 0 then no action is taken. If the value is not 0 then the value is multiplied by two, and the autopilot will turn to this new heading, bringing the aircraft back in the area.


This method is simple, has a small footprint and is low on CPU-load. I found the aircraft will fly a random pattern in the area, so few spots are missed in search for updrafts.

Reply to Discussion


© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service