I tested the latest DEV version of ArduPilot in my Phoenix 2400 sailplane with Matek F765 flight controller. ArduPilot flys the plane very well, and thermals were very strong, performance is not a problem. This was over a 5 hour flight with great conditions, and I gave SOAR every opportunity to work. What ended up happening is that I would let SOAR fly until the plane lost most of its altitude, got to low, then I would take over thermaling manually, get high enough and try again. I did MANY MANY tries like this⌠I tried a lot of different settings, doing " WRITE " in the air, as landing for a setting change is not practical. See the pictures and explanation below for my analysys of what is happening, and what SOAR needs to do. I just could not get ArduPilot SOAR to stay in thermals, although it did try !!! This feature has awesome potential, and could easily outperform humans one day, so I hope you guys keep working on this.
SOAR would detect a thermal very well upon entry.
After thermal detection, SOAR takes much to long to bank the plane and enter a steep bank and circle. ( When I thermal manually, and I detect a thermal, I use a very large and fast AILERON INPUT, and get into a stabilized 45 degree ALMOST INSTANTLY. )
SOAR would usually catch the very far side of the thermal since it took to long to enter a bank, but this would still work if SOAR would measure where in the circle the strong lift was, and adjust towards the thermal.
In reality SOAR would see lift was weak in 75 % of the circle, and say " WEAK THERMAL ", even though 25 % of the circle was in VERY STRONG lift.
All that is needed is for SOAR to slightly offset its current circle into the area of strong lift. Centering into a thermal can NOT be done by GPS location of where the maximum lift was, as thermals are usually moving along with the wind⌠When soaring manually, I use ONLY HEADING to get into the area of lift. Centering needs to be only a small amount, and I accomplish this manually by reducing my bank angle for a couple seconds ( reduce to about 20 degrees bank ) when heading towards the area of lift, then immediately go into FULL 45 degree bank again for the next circle. This offsets me in the air mass just enough to center me in thermal. I repeat this small correction many times in one thermal as plane does tend to drift out of thermal over time.
I use a few circles to determine what quadrant of the circle the best lift is in, as it takes a bit for the plane and vertical speed readings to stabilize after banking. There is always a slight climb, or loss in vertical speed when entering a thermal, or after any large change in bank angle which should be ignored.
I wish I could put this into numbers and programming, because tracking and remembering where the strongest lift is in each circle is exactly the kind of thing an MCU would be really good at. My biggest limitation personally is remembering and averaging where the best lift was in 3 circles, and then making the needed 90 degree correction of where to use 1/2 bank so that I head into the thermal all in real time ( merely reducing bank when already in the quadrant of maximum lift does NOT work ). The correction must be made approximately 90 degrees ahead of maximum lift area so that bank is reduced when plane is headed TOWARDS the thermal. Once put into math and programming, ArduPilot SOAR could outperform a human by a large amount !!!
Soaring will initiate RTL if you get below SOAR_ALT_MIN as this is regarded as the âsafety altitudeâ. If you have a .BIN log from the SD card please post it and Iâll take a look.
Thanks for the detailed description. Soaring is configurable to improve some of aspects that you have described - specifically you can adjust the location of the initial guess of the thermal location using the SOAR_DIST_AHEAD parameter. Adjusting some of the minimum times might also help in your case. Drift with the wind is accounted for using the on-board wind estimation.
If you have a .BIN log from the SD card, please post it so that I can take a look - although the description is useful, itâs hard to make concrete recommendations without the data log.
Thank you for your response. I did adjust thermal size, increased minimum soar times by a LOT to give it every chance to center in thermal, but without success. While the initial thermal position guess was close enough to get partly into a thermal, it would not correct itself towards the thermal. Samual mentioned that wind drift is accounted for which is partly correct, but tells me the mistake to the approach to this.
GPS positions should not be used, this works great for finding ridge lift and lift caused by terrain features, but is a bad and overly complicted way to track thermals.
Thermals kind of track with the wind, but not perfectly⌠There is wind gradient, and shear, so you can not just track with wind and expect to stay in thermal.
Ardupilot wind esitmastes are far enough off, that using them to try to stay in a thermal will result in failure most of the time
I wonder if I could get you guys to try a different, and simple approach to this ??? You do not need to un-do what you have done, just make this an additional SOAR option for us to test, and then look at the real world results we post ?
Can you make a SOAR option that would totally ignore GPS once it enters themaling phase, and thermal based on measurements and headings as shown in the attached picture below ? Then go back to GPS and normal navigation once thermaling is exited. Basically, I could fly a very successful thermaling day without any GPS at all⌠This should be quick and easy to try, and you might just accomplish your goal in a much better and simpler fashion that you thought. I fly sailplanes in thermals a lot, and have better results that most people dream of using this simple method.
Glad to hear you are comfortable adjusting the parameters. The way the soaring is currently implemented is as a model-based architecture that, when properly set up, is capable of flying glider over a wide range of wing loadings and flight speeds. The kind of heuristic approach you are describing can also work, but as the current method is being used successfully to carry out all-day soaring flights fully automatically in a commercial UAV, Iâd like to see if we can make it work for you. If you can share some data from the flights youâre describing I can take a look at it.
Hi, SamuelâŚnice to meet youâŚas you may know, I am the ArduPilot wiki maintainer (amongst others), although a long time AP user, I have not tried the SOARing stuff yet (its been 40 years since I winched up an Aquila or Hobie Hawk)âŚI have been trying to actually use every vehicle in the wiki in order to make sure its clear for a newbie for that frame classâŚanyway, I bought a Phoenix 2400 and am anxious to see Mikesâ logs(which have his params) for it âŚ
as an aside, since I am not out for max alt or duration, but I do want both FPV and an airspeed sensor⌠i wonder just how bad I would be crippling it if I mounted the airspeed on one wing panel and the microFPV camera (microSwift or RC micro split) on the otherâŚwhile the tail view is interesting, I prefer a clear forward shotâŚthe airpseed sensor on the opposite wing for counterbalance would have the advantage of being out from the prop flowâŚopinion?
PS, @JetPilot Mike, now that I see you are on Samuelâs thread, no need to try to contact you thru your DL support threadâŚ
Hi MagicRub.
That went very well. I just dropped you 2 files and hope you can read them. Will fly tomorrow again, but there are only weak thermals forcasted.
Maarten.
Ardupilot is flying the glider very well, performance and they way the glider is flown by Ardupilot is VERY GOOD, better than needed to keep it in the air all day long. I soar manually in FBWA mode just because letting Ardupilot help fly the plane takes a lot of the work load off me when I am soaring manually for hours at a time.
The only problem I am having is that SOAR is not centering in and staying in thermals. It detects thermals, and I see the correct mode change messages " Thermal detected ", etc. etc. But it just does not center, even when in very good, strong thermals. It just kind of wanders around, gets out of the thermal, and then exits mode due to weak lift. I have read all the documentation, changed thermal size, set minimum soaring time to 5 minutes to stay in and keep trying after entering thermal mode, etc. etc. etc. It just will not stay in lift.
What I propose is to try a SOAR option that did not use GPS, but used the technique I describe above. You do not have to undo or change all the work you have already done, but put an additional option in SOAR like " NON GPS THERMAL CENTERING = 0 " as default, but let the user enable it by entering 1. The non GPS thermal centering method as shown in my diagram would be much easiler and faster to program, probably could be done in a few hours. Given the amount of time and effort you guys put into this feature, investing a few hours to try a more simple and effective approach would be well it. There is the potential to get a huge increase in capability and effectiveness of SOAR by trying a different, simple approach to finding thermal lift.
Hi MagicRub, Sam.
Thanks for all your efforts, greatly appreciated.
Just dropped another 3 files, 2 bins and one parameter.
Following the birds of prey I was chasing today for thermals in FBWA. When found switching to CRUISE mode to give the FC the oppertunity to switch to LOITER, what happened shortly after that. I expected the plane to thermal along with the birds as they got higher and higher, but not me. Instead the Radian flew linear back home as if RTL was switched on (but still on LOITER). The difference with RTL is it starts circling at 100m. over my head, but instead was circling down towards the ground until I took over at low altitude.
Maybe you would glance over my .param to see if I am missing some parameter. Still learning.
Thanks again for your effort on this fantastic project.
Maarten.
Nice to meet you and thanks for all your work on the wiki, it is really great these days.
I donât think there should be any problem mounting the airspeed sensor as you describe, I have used a similar arrangement in the past, on the Phoenix 2000 v1, Iâve had that plane quite a while now! A practical aspect is that itâs one more cable to connect up whenever you assemble the plane.
Iâve had a look at your two most recent logs. In the first one, you have SOAR_ENABLE_CH=1, which is also your roll channel. Because of this, soaring is being constantly turned on and off during the flight. Set SOAR_ENABLE_CH to a channel youâre not using for anything else. It looks like you realised this as SOAR_ENABLE_CH=0 in the next flight.
In the second flight, the thermalling controller wasnât able to get a position estimate from the AHRS, thatâs why it returned to home. Iâm not sure why this would be the case - but you may be one of the first to be using EKF3 with soaring so it could be linked to that. Iâll do some testing on my end to see if I can reproduce this. In the mean time maybe you could try using EKF2 and see if the issue is still there?
Are your latest SOAR firmware in the latest BETA release, or do I need to get the LATEST Development release to test your latest firmware ? Also, I am wondering how often I should be updating the firmware, how would I know when you have added some improvement to firmware to try ?
Contemplating writing a PR for an RC switch option to disable the CROW function if Differential spoilers have been setupâŚwould allow the Crow function on outboard ailerons to be active or not with Flap deflection, in either Crow modeâŚany interest out there for this? allows full flaps with or without Crow aileron braking depending on approach and fieldâŚ
@Samuel_Tabor
Hi Sam,
I have your polar-learning FW on my test-FC since more than a week, but itâs not so easy to have silent conditions in that days. Yesterday I had a try to start some learning-flights - but in the end itâs just one because of start of thermals.
Please be aware that Iâm using a foamie-test-ASW17 that is not hign performing and not really well tuned and Iâm using TECS_SYNAIRSPEED instead of an airspeed-sensor.
But regardless of that facts, you can see an improvement after every gliding/learning track. Donât know why the log of the speed is so jittery - the visual speed is clearly viewable slow/medium/fast and subjectively stable.
Thanks for testing! Thatâs a nice mission you have set up.
Unfortunately the polar learning didnât gather much data as so the parameters were not adapted much. The reason is that although the descending part of the mission did mostly result in gliding, the change speed commands did use some throttle to accelerate. You can see the small spikes throughout the gliding portion. Because of these throttle inputs, most of the gliding time was rejected by the polar learning to allow the glide to be re-established to avoid noise.
There are two options to fix this. One is to set TECS_SPDWEIGHT=2. This will stop throttle being used when the aircraft tries to accelerate but will affect the whole flight. The other is to use the soaring input channel (RC 11 in your case) in the middle position (around 1500) which will force TECS_SPDWEIGHT to 2 and throttle to zero during the descending parts of the mission. You can either put the switch back to the low position for climb, or set SOAR_ALT_MIN and SOAR_ALT_CUTOFF to do this automatically.