TrackIR Browser (Firefox) With WebGL

Post Reply
trujillostm
Posts: 3
Joined: Sun May 19, 2013 3:13 am

TrackIR Browser (Firefox) With WebGL

Post by trujillostm »

I want to use my TrackIR 5 with WebGL prototype of game in my browser (Firefox).
I have a small DLL for use in Firefox, but when I get the matrix of trackir, It seems to be incorrect.

• TrackIR 5.4.2
• TrackClip Pro
• Windows 7 Professional (x64)
• Mozilla Firefox 47

I atach you a image with the matrix values when i recenter the view.
From 0 to 15 index of matrix.
If you can see, 3, 7 and 11 are 0, and 15 is 1 all the time.

Im using this for obtain the radians from the matrix (in Javascript).
Based on Euler formulas.
http://www.euclideanspace.com/maths/geo ... /index.htm

//Radians
yaw = Math.asin(matrix[2]);
pitch = Math.atan2(matrix[6], matrix[10]);
roll = Math.atan2(matrix[1], matrix[0]);

and then:

//Degrees
yaw = (yaw * (180 / Math.PI));
pitch = (pitch * (180 / Math.PI));
roll = (roll * (180 / Math.PI));

My trackir is crazy with the equations of yaw, pitch, roll of Euler.
Are you sure the matrix of trackir dll is correct?
When I rotate the head to my left, the view do a small jump to positive values in -15 degrees.
In right movement is ok for positive angles, from 0 to +15 or more.

Please, can you help me?
I dont know if the raw matrix of trackir is correct.
Attachments
TrackIR Matrix
TrackIR Matrix
matrix.png (46.49 KiB) Viewed 5704 times
Values of the Matrix when centered.
Values of the Matrix when centered.
captura_trackir_valores.png (184.25 KiB) Viewed 5704 times
Post Reply