Hello all.

I've been a long time lurker on this website, checking it almost daily. The last couple of months i was working on my bachelors project which consisted of designing from scratch an autopilot for a RC glider. During that time, this website proved to be invaluable and i would like to share my work hoping that, in return, it could help someone else.


The project was separated in two parts: a semester project which then continued as a bachelors project.

During the semester project, all the hardware was deigned, as well as the low level embedded programming.


During the bachelors project, an initial model of the aircraft was created in Simulink using XFLR5 and AVL.

3689416104?profile=originalThen using experimental data logs, I was able to determine simple transfer functions which were used to compute the different PID gains.


In parallel, I programmed a ground control station (Mission Control) which was greatly inspired from happykillmore's GSC (as you can probably notice).


The aircraft i used for the project was the AXN Floater from hobbyking. Here's a picture of the aircraft with the autopilot mounted:




For the final test flight, a small circuit was entered using the mission control application. The aircraft managed to complete two circuits before the battery ran out (it was the 8th test using the same battery). The two plots show the track the aircraft flew, and the pitch and roll closed loop angles:


For more details, you can download both reports here:

http://dl.dropbox.com/u/15692375/AXC-Glider%20Semester.pdf (Semester report)

http://dl.dropbox.com/u/15692375/AXCG%20Bachelor%20Report%20Public.pdf (Bachelor report)


If you guys have any questions / comments, or want more details feel free to ask :).


- Alex



E-mail me when people leave their comments –

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

Join diydrones


  • Hi Alex,

    Can u share the simulink file for the AXN model


  • Thanks :).

    I used microsoft visual studio and it was done in C#. I reused objects such as the instrument panel from the old GSC that was used here at DIYdrones (Happykillmore).

  • Hi,

    Very nice project Alex ;), I've one question about GCS.

    Which programming language and soft did you develop ?

    Best regards,

  • Hello Alex,

    nice work !

    I´m also interested in thermal soaring and cross-country.

    I am developping sensors for optimized flying my F3J-sailplane:

    Speed senor for low cruising speed like in thermal-circling or in thermal-searching-phases going down to 4m/s (15km/h). For this I use two principles. First my vortex-flowsensor, which works without the need of measuring static pressure. Second is a classical difference-pressure-measurement, but in my case I use a thermal-flow sensor which is much more sensitiv for low pressure differences as i.e. the piezoresistive transducer-senor-types are commonly used.

    For accurate flying maneuvers I have developped a "anti-yaw-automatic". For measuring the yaw-angle I use may 5-hole-probe or my mechanical angle-sensor. With my mechanical presicion-senor I calibrate my 5-hole-probe values for yaw.

    All my sensors are optimized for low cruising speeds in thermal soaring.

    Measurements are easy while flying forward with high speed.

    Please have a look at my project here:



    My next steps are "plain-flap-automatic" and automatic thermal soaring ...


  • Hi Alex...

    I am so interested in your mission control application. I am struggling with instrument cockpit and Google Earth API. I have many bugs in my application and am finding out mathematical formula for controlling instrument cockpit. if you dont mind could you tell me how to design good mission control like yours and how to handle all data streaming into my application from any sensors I have such as IMU, GPS, etc?.
    do you have plan to share the code of your mission control as my main reference?

    thank you...

  • Developer
    Many Thanks !  I will study it well.
  • I will now share my source code. You can download the files here:


    the main.c is located in the src folder. the libraries folder contains the different libraries used (CMSIS 2 DPS library + FatSD + STM32 peripheral libraries). the drivers folder contains all the low level functions used to communicate with the different sensors, etc.

    - Alex
  • nice one alex. I am sure your project inspired many of us here, me especially ;-)
  • @Pitlab


    You are absolutely right, I have forgotten to mention that I used this offset signal amplified for high resultion ground altitude, this is why I need the offset and gain :P. However, amplify your altitude signal is a good tip to capture the 1st derivative for a low resolution ADC.


    But I completely agree, if you want just derive it, it is useless to add any offset as it is a source of noise.

  • @Hector, If you want to derive altitude signal, you don't have to add mean sea level offset from DAC, because deriving the signal you will loose the DC component. Also using DAC and amplifier before derivativing is additional source of the noise. I could recommend to derive raw signal from pressure sensor and use low leakage capacitor. It works well for me, for example in that module: http://www.pitlab.com/pneumatic-module.html
This reply was deleted.