Servers by jDrones

Soaring/Gliding for Planes

arduplane

(Andrey Kolobov) #21

Yes, I’ve tried it and was going to mention it in the instructions… Unfortunately it doesn’t work properly. There are at least two issues with it:

  1. It is tuned for a particular full-sized glider, ASK21 IIRC, and adapting it to another plane requires changing constants in the code. These constants are very model-specific.

  2. Problem #1 might otherwise be solvable, but there is a more serious limitation. The plugin models altitude gain due to a thermal using additional wing lift, i.e., it basically pretends that within a thermal the glider’s wing lift becomes higher. In reality these two kinds of lift are very different; a glider gains altitude in a thermal because the surrounding air rises; the forces on the wing stay the same. I believe the reason the plugin lumps these phenomena together is that X-plane’s API doesn’t provide a way for plugins to directly change the z-coordinate of an aircraft’s reference frame (affecting x- and y-coordinates of the reference frame, and hence modelling wind effects, is nonetheless possible).

The upshot is that the right parameters of this “lift-based thermal approximation” for a given aircraft are really tricky to pick (especially so for RC-sized planes), because aircraft generally assume that at a given airspeed the angle of attack/lift doesn’t change without changes to the wing camber or aircraft attitude. If approximation parameters are even slightly off, directly increasing vertical force acting on the wing leads to sharp pitch-ups and/or rolls, and makes the plane uncontrollable.


(tridge) #22

ok, thanks for the detailed reply.
Have you tried the thermalling support in CRRCSIM? That has thermal visualisation, and was originally written to teach people to soar. We support using CRRCSIM as an ArduPilot SITL backend (with a a patch)


(Andrey Kolobov) #23

Haven’t tried that one yet, but it’s on the list of things to do. By the way, does it have terrain-dependent thermal generation? Also, are thermals affected by winds in CRRCSIM?


(tridge) #24

I don’t know. Code is here if you want to take a look:


(Samuel Tabor) #25

Hello all,
I’ve started putting together some docs here
Andrey, ping me when you finish your SITL instructions and we can collaborate.
Cheers


(tridge) #26

thanks @Samuel_Tabor! I’ve sent you an invite to the documentation team on ardupilot github. Feel free to work on that repo if you prefer.


(Andrey Kolobov) #27

The soaring X-Plane SITL instructions (for Windows) are pretty much ready. They are in a Word doc currently, and with a few potentially useful accompanying files.

Should I just past the Word doc’s contents here, or is there a better place/way?


(tridge) #28

best to do it in the wiki, much like the existing xplane docs:
http://ardupilot.org/dev/docs/sitl-with-xplane.html
you can edit with a PR against this repo:
https://github.com/ArduPilot/ardupilot_wiki


(Andrey Kolobov) #29

Much of my instructions consist of regurgitating what is said about setting up SITL in other wiki pages. The intent of this is to make this set of instructions as self-contained as possible and enable anyone with no Cygwin/ArduPilot/X-Plane/etc on their machine, and little understanding of how these things work, to get the soaring SITL running. I sense though that to people already knowledgeable about this stuff (e.g., those who will be code reviewing this PR), parts of these instructions will almost look like content duplication. So, are you still sure that pushing them out via a PR to the wiki is the right process/place for this?

Also, can I attach files to a wiki page somehow?


(tridge) #30

I’m fine with a bit of duplication, or just linking to the right sections.
word docs are much harder to maintain in the wiki.


(Andrey Kolobov) #31

OK, I’ll put the instructions there then. So, what about attaching files to a wiki (parameter files for sailplane model, mission files, etc)?

Or, the better question is: what’s the right place to put the extra materials where a wiki page can refer to them?


(tridge) #32

for parameter files for the simulator we use:


for param files for real aircraft we use:

for mission files we use:

for the XPlane models, we can make a subdirectory Tools/autotest/XPlane


(Samuel Tabor) #33

Thanks for adding me to the doc team tridge! I haven’t quite figured out what that allows me to do: should I create a branch and then submit a PR against master?

I see from the dev call notes that you’ve been doing some testing. Great to hear!
On the simulation side I’ve pushed the changes (hacks) I’ve been using to test in JSBSim to here . This creates a thermal at CMAC. I’ve also added a high-alt mission and tweaked the Rascal’s aero parameters to make it a decent glider.

There are some issues that prevent running master on the PXFmini so I’ve backported the soaring changes to ArduPlane 3.7.1 here in case that’s useful to anyone.


(tridge) #34

It allows you to push directly if you want to, or to create a PR and assign it to someone. Maybe do the PR for your first set of patches, but when you do tweaks later you can just do them directly. Directly editing pages in the github web interface can be a very easy way to do quick updates.

Really? What issues? I have a mini here and it works fine.


(Samuel Tabor) #35

Ok great.
On the PXFmini it’s a segfault in RCInput_RPI, appearing a few seconds to minutes after starting ardupilot. I’ve posted it here here .


(RobertWZ) #36

Andrey Kolobov,The soaring X-Plane SITL instructions (for Windows) are pretty much ready. They are in a Word doc currently, and with a few potentially useful accompanying files.
cna you paste the Word doc’s contents here?


(Samuel Tabor) #37

Initial docs have been added to the wiki:

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

I haven’t added anything about SITL. Andrey, if you want to add your instructions to this page that would be great, or pass them to me and I’ll add them.


(Andrey Kolobov) #38

Well, life is what happens when you are making other plans… Other commitments and wrestling with rest have taken way longer than I expected, but the PRs containing the instructions and some extra files are finally under way:


@Sam: Your soaring overview is great! My “manual” refers to it in several places. One thing that would be great to mention there are some methods for computing SOAR_POLAR_B, SOAR_POLAR_CD0, and SOAR_POLAR_K. I’ve seen a few excellent posts on this in the ArduSoar discussion thread on your blog: http://diydrones.com/profiles/blogs/ardusoar-cross-country-x-plane-simulation?id=705844%3ABlogPost%3A1570612&page=10#comments. Would it be possible for you to include a summary of them to the soaring wiki?

Also, can you please take a look at these parameters in the vee-gull 005.param file at the end of this post and let me know if they look reasonable to you?

@Everyone: if you have the opportunity, please try out these instructions and let me know if you run into any issues! You can check out the above PRs and render them on your machine to make them easier to read. One caveat is that the instructions in the PR refer to a vee-gull 005 parameter file and an X-Plane mission file that are supposed to be in the ArduPilot repo but in fact aren’t there yet (they are being checked in via the other PR). So, for now I’m posting these files here:

vee-gull 005.param (15.2 KB)
Soaring in Seattle.txt (562 Bytes)


(tridge) #39

for those wanting to try XPlane-11, I installed it today, and have created a PR for a small change needed to make it work with ArduPilot SITL:


it is flying the PT60 nicely. I haven’t tried a glider in it yet


(Gary Mortimer) #40

I am off this afternoon to chuck a glider off a hill with my son to get some baseline numbers for how it flies and then I will join in. Looking forward to this.