Soaring/Gliding for Planes

Hi Manauel,

I see you’re using a recent beta, but the recent soaring changes aren’t yet in the beta builds, only latest. So I’d recommend you use latest. The next beta will have the soaring changes.

The actual problem is that you have TECS_SPDWEIGHT=1.0, so the autopilot is raising the nose to try to climb and is stalling. The recent soaring changes override TECS_SPDWEIGHT to 2.0 internally when soaring is enabled and is suppressing throttle, so this is no longer an issue

Sam

Hi Sam

Thanks a lot for your help!

it workes now!
But it I had some problems to upload the FW. In Mission Planner (V 1.3.70) the stable FW for planes is still 4.05. And I was not able to upload the hex-file to my Pixracer. Mission Planner always asked if the destination board is a linux. After I hit no - there was a secend question - and finaly the update cancelled.

With QgroudControl it was not possible to upload a hex file. This program requires bin (and other files) *.hex are not supported.
I could finally install FW4.1 with QGroudControl via developper build.

I still have a question:
Which parameter is responsible for the glide-speed?
TRIM_ARSPD_CM???

Hi Samuel, Manauel.
Could you explain how you installed the firmware a little more. I tried to load the bl_hex file and also the normal .hex file with MP and Qgroundcontrol om my Matek F765 wing, but got errors.
Could you give some hints how to install via the developer build. Is there somewhere an explanation?
I am now flying with arduplane 4.0.5 but like to improve the thermalling on my Cirrus 3,5 m. F5J. (No contests of course).
Thanks, Maarten.

Hi Maarten,

Could you try to upload the .apj file please? I think this is the best one to upload.

Sam

Hi Manauel,

Yes TRIM_ARSPD_CM sets the glide speed in AUTO and LOITER. In CRUISE and FBWB modes it is set by the throttle stick with reference to ARSPD_FBW_MIN and MAX.

Sam

Hi Sam.

Thanks for the reply. I was succesfull on the first try with the .apj file. I downloaded it in my Radian Pro for testing. I am looking forward to test your program as soon as possible.
On the stable 4.0.5 it took me quite some time to tune all the parameters, but while flying in a thermal I had only occasional succes. Also the cruise mode while searching thermals did not behave as usual. Not tracking on course.

Maarten.

Hi Maarten,

Good to know. There have been quite a few fixes recently merged so I’m keen to see if you still see the same issues.

Sam

Hi Sam.

Thank you for all your work and sharing this with us. I really appreciate that.
After uploading the .apj 4.1.0dev I also inserted a SD Card. Next I had some arming problems. I switched EKF2 off and EKF3 on. Still arming RC problems that in the end disappeared when I increased the deadzone (DZ) on 2 servo´s from 30 to 100 usec. (Flew before with AUTO_TRIM.)
Yesterday there was not so much wind (BFT 1…2) so I changed SOAR_POLAR_LEARN to 1 and started flying and tried to soar very gentle. But after landing the SOAR_POLAR_CD0 .027 and SOAR_POLAR_B .031 where unchanged. So thanks to post #89 for the Radian Pro I changed that through Qgroundcontrol to .042 and .033. I only had a second flight that showed CRUISE mode was working on average course, but the plane deviated heavily from from that, probably already looking for a thermal? It actually gained some altitude. Suddely it started LOITER mode only to descent rapidly. Strange.
So I will make more flights to test the software.

Maarten.

HI Maarten,

Thanks for testing. I’d like to see why the polar parameters weren’t updated - could you upload the log somewhere?

It shouldn’t go off-course in CRUISE mode - the only time any soaring guidance is done is in LOITER mode.

Sam

Hi Sam.
Just send you a PM for the .bin and .param files.
It seems that I was unable to change the SOAR_POLAR_LEARN parameter to 1 for some reason. I am trying to find out why.
Thanks for your time.
Maarten.

Hi Sam.

Thanks for your quick reply.

  I will send you the .bin and .param file of 1 flight through

WeTransfer because of size. You will receive an Email from them
for download. (150 MB).

  On my SD card are 12 files from 2 days and I have looked at all

the parameter files. None of them had SOAR_POLAR_LEARN to 1. This
could explain why the 2 parameters are not updated. On the field I
searched for SOAR_POLAR_LEARN on Qgroundcontrol on my handy, but
was unable to find it. However when I used the search box, it was
found and I was able to change its value from 0 to1. When I
searched it for the second time, it was confirmed 1. Now in the
log they are all 0. The only reason therefore I could think of,
that a restart of the F765 Wing was needed, which I did not.

  Now at home I have changed it with MP, and it stays 1 after

restart.

  I still do not understand the ZigZag course in CRUISE mode, maybe

you can find something? I just started learning reading the log
files.

Thanks for your help.

Maarten.

Hi Sam.

After installing QGC Daily ver 2020-05-20 I was able to set the SOAR-POLAR-LEARN on my handy, as confirmed through MP. I also tried QGC ver 1.0.6 and QGC ver 4.0.6, both not actually changing the parameter. So happy with that.
However all 3 tested QGC versions showed up with the warning:
Parameters are missing from … Missing params:
1: Compass_Primary.
I have so far ignored this warnings, as compass not needed with the wing version. The GPS derived compass course will be used I assumed. So I have now also changed COMPASS_USE from 1 to 0.
(Use GPS course). Will test fly asap and let you now.

Maarten.

I went flying today and was able to set the SOAR_POLAR_LEARN parameter to 1 and the 2 other parameters were set automatically during flight. So this seemed to work as expected now. The CRUISE parameter worked much better now, probably because of the new compass settings. There are many compass settings I saw, takes some time to study.
Not enough strong thermals today to report the thermal behavier, as there was no switch to LOITER. I changed the Vspd from .8 to .6 m/sec.

Maarten.

I am using the latest Beta Ardupilot 4.0.5-FIRMWARE_VERSION_TYPE_BETA and tried the SOAR feature quite a bit… Given that this was over a 4 hour flight, I had a lot of opportunity and time to try to get the SOAR feature to work, but I did not have any real success with it. Ardupilot flys the plane very well, everything works great, But The SOAR feature would detect a thermal and go into LOIT mode, but it would just kind of do some random turns, and then go off in a straight random direction. I used the default SOAR settings on a really good thermal day, but any significant altitude gains had to be achieved by soaring manually. Once I got high enough, I tried to get SOAR to work a lot of times, but with no real results other than going into LOIT mode and then some random turns then eventual random straight heading.

I heard that SOAR was going to be improved with ArduPilot 4.2 , I am very anxious to try it whenever I can download a DEV or BETA version of it. I would love to test the new features of this, if there is a specific place I can download this for my Matek F765 please let me know. I will be happy to test anything that would help in development.


Mike

Hi Mike,

Glad to hear you are testing. The updated version is available by loading “latest” firmware from https://firmware.ardupilot.org/ . It has recently been used in some very successful flights by a commercial company.

I have also added some builds here here for a feature still in early testing to learn the glide characteristics of the plane. More information in my post here Soaring/Gliding for Planes

Sam

Hi Sam,

Thank You for the information !!! I will upgrade the firmware today and give it a try :slight_smile: Have there been any changes in recognizing and staying in thermals in the newest firmware ???

The learning to glide is a great idea, that I would eventually set up later. But In my case there is no need for Ardupilot to learn the characteristics of the glide, I just have Ardupilot set to maintain a pitch and it flys perfectly. The thermals are so strong ( 10 Meters per second is pretty easy to find ), that if Ardupilot would have the ability to just stay in a thermal, it would climb very well.

I suspect that I might have some settings that need to be changed for the plane to recognize lift and stay in it ?? And also for Ardupilot know when to stop thermaling when lift is low and continue on course… Those are the biggest problems I am having at this point.

Mike

Hi Mike,

Yes there have been a lot of improvements in the newest firmware. The learning feature is actually to calibrate the expected sink rate at different airspeeds - which is important for the autopilot to calculate what the air is doing, but if the conditions are as strong as you say it isn’t that critical.

The main parameters you’ll need to change are SOLAR_POLAR_K and SOAR_VSPEED. The wiki has more info on what these do.

https://ardupilot.org/plane/docs/soaring.html

Sam

Short question about the dimensions of SOAR_POLAR_K.
The formula = 16xWeight/Area (weight in kg, area in metres squared) delivers for the Radian Pro:
16x1.15/(2x.2)=46
However when I try to change the value I get the error ¨Out of range¨, which can be bypassed by clicking on Yes. The range is stated as 0 - 0.5. Or should I use .46?
Thanks for your reply. By the way, nice setup Mike.
Maarten.

Hi Maarten,

Go ahead and hit ok on 46. I need to fix the recommended range.

Sam

Flew today with my Radian and encountered a problem and hope you can help me out.
My CRUISE mode works now very well, see post #152 and I use it to find thermals. When found my Qgroundcontrol reports: ¨LOITER mode¨, as expected. But instead the Radian seems immediately to switch to RTL. It is heading for the start point and starts circling at 100 meter altitude.
Thanks for your help.
Maarten.