iVideoGameBoss / PhoenixHeadTracker

The Phoenix Head Tracker is a program that interfaces with Xreal Air glasses to capture and analyze sensor data. By detecting changes in the user's head yaw and pitch, this program can send this gyro data to Opentrack UDP or can control the computer mouse to look around in video games
https://github.com/iVideoGameBoss/PhoenixHeadTracker
GNU General Public License v3.0
150 stars 15 forks source link

Undesirable behavior where the raw values switch from negative max to positive max #4

Closed u9520107 closed 1 year ago

u9520107 commented 1 year ago

Version 3.0.2.2

I think the track value calculation may need to be tweaked a bit. Let's just look at the yaw values. If I reset the position at raw yaw of -160. To me, -160 is center, and let's say I only look between 30 degrees to my left and to my right. Looking left moves the raw yaw towards larger numbers so I go from -160 to -130, which is totally fine. However, if I look to the right, then at -180, the raw value switch to positive 180, and go down from there to 170. At that point where the values jump to positive, the track value jumps a lot as if I sudden snap my head to the left. There is no way to reset the raw positions, so this issue will remain no matter how much I hit the reset rotation button.

I think the calculation of track values should probably start with a translation of raw values by resetting where the 0 position is, and account for the negative 180 to positive 180 transition point. Then you apply the speed calculation.

I hope I am conveying the issue correctly.

iVideoGameBoss commented 1 year ago

Thank you. I fixed this issue in new release

u9520107 commented 1 year ago

Awesome! I'll try the new build in a day or two.