Page 1 of 1
Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Thu Sep 04, 2014 11:16 am
by TheRealBix
Hi everyone !
I'm trying to set up my Nexus 5 as a head track device.
I used to launch facetracknoir with the faceapi but the response is really low and it doesn't work in the dark. Anyway, it was working with both freetrack and trackIR protocols.
Now, I want to check if the sensors are ready for this kind of things so i've installed Wireless IMU and FreePIE IMU on the Nexus, and picked up here and there some parts of scripts :
As Wireless IMU doesn't seem to send readable data by FreePIE, I use FreePIE IMU.
Here both scripts for freetrack and trackir protocols.
Code: Select all
def update():
global yaw
yaw = android[0].yaw
global pitch
pitch = -android[0].roll
global roll
roll = android[0].pitch
if starting:
centerYaw = 0
centerPitch = 0
centerRoll = 0
yaw = 0
pitch = 0
roll = 0
android[0].update += update
freeTrack.yaw = yaw - centerYaw
freeTrack.pitch = pitch - centerPitch
freeTrack.roll = roll - centerRoll
if keyboard.getKeyDown(Key.LeftControl) and keyboard.getPressed(Key.C):
centerYaw = yaw
centerPitch = pitch
centerRoll = roll
diagnostics.watch(freeTrack.yaw)
diagnostics.watch(freeTrack.pitch)
diagnostics.watch(freeTrack.roll)
Code: Select all
def update():
global yaw
yaw = filters.deadband(math.degrees(filters.continuousRotation(android[0].googleYaw)), deadband)
global pitch
pitch = filters.deadband(math.degrees(-android[0].googlePitch), deadband)
global roll
roll = filters.deadband(math.degrees(-android[0].googleRoll), deadband)
if starting:
deadband = 0.01
centerYaw = 0
centerPitch = 0
centerRoll = 0
yaw = 0
pitch = 0
roll = 0
android[0].update += update
trackIR.yaw = yaw - centerYaw
trackIR.pitch = pitch - centerPitch
trackIR.roll = roll - centerRoll
if keyboard.getKeyDown(Key.LeftControl) and keyboard.getPressed(Key.C):
centerYaw = yaw
centerPitch = pitch
centerRoll = roll
diagnostics.watch(trackIR.yaw)
diagnostics.watch(trackIR.pitch)
diagnostics.watch(trackIR.roll)
Both options work, Freepie can read values.
The problem is that Elite doesn't recognize any of those..
May I have to use opentrack/facetracknoir in an "android>Freepie>opentrack>Elite" thing ?
Thanks for your future answers
Re: Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Fri Sep 05, 2014 12:54 am
by CyberVillain
It works with the real Freetrack but not with FreePIE?
Re: Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Fri Sep 05, 2014 1:28 am
by TheRealBix
I confirm, it works with FTnoIR + faceAPI + Freetrack protocol + Freetrack interface.
edit : I've just checked the freetrack path in the registry and it's good, ProgramFiles/Freepie..
Re: Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Fri Sep 05, 2014 2:34 am
by CyberVillain
Ok, we use the old Freetrack interface directly, we even use their dll
Can you try just the Freetrack interface and play the demo in the Freetrack client, does that work too?
Re: Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Sun Sep 07, 2014 3:33 pm
by TheRealBix
Sorry for the late answer (holidays
)
So, no, it doesn't work.
In fact because of you i've searched if it was a known thing, but only with the original freetrack soft, and actually it is.
https://www.youtube.com/watch?feature=p ... Da9c#t=398
I don't really know why, but it works. Maybe it's related to the csv available
here, I think you'll understand the weird thing better than me..
And thanks for your time
Re: Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Tue Sep 09, 2014 4:35 am
by TheRealBix
Here is my final script if someone wanna take a look :
Code: Select all
def update():
global yaw
yaw = filters.deadband(filters.simple(filters.continuousRotation(android[0].googleYaw), smooth), dead)
global pitch
pitch = filters.deadband(filters.simple(android[0].googlePitch, smooth), dead)
global roll
roll = filters.deadband(filters.simple(android[0].googleRoll, smooth), dead)
if starting:
dead = 0 #Defaut = 0 : Censé diminuer le drift. Ne semble pas marcher pas chez moi, je laisse donc à zéro.
smooth = 0.9 #Defaut = 0.9 : Permet de lisser les mouvements de tête. Ajuster de 0 à 1 selon la sensibilité de votre estomac.
centerYaw = 0
centerPitch = 0
centerRoll = 0
yaw = 0
pitch = 0
roll = 0
android[0].update += update
#Là dessous, c'est les données balancées au jeu avec pour chaque axe une petite équation représentant une courbe. Ajustez les selon votre convenance, celles-ci me paraissent assez bonnes.
#Attention aux torticolis !
freeTrack.yaw = -1.5*(yaw - centerYaw) - 10*(yaw - centerYaw)**3
freeTrack.pitch = 2*(pitch - centerPitch) + 5*(pitch - centerPitch)**3
freeTrack.roll = -1.3*(roll - centerRoll) - 2*(pitch - centerRoll)**3
#Ici, vous pouvez modifier le raccourci pour l'ajustement du zéro. Home par défaut.
if keyboard.getPressed(Key.Home):
centerYaw = yaw
centerPitch = pitch
centerRoll = roll
#Décommentez les lignes suivantes pour voir les données transmises par le smartphone et par FreePIE au jeu.
#diagnostics.watch(android[0].googleYaw)
#diagnostics.watch(android[0].googlePitch)
#diagnostics.watch(android[0].googleRoll)
#diagnostics.watch(freeTrack.yaw)
#diagnostics.watch(freeTrack.pitch)
#diagnostics.watch(freeTrack.roll)
Re: Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Tue Sep 09, 2014 4:41 am
by CyberVillain
Nice that you got it to work, what was wrong?
edit: Both Freetrack and Android uses absolute cordinate systems so I see no point in doing filters.continuousRotation or deadband
Re: Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Tue Sep 09, 2014 5:05 am
by TheRealBix
It seems that Elite need to detect the tracker software before collecting track data. So I had to launch Opentrack or FTnoIR in order to "lock" the game then run the FreePie script. It's weird, but it works. Maybe future updates will correct this. (This is the only game I have to do this)
The deadband filter actually doesn't do anything on me. That's why I've disabled it (tests..
)
On the other side, the continuousrotation is required. Without it, the value jumps to negative and "teleport" the vision to the opposite. Maybe I did something wrong but that's what happen to me
When I turn my head, once -pi is reached, it jumps to +pi (which correspond to 20 degrees to the left for me)
Re: Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Tue Sep 09, 2014 5:14 am
by CyberVillain
But running FreePIE should do the same? Hmm, there is one thing we do not do however, we do not have a fake freetrack.exe that runs, maybe they check for that.. Dumb check if you ask me
Re: Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Tue Sep 09, 2014 5:33 am
by TheRealBix
No, it doesn't work with a freetrack.exe, at least I don't see it in the task manager.
In the interface settings of those softwares it seems that a NPClient.dll is required and used, maybe it's related ?
Re: Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Tue Sep 09, 2014 1:14 pm
by CyberVillain
NPClient.dll is for TrackIR, has nothing todo with Freetrack
Re: Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Tue Oct 07, 2014 5:22 pm
by wax7
Hi. i tryed also this. but...
diagnostics.watch(android[0].googleYaw)
diagnostics.watch(android[0].googlePitch)
diagnostics.watch(android[0].googleRoll)
Give nothing out!
only this works then setting the android app to raw data:
diagnostics.watch(android[0].yaw)
diagnostics.watch(android[0].pitch)
diagnostics.watch(android[0].roll)
any problems then using raw data?
Numbers of ra data counting up and deasnt stand still.... :/
Re: Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Wed Oct 08, 2014 2:49 am
by CyberVillain
Have you ticked the Orientation checkbox on the Android app?
If you tick Debug do you see values?
Re: Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Wed Oct 08, 2014 4:24 am
by wax7
Not Moving Handy.
http://www.youtube.com/watch?v=PW1QCCs5djs
Screenshot_2014-10-08-12-08-50.png
Screenshot_2014-10-08-12-09-02.png
Re: Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Wed Oct 08, 2014 4:27 am
by CyberVillain
Looks like the phone does not support orientation, that is a bit strange
Re: Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Wed Oct 08, 2014 4:34 am
by wax7
The Phone is the Brand new "OnePlus One"
Re: Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Wed Oct 08, 2014 4:44 am
by wax7
mmmh. no Orientation Sensors....
Screenshot_2014-10-08-12-41-36.png
Re: Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Wed Oct 08, 2014 5:37 am
by CyberVillain
Very strange, maybe call the support?
Re: Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Thu Oct 09, 2014 11:54 am
by wax7
Tryed now my old Milestone Handy. But its like i have an Earthquake.... not usefull. need more Cell Phones for TEsting
Re: Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Thu Dec 11, 2014 5:08 pm
by DoomyDoom
TheRealBix wrote:It seems that Elite need to detect the tracker software before collecting track data. So I had to launch Opentrack or FTnoIR in order to "lock" the game then run the FreePie script. It's weird, but it works. Maybe future updates will correct this. (This is the only game I have to do this)
I'm having to do this in DCS. I turn on OpenTrack's UDP tracker, turn on the FreePIE script, and then turn off OpenTrack's tracking.
Re: Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Mon May 25, 2015 8:53 am
by alex8b
Code: Select all
public void Write()
{
...
local.CamWidth = 1920;
local.CamHeight = 1080;
The reason why it doesn't work is because FreePie doesn't set these two variables on FreeTrack protocol.
Re: Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Mon May 25, 2015 1:48 pm
by CyberVillain
aha, will check that out
Re: Android>FreeTrack/TrackIR>Elite Dangerous
Posted: Mon May 25, 2015 1:53 pm
by CyberVillain
Does this version work?