Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compass heading from deviceorientation
Message
From
24/04/2014 07:52:04
 
 
To
24/04/2014 07:35:27
General information
Forum:
HTML5
Category:
Browser issues
Miscellaneous
Thread ID:
01598938
Message ID:
01598950
Views:
27
>>>Maybe you should update the screen in steps to make it smooth
>>>
>>>
>>>for( x = oldPosition; x <= newPosition; x += 0.5 ) // degrees  ( or less than 0.5)
>>>   updateScreen();
>>>
>>
>>Hmm. The events come in fast enough - in fact, as in previous reply, I'm taking the opposite approach to *reduce* the number of screen updates (which draws an arrow on HTML5 Canvas)
>
>

>The Nexus has a gyroscope ? Try this http://www.sundh.com/blog/2011/09/stabalize-compass-of-iphone-with-gyroscope/

I believe the deviceorientation event must supply data using both the gyroscope and compass. IAC it's the only HTML5 API method of accessing the information.
But the device calibration (based on looking at an app such as 'Micro Spirit Level') is good.

I should also probably clarify what I meant by 'flick':

When rotating the device smoothly on a flat service the reading will increment smoothly to a certain point then jump a seemingly random amount (maybe 30 degrees, maybe more). Reversing the rotation direction slightly will then cause it to jump back by the same amount.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform