GVR: change default unity quaternion of HEAD to Madgwick filter's quaternion in android?

Hello there,
I’m young Unity VR developer. Developing VR games, I have observed that my phone - Samsung Galaxy S7 has lack in angle position calculation, e.g. Z axis has huge lack in angle, even at rest position.
I figured out some good terms algorithms, e.g. Madgwick filter, that gives better stability.
So is there opportunity to change default unity quaternion to Madgwick’s?

Best regards,
Alex.

Hi,

Galaxy S7 has no problem giving a solid Z axis rotation signal (roll axis in HMD).

The mobile VR SDKs compatible with that phone (GoogleVR and Oculus) are both using good Kalman filtering and achieving smooth signals with low latency already.

If your phone is glitching then something’s wrong, have you tried loading a Cardboard game off GooglePlay to see if that gives solid rotational tracking. It may be that you are implementing your application in unity incorrectly.

Hi SiliconDroid,
I’m a little bit surprised to hear that GoogleVR is using Kalman filtering. Is it using magnetometer at all?
Z angle has lack with 1 degree per second. I haven’t solved this problem yet.
I created empty project, then added some boxes. After that i imported GoogleVR package. I don’t know how can i implement incorrectly my application. It’s weird.
Any suggestion?

Best regards,
Alex.

Does anybody interest in answering this question?

Have you tried rebooting the phone and then recalibrating the compass in Google Maps (follow the directions to swing the phone around in a figure 8 pattern until the range of angles it gives for your orientation on the map is like 30 degrees) ?

NB: ignoring the question, because it sounds like you want to solve your device issues, not re-write the SDK algorithm

Hello, nat42.
I calibrated compass by 2 different ways, as you recommended (i have got orientation of map within 30 degrees), and by software #0#, which is more precise.
I have noticed that after phone rebooting compass is uncalibrated, even if i calibrate it before. Also, phone calibration doesn’t solve my problem.

Best regards,
Alex.

I think this might be related to a Unity bug in Input.gyro.attitude with at least the Samsung devices S6/S7 and Android N / Nougat
A possible workarround ( if this is indeed about the gyro) may be using gyro.rotationRate ( which is a rotation delta ), as those values seem to be not affected by the lag.
See more here :