Page 1 of 1

XCSoar in (Oculus) VR - a solution..

Posted: Sat Feb 27, 2021 10:46 pm
by Goldenhawk77
Hi all,

I’m a long time convert to VR for flight simulation - and the experience of Condor in VR is exceptional. Once experienced, you don’t want to go back to a 2D screen.. I spent a lot of time trying to persuade BS3 to make the jump to VR - he was worried about how he could possibly cope without XCSoar..

Long story short - he now has a Rift S (quote “I wish I had done it sooner”😂) AND has XCSoar in his cockpit.

I spent a bit of time (ok quite a lot actually!) trying to take this as far as possible, pushing the envelope of the technology we have and then bundling it all up.

It may not be perfect, but I believe it’s a good integrated solution for those who want to run Condor in VR and still use XCSoar - as they would if it was on a tablet device.

A number of key features got fixed - eventually! These include:
⁃ Control of XCSoar in flight using the hat switch
⁃ Switching focus between Condor and XCSoar whenever required, and mouse interactions via the joystick
⁃ Synchronisation of MC adjustment between both Condor and XCSoar (with override if they get out of sync or using MC Auto)
⁃ XCSoar Next / Previous Turnpoint selection
⁃ Water ballast dumping synchronised between XCSoar and Condor
⁃ Toggle view functionality

All the above without needing keyboard or voice interaction - just a 12 button joystick. A slightly more limited version exists for 8 button joysticks such as the MSFF2 - still with all the main functions noted above.

All the details are here: https://sites.google.com/view/dsgcvr/xcsoar-in-vr

All previous contributors on this subject are duly acknowledged there - thanks guys.

Cheers,
GHK

Re: XCSoar in (Oculus) VR - a solution..

Posted: Sun Feb 28, 2021 12:52 am
by Mekof
Just stoping by to say thank you. :)




Oh...... and big thumb up for Condor in VR. 8)

Re: XCSoar in (Oculus) VR - a solution..

Posted: Sun Feb 28, 2021 9:37 am
by k6chris
Excellent work GHK! Well done.

Re: XCSoar in (Oculus) VR - a solution..

Posted: Sun Feb 28, 2021 8:56 pm
by tiberius
Great work mate, glad to see it published.

Re: XCSoar in (Oculus) VR - a solution..

Posted: Thu Mar 25, 2021 10:51 pm
by GlenBecker
GHK,
Really great solution and great job describing very clearly what can be an annoyingly tedious, fiddly setup process. Your solution for full control of XCS is much more robust than my voice control limited to zooming in and out. :)
I am without a useful flight station temporarily but look forward to implementing this soon.

I love the use of AHK. I especially like your Condor2Go. I accomplish starting everything with batch script but this is much more elegant and user-friendly.
Antimicro is a new one for me, I've used vJoy (http://vjoystick.sourceforge.net/site/) for similar needs.

Thanks for sharing!!

VR flightsims (and racing sims) make all this fiddling so worth it.

Re: XCSoar in (Oculus) VR - a solution..

Posted: Sun Apr 04, 2021 2:08 am
by cvvs
Thank you very much Goldenhawk77 for these excellent tutorials.
XCsoar is now walking in my RV.
I just have a small problem, which is that I cannot configure a key to switch from Condor VR to xcsoar, to take control.
I have to do a combination of keys, but I don't quite understand how to do it with your explanations.

a small video would be the best.
I understand that you have to exit the condor program for a moment then do these manipulations on XCsoar then come back to Condor.

When I do it on my screen it's simple with my mouse, I activate XCsoar by putting my mouse on it I click and I have access to XCsoar, and more to condor, then once finished, I click on condor and the I take back my hand.

I have a hotas handle with a hotas gas handle, so your files are not compatible.
What is the sequence to set exactly.

Re: XCSoar in (Oculus) VR - a solution..

Posted: Sun Apr 04, 2021 2:37 pm
by Goldenhawk77
Thanks for the kind words fellas.

cvvs - if I understand correctly you have a HOTAS stick and throttle with enough buttons for everything that you want to do? If so, you can get full control by editing the AutoHotkey file.

The simplest way to switch ‘focus’ between windows is to use ‘Alt-Tab’ on your keyboard. This will work ok between Condor and XCSoar IF they are the last two windows used, and if you can find these keys by touch.

In this solution AutoHotkey receives a key combination from a joystick - if these two buttons are pressed at the same time then the code runs - which toggles focus specifically between Condor and XCSoar each time they are pressed.

In your case, if you have one button that you would like to perform this switching, you can edit the code quite easily.

The format ‘XJoyYY’ should work. You need to determine what button number it is on your joystick, and what ‘number’ Joystick you are using. Most likely your joystick is ‘1’ (but if it doesn’t work try other numbers, starting with 2).

Let’s say you want button 15 to do the switching (so XJoyYY is now 1Joy15).
You need to find ‘Part 1.2’ of the script, and replace the first part of the first line of code.

If using ManyButtons12:
Replace: ~. & d::% (toggle2
with: 1Joy15::% (toggle2

If using ManyButtons8:
Replace: ~. & f::% (toggle2
with: 1Joy15::% (toggle2

And you can edit any other functions you like in the same way - if you have enough buttons available (the combinations are only required if you don’t have enough buttons!).

Note we have been talking about switching focus to XCSoar here. For most common actions you don’t need to switch focus. AutoHotkey is able to send most commands to XCSoar whilst Condor has focus - changing MC and dumping water are just two examples.

Let’s say you want button 17 to toggle the water valve:

In Antimicro, set Joystick Button 17 to ‘w’.

Then edit the Autohotkey code:

For ManyButtons12, find Part 2.5
Replace: Tab & g::% (toggle 3
With: w::% (toggle 3

For ManyButtons8, find Part 2.3
Replace: Tab & NumPad5::% (toggle 2
With: w::% (toggle 2

If you want to you can just run through the whole script and replace combinations with specific keys / buttons - as per the above examples. It’s a bit fiddly, but when it’s done - it’s done, and you will have all the controls where you want them.

Re: XCSoar in (Oculus) VR - a solution..

Posted: Sun Apr 04, 2021 11:10 pm
by cvvs
I test this

Re: XCSoar in (Oculus) VR - a solution..

Posted: Mon Apr 05, 2021 1:24 am
by cvvs
Perfect it works. I'm going to polish up my stuff a bit but I just did a 1:07 hour arcus flight and I can work very well with XCsoar all in VR.
Many thanks for the help.