Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compass heading from deviceorientation
Message
From
24/04/2014 09:11:58
 
 
To
24/04/2014 08:54:31
General information
Forum:
HTML5
Category:
Browser issues
Miscellaneous
Thread ID:
01598938
Message ID:
01598960
Views:
20
>>>>It would be nice it I could just find an example HTML5 page out there where this works ;-}
>>>
>>>This looks promising http://stackoverflow.com/questions/18112729/calculate-compass-heading-from-deviceorientation-event-api
>>>
>>>Look at the first answer
>>>There's a link to an example http://people.opera.com/richt/release/tests/orientation/spec_workedexample.html
>>
>>I also found that a few minutes ago. The code is basically the same as I'm trying and, on my device at least, just as useless :-{
>>Just varying either the x or y axis gives hugely different heading results (including at 'steep' angles Nan)
>>
>>Do you have a device you could try that page on ?
>>Anybody ?
>
>> >Just varying either the x or y axis gives hugely different heading results (including at 'steep' angles Nan)
>
>What about ignoring the new value if more than x degrees difference from the previous reading ?

But the problem is that once it jumps it continues from there - never flips back unless the direction is reversed.
But I'm starting to see a weird pattern:
It might be reading:
250,251,252,253,254,255,256,257,258 then 101
or 80,81,81,82,83,84,85,86,87,88 then 270
or
down to 263 then 96

Values are not exact but I can see that 258+100 = ~360. Ditto 88 + 270 and 263 + 96.
I'm going to check the beta and gamma values when the skip occurs.....
Previous
Reply
Map
View

Click here to load this message in the networking platform