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.
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)
Special thanks to the MatrixPilot development team.
GliderUav
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.
2016
2017
You need to be a member of diydrones to add comments!
Great input. I already have a new define for spoiler input, so at least i was on the correct path. I did not define an output since I don't have a physical output, it would strictly be mixed in with the two aileron outputs.
I started adding code for mixing, but I didn't realize that you had butterfly mixing in your code... not sure how I skipped over that, but i'll be sure to use it.
Good idea on the failsafe. I'll probably add code to initiate a landing sequence in the event that altitude is lost and there is insufficient lift conditions. Won't help if the plane comes down over trees or water, but it's better than nothing. ;)
I saw one of your posts from May24 and you had some patch files there. Your patches mention r3195 in their names, but your post said that you used r3193... I assume that it is probably against r3195 and will start there.
Also, do you have new code against the latest revision that you'd like tested? It'll take me a while to get up to speed with this project, but I would love to contribute.
GliderUAV > Jason WesterveltJune 20, 2014 at 12:16am
Hi Jason,
Yes, r3195 is the right one.
I don't have specific things I would like tested, but I will keep it in mind.
Thanks for your offer. I would advise you to join the uavdevboard forum. Let the developers know what you are working on, and maybe contribute ideas and code.
OK, so the current plan is to use a SPOILER_INPUT_CHANNEL to go along with the FLAP_INPUT_CHANNEL. I'm using the throttle channel from the radio in my case, but others with better radios can use dedicated channel (I just have a lousy DX6i and two channels are on switches, not potentiometers, so I am putting the otherwise wasted throttle stick to use).
For my case, I am setting THROTTLE_INPUT_CHANNEL to unused since I don't have a motor.
In addition, I am adding code a pair of defines, USE_FLAPERONS and USE_SPOILERONS to options.h .
If either of these are defined, the mixing code will then use the flaps and/or spoilers as ailerons primarily, and then mix in the input from SPOILER_INPUT_CHANNEL or FLAP_INPUT_CHANNEL. The user will obviously need differential control over flaps and/or spoilers for this to work, but I should be able to make the configuration somewhat intuitive and straight forward. The rest of the mixing, including the butterfly mixing that you set up, should work with my modifications.
The code changes compile fine, and hopefully this weekend I can get a video of my bench setup while it is running in the HILSIM to test these changes prior to sharing my code.
GliderUAV > Jason WesterveltJune 21, 2014 at 6:08am
Jason,
Sound good. I will try to take this an put it in my
patch as well, we may try to stay in sync on this...
Or, ask the team to adopt some of it in trunk, even better.
I have posted a HILSIMSetup.txt for testing in Hilsim, hope that helps.
Thanks for the code update. I'll take a peek and see what I can do to get it working in my case. I'm uploading a video now. I don't have my avionics inside my model at the moment since I am doing bench testing, but the way that I have my servos laid out should make the flight surface configuration very evident.
If not, here is an aircraft with spoilerons. In this case, left aileron input causes the left spoiler to deploy, decreasing lift and drag on the left wing causing a simultaneous roll and yaw to the left. Autocoordination, in a sense.
The spoiler channel input would move both surfaces up at the same time, spoiling lift for the entire airframe. With full spoiler, roll is still accomplished, but by reducing spoiler deployment on the opposite wing. In the picture below, the configuration could be representative of zero spoiler + left aileron, or full spoiler and left aileron. In either case, the spoilers can only move upwards from the top surface of the wing. They are like ailerons with half the normal range of motion, and placed on top of the wing instead of on the trailing edge.
I have been following your work for a while now and I am quite impressed. I own a 100-inch wingspan sailplane with rudder, elevator, and spoileron controls. I've been wanting to do a long distance flight with it and give the plane some degree of autonomy, but I've been hesitant to buy an autopilot module because there are two really promising solutions.
First, there is your project and code that has been released to the public. Your code appears to run on the UAVdevboard. The other project, the ThermoPilot, targets the Ardupilot hardware. As is the case with your project, I've followed the ThermoPilot project for quite some time. Unlike your project, however, the code for ThermoPilot has not been released and it appears that it may never be.
Luckily, I just learned that the uavdevboard does support hardware-in-loop (HIL) simulation via X-Plane, so I can finally justify buying one of those boards and testing out your wonderful code. Not having HIL support was the one reason I held off on making a decision. Now the only question is whether or not your code will work well with RES gliders (rudder-elevator-spoilers), or in my case, rudder-elevator-spoilerons.
Let me know if a lack of actual ailerons is going to be an issue with your code. I can always contribute to the code if modifications are needed. Huge thanks for putting the time into this project and providing the community with the code and all of your amazing videos.
Replies
Great input. I already have a new define for spoiler input, so at least i was on the correct path. I did not define an output since I don't have a physical output, it would strictly be mixed in with the two aileron outputs.
I started adding code for mixing, but I didn't realize that you had butterfly mixing in your code... not sure how I skipped over that, but i'll be sure to use it.
Good idea on the failsafe. I'll probably add code to initiate a landing sequence in the event that altitude is lost and there is insufficient lift conditions. Won't help if the plane comes down over trees or water, but it's better than nothing. ;)
I saw one of your posts from May24 and you had some patch files there. Your patches mention r3195 in their names, but your post said that you used r3193... I assume that it is probably against r3195 and will start there.
Also, do you have new code against the latest revision that you'd like tested? It'll take me a while to get up to speed with this project, but I would love to contribute.
Hi Jason,
Yes, r3195 is the right one.
I don't have specific things I would like tested, but I will keep it in mind.
Thanks for your offer. I would advise you to join the uavdevboard forum. Let the developers know what you are working on, and maybe contribute ideas and code.
Best wishes,
Kees
OK, so the current plan is to use a SPOILER_INPUT_CHANNEL to go along with the FLAP_INPUT_CHANNEL. I'm using the throttle channel from the radio in my case, but others with better radios can use dedicated channel (I just have a lousy DX6i and two channels are on switches, not potentiometers, so I am putting the otherwise wasted throttle stick to use).
For my case, I am setting THROTTLE_INPUT_CHANNEL to unused since I don't have a motor.
In addition, I am adding code a pair of defines, USE_FLAPERONS and USE_SPOILERONS to options.h .
If either of these are defined, the mixing code will then use the flaps and/or spoilers as ailerons primarily, and then mix in the input from SPOILER_INPUT_CHANNEL or FLAP_INPUT_CHANNEL. The user will obviously need differential control over flaps and/or spoilers for this to work, but I should be able to make the configuration somewhat intuitive and straight forward. The rest of the mixing, including the butterfly mixing that you set up, should work with my modifications.
The code changes compile fine, and hopefully this weekend I can get a video of my bench setup while it is running in the HILSIM to test these changes prior to sharing my code.
Jason,
Sound good. I will try to take this an put it in my
patch as well, we may try to stay in sync on this...
Or, ask the team to adopt some of it in trunk, even better.
I have posted a HILSIMSetup.txt for testing in Hilsim, hope that helps.
Greetz,
Kees
Jason.
Here is my raw patch for r3201.
Do you have a video to show how the surfaces of your plane (or similar) move, i cannot visualize them?
Good luck,
Kees
LET_trunk_r3201.patch
Thanks for the code update. I'll take a peek and see what I can do to get it working in my case. I'm uploading a video now. I don't have my avionics inside my model at the moment since I am doing bench testing, but the way that I have my servos laid out should make the flight surface configuration very evident.
If not, here is an aircraft with spoilerons. In this case, left aileron input causes the left spoiler to deploy, decreasing lift and drag on the left wing causing a simultaneous roll and yaw to the left. Autocoordination, in a sense.
The spoiler channel input would move both surfaces up at the same time, spoiling lift for the entire airframe. With full spoiler, roll is still accomplished, but by reducing spoiler deployment on the opposite wing. In the picture below, the configuration could be representative of zero spoiler + left aileron, or full spoiler and left aileron. In either case, the spoilers can only move upwards from the top surface of the wing. They are like ailerons with half the normal range of motion, and placed on top of the wing instead of on the trailing edge.
Hope that helps.
Hi,
I posted a new video: Local Endurance Thermalling mission in MP
Cheers,
Kees
Kees,
I have been following your work for a while now and I am quite impressed. I own a 100-inch wingspan sailplane with rudder, elevator, and spoileron controls. I've been wanting to do a long distance flight with it and give the plane some degree of autonomy, but I've been hesitant to buy an autopilot module because there are two really promising solutions.
First, there is your project and code that has been released to the public. Your code appears to run on the UAVdevboard. The other project, the ThermoPilot, targets the Ardupilot hardware. As is the case with your project, I've followed the ThermoPilot project for quite some time. Unlike your project, however, the code for ThermoPilot has not been released and it appears that it may never be.
Luckily, I just learned that the uavdevboard does support hardware-in-loop (HIL) simulation via X-Plane, so I can finally justify buying one of those boards and testing out your wonderful code. Not having HIL support was the one reason I held off on making a decision. Now the only question is whether or not your code will work well with RES gliders (rudder-elevator-spoilers), or in my case, rudder-elevator-spoilerons.
Let me know if a lack of actual ailerons is going to be an issue with your code. I can always contribute to the code if modifications are needed. Huge thanks for putting the time into this project and providing the community with the code and all of your amazing videos.