-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert commit 1ab3489: Add iOS world-accurate alpha orientation fix
- Loading branch information
Showing
1 changed file
with
2 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25dcddc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change has been reverted because while this did provide a compass oriented alpha value, it does not account for value changes that occur in the beta and gamma angles as the alpha heading trips around its poles. For example when webkitCompassHeading changes from 350 to 10, the values of beta and gamma are not the same in both cases. Relative changes are need to all 3 readings to ensure the coordinate-frame stays accurate which I'm unsure how we could do right now.
Problem can be re-created by re-adding this code and running on an iOS device to observe pole swinging.
25dcddc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In terms of fixing this, we could apply the delta between alpha and webkitCompassHeading later on in the process when we are constructing our Quaternion / Matrix based representations of device orientation.
25dcddc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any update on this by chance?
25dcddc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
360 - (this.deviceOrientation.webkitCompassHeading)
seemed to do the trick for me.