Hi All,
A quick and, hopefully, easy guide on how to get SmoothTrack up and running with FlightGear. Giving pretty decent head tracking for under £10 and only a few minutes of setup.
3 bits of kit you'll need:
1)A mobile phone running Android or iOS, with a camera.
2)SmoothTrack - available from your phone's app store (It was £3 when I got it, seems to be £9.99 now)
3) OpenTrack (
sourceforge.net/projects/opentrack.mirror/
)
Starting with OpenTrack get that installed (or built from your OS repositories) and fire it up. You'll Need to set the "Input" field to UDP over network
The output should be set to flightgear, You might need to run FG with it open to get it to detect it but mine was just there in the list.
You'll then need your PC's internal network IP address. You should be able to get that from your network software, your router or by typing a command like ip route list. It will depend on your OS as to the best method for this.
The start SmoothTrack on your phone. Put your IP address you've got from the step above in the IP field and click the button where it says "Paused", this should switch to running. If you have a front facing camera you should see your handsome mug staring back at you. I shouldn't need to say this but if it's a rear facing camera please turn the phone around....
Go back to OpenTrack and hit "start" under the tracking area in the bottom right. You should now be able to see the octopus moving around as you move your head.
We now need to tell FG how to interpret this so using Enrogue's provided file from this thread create a file called opentrack.xml and paste this into it:
<?xml version="1.0" encoding="UTF-8"?>
<PropertyList>
<comment>
<![CDATA[
Usage:
fgfs --generic=socket,in,52,,5542,udp,opentrack
]]>
</comment>
<generic>
<input>
<binary_mode>true</binary_mode>
<byte_order>host</byte_order>
<chunk>
<type>double</type>
<node>/sim/current-view/tx</node>
</chunk>
<chunk>
<type>double</type>
<node>/sim/current-view/ty</node>
</chunk>
<chunk>
<type>double</type>
<node>/sim/current-view/tz</node>
</chunk>
<chunk>
<type>double</type>
<node>/sim/current-view/heading-offset-deg</node>
</chunk>
<chunk>
<type>double</type>
<node>/sim/current-view/pitch-offset-deg</node>
</chunk>
<chunk>
<type>double</type>
<node>/sim/current-view/roll-offset-deg</node>
</chunk>
<chunk>
<type>int</type>
<node>/sim/current-view/status</node>
</chunk>
</input>
</generic>
</PropertyList>
Then save that file inside your "[FGDATA]/Protocol" folder.
In your FG Launcher, or via command line depending on how you start FG you need to tell it to expect the tracking information.
You can do this by adding the following as an option in the options area of your launch method:
--generic=socket,in,25,127.0.0.1,5542,udp,opentrack
Now start FG, move your head about and you should see it tracking nicely.
Undoubtedly some tweaking will be needed but this should get you started with basic up down left right.
After a bit of playing I actually really like it. It's a simple solution and the above only took less than 5 mins including the downloading and file creation.
Got to be worth a go?