gearvr-controller-webbluetooth
gearvr-controller-webbluetooth copied to clipboard
Magnetometer and
Hello, Great work! I am author of first attempt and it is very interesting how you approached this problem. I was sure that these three values are ready to use orientation but I was not able to figure out how to decode them. They change very consistently as you rotate GearVR around and also make other rotations.
Perhaps you can take a look and we can get consistent rotation from that ?
Finally managed to dig into this from a C# direction. I've found a lot of bad data in the example.
His Magnometer calculations make NO GD SENSE! He reads byte 32, 33 for X, multiplies by 0.06, and converts it to a float. byte[32] is Timestamp data. byte[48] is Magnometer data
I've attempted reading this as a Quaternion as 2 double packed numbers like touch, as Vector3 int16's, and also as a Vector3 int16*0.06f. So far, none of these values are valid for all 3 axis of Magnometer data.