Servers by jDrones

Soaring/Gliding for Planes


(Andrey Kolobov) #41

@tridge: That’s great, I’ll update the instructions!

Also, the instructions contain a reference to a zip archive with X-Plane airfoils. Downloading that file from its source on an X-Plane forum requires registering for that forum, which is an annoying extra step that would be good to skip.

I actually have a copy of that archive. Where in ArduPilot or ArduPilot_wiki repos can I put it?

(tridge) #42

how big is it?
We could host it in a git repo, or if large we could host it on

(Andrey Kolobov) #43

Really small, 380 KB.

(tridge) #44

perhaps under Tools/Frame_params/XPlane/ would be good?

(Andrey Kolobov) #45

Done, please see PRs


(tridge) #46

merged, thanks Andrey!

(Andrey Kolobov) #47

Great, thanks Tridge!

The soaring SITL wiki page is now at

(wkf94025) #48

I have been out of RC since last summer, and just checked in here this morning for the first time in many months. Very excited to see what you all are up to. I have several gliders ready for this new code, including Radian, Radian XL, Radian Pro, Gracia 3.1 meter full house, and Pulsar 3.2 meter RES. . Looking forward to autothermaling them all at some point. Nice work on the documentation, Sam.


(wkf94025) #49

Per Andrey’s post a few weeks ago, I would be interested in more details on calculating the drag parameters. I am planning to use a Radian XL, possibly followed by Radian Pro and/or Radian. There is decent data on Radian and Radian Pro L/D (~12:1) and sink rate (~2ft/sec) on RCG threads. Min sink speed seems in the ~17mph range. Not so much flight data for Radian XL, although it’s not dramatically different from its 2m bretheren.
Here are some stock stats or the Radian XL:

  • Wingspan: 102.40 in (2.6m)
  • Overall Length 56.90in (1444mm)
  • Wing Area 946.45 sq in (61.05 sq dm)
  • Flying Weight 79.5 oz (2254g)
    It thermals well, better than Radian Pro, not quite as good as Radian, and is somewhat porky.

Sam, in your documentation, you talk about
"SOAR_POLAR_K = 16*Weight/Area (weight in kg, area in metres squared)."
Is area wing area only, or wing + elevator? I’ve seen both methods, though wing-only seems more common.

Appreciate any guidance on best settings for the SOAR_POLAR_* parameters for the Radian XL. While many of you focus on debugging via SITL, I’m happy to try FITA (foam in the air).


(wkf94025) #50

ArduSoar team,

Regarding the documentation, I think there are a couple typos in the “Tune the TECS” section:


Also, a question about that TECS tuning section: where it says “Launch the aircraft and put it in AUTO mode. It should climb to SOAR__ALT__CUTOFF and then begin a gliding descent. Watch the telemetry graphs or look at the Dataflash logs. Is the aircraft maintaining the demanded airspeed?”

Can you clarify what the demanded airspeed is? Looking at ArduPlane complete parameter list, I could imagine it’s ARSPD_FBW_MIN, or TRIM_ARSPD_CM, or MIN_GNDSPD_CM, but would rather not guess.

Do TECS_SINK_MIN or TECS_SINK_MAX affect ArduSoar code at all?

Lastly, I have been using terrain following and stall prevention, but I am wondering if it’s best to disable both of those for ArduSoar testing.


(Marco Robustini) #51

Hi, today i’m testing the soaring mode with a “Elipsoid” glider, I see that the motors rightly doesn’t come into operation during SOAR mode and i think is normal, but often the glider stumbles as if he completely ignores the stall prevention (enabled here) and sometime roll to one side because it doesn’t keep up the right speed to keep it from falling like in FBWA without SOAR enabled.
Tested in FBWA, FBWB and Cruise, with SOAR mode enabled is a disaster, when is disabled my glider files in FBWA like a bird in the thermal.
Play a lot with all the SOAR parameters without good result, in my glider I don’t have installed the air speed sensor.


(Samuel Tabor) #52

Hi all,

Thanks for the feedback on the docs @wkf94025 . I’ve updated the page to fix the typos and specify the log items to use.

I’m also aware that I need to give some more guidance on the drag polar parameters. I was hoping to avoid specifying the manual method of calculating / testing for these parameters as it is a bit cumbersome and time consuming.

I’ve been experimenting lately with a method to learn these parameters in flight that shows promise. However this is likely to take some time to fully test so for now I’ll put together a better explanation.

TECS_SINK_MIN and TECS_SINK_MAX do not directly affect the soaring code. These are used by the TECS to work out achievable rates of change of height/speed so will have some bearing on the response to demanded airspeed changes. You should set them according the TECS docs.

For terrain following, the key thing to realise is that the soaring code effectively short-circuits all throttle control logic to zero the throttle when in the gliding phase, and the TECS is set up to use pitch to respond to airspeed only. This means that when in the gliding phase there will be no response to changes in demanded altitude. A nice enhancement would be to make SOAR_ALT_MIN, MAX and CUTOFF relative to local terrain height rather than home when terrain following is being used.

I have not tried to use stall prevention with soaring, but I don’t anticipate any issues. Just remember that best thermalling speeds are often quite close to stall, so do not set ASPD_FBW_MIN too conservatively (too high).

@marco3dr sorry to hear you’re having issues, soaring in master has only been testing in simulation so there may still be issues. Especially as operation without an airspeed sensor has not been tested. Do you have a log file?

(Marco Robustini) #53

Oh my God, only in the sim? LOL!
Yes, i don’t have the airspeed in this glider, please read again my post, edited now.
I’ve all the DF log of today, but tomorrow i try again.
The main problem is the stall, doesn’t keep the correct minimum speed when there are no wheater conditions to make it go up.
To avoid false positives in addition to check the “soar vertical speed” when entering in Loiter must also check the barometric height, because during an “over roll” it might start to recovery fast with “nose up”, and it will believe it will be in the thermal when it’s not.
Please check and improve the code, thanks!


(Samuel Tabor) #54

Marco, I’ve looked into the code to see what happens without an airspeed sensor. It looks like the TECS controller will attempt to use pitch to maintain altitude rather that airspeed; i.e. internally override TECS_SPDWEIGHT to 0. This won’t work as the throttle is overridden to zero and explains the stalling you’re seeing.

I’ll look at changing this behaviour, but for now I’ll update the docs to make it clear that an airspeed sensor is required.

I’m not sure I understand your question about false positives. However if it’s concerning increases in altitude at the expense of speed these are already dealt with, as detection is triggered from increases in total energy rather than just altitude.

(wkf94025) #55

Thanks for fixing the documentation typos. I agree that a detailed description of determining drag polar data points is not simple. I think I have a basic grasp of the methods, thanks in part to your 2014 posts and the articles you linked to there. I’ve been studying some of the flight logs from last year from my Radian XL flying Spektrum telemetry with vario, GPS, etc., and I’m starting to get a good empirical sense for stall speed, sink rate, L/D, etc. Turns out that porky foamy isn’t as sleek a glider as I had thought numerically. But it can thermal, which is all that matters, right? Regarding lack of airspeed sensor, I can’t imagine the code working very well without one. Good point on the ASPD_FBW_MIN setting. And yes, making SOAR_ALT_MIN, MAX and CUTOFF relative to local terrain would be a nice enhancement to the existing capabilities.


(Marco Robustini) #56

Samuel, very good, in fact it was as I had assumed, the absence of the air speed sensor probably creates the problem I had.
Moreover Ardupilot doesn’t necessarily require the airspeed sensor for any other automation, so even the SOAR option should not contemplate it.
When you’ve implemented the code let me know that I try it in reality, thank you!

(tridge) #57

@Samuel_Tabor we could ask TECS to always fly in airspeed mode when soaring, even if there is no airspeed sensor. We hit a very similar problem with quadplane transitions without airspeed, when pitch is constrained by the VTOL control, and the non-airspeed algorithm in TECS gets very confused as the throttle/pitch control no longer works as expected.
I think the same thing happens when the motor is forced off in soaring.
To fix it you can just call:
when soaring is active and TECS will fly using the synthetic airspeed estimate. Not nearly as good as having a real airspeed sensor, but at least it has a chance.
The other option would be to refuse to activate soaring if an airspeed sensor is not installed. Do you have a preference?
Cheers, Tridge

(Samuel Tabor) #58

Thanks @tridge, I think we should allow use of synthetic airspeed but make it clear that an airspeed sensor is preferred.

(Marco Robustini) #59

Hi Andrew, can you merge this fix?

(tridge) #60

@marco3dr if you want to try it now, then you can just set the TECS_SYNAIRSPEED parameter to 1. That tells TECS to always treat synthetic airspeed like real airspeed if you don’t have an airspeed sensor.
What I’ve proposed to @Samuel_Tabor is that we make that parameter be automatically true when soaring, but you can try the effect of it now by setting that parameter.