XCSoar in (Oculus) VR - a solution..

Discussion about VR

Moderators: Uros, Tom, OXO

Post Reply
Goldenhawk77
Posts: 3
Joined: Tue Mar 26, 2019 3:33 pm

XCSoar in (Oculus) VR - a solution..

Post by Goldenhawk77 » Sat Feb 27, 2021 10:46 pm

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

Mekof
Posts: 110
Joined: Mon Apr 04, 2005 1:23 pm
Location: Slovenia

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

Post by Mekof » Sun Feb 28, 2021 12:52 am

Just stoping by to say thank you. :)




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

k6chris
Posts: 199
Joined: Sat Nov 04, 2017 10:34 am

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

Post by k6chris » Sun Feb 28, 2021 9:37 am

Excellent work GHK! Well done.

tiberius
Posts: 169
Joined: Fri Apr 01, 2011 10:39 pm
Location: UK

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

Post by tiberius » Sun Feb 28, 2021 8:56 pm

Great work mate, glad to see it published.
Image

GlenBecker
Posts: 23
Joined: Sun Dec 01, 2019 5:42 pm

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

Post by GlenBecker » Thu Mar 25, 2021 10:51 pm

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.

cvvs
Posts: 153
Joined: Sun Jan 06, 2019 11:43 pm

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

Post by cvvs » Sun Apr 04, 2021 2:08 am

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.

Goldenhawk77
Posts: 3
Joined: Tue Mar 26, 2019 3:33 pm

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

Post by Goldenhawk77 » Sun Apr 04, 2021 2:37 pm

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.

cvvs
Posts: 153
Joined: Sun Jan 06, 2019 11:43 pm

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

Post by cvvs » Sun Apr 04, 2021 11:10 pm

I test this

cvvs
Posts: 153
Joined: Sun Jan 06, 2019 11:43 pm

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

Post by cvvs » Mon Apr 05, 2021 1:24 am

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.

Post Reply