Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compass heading from deviceorientation
Message
From
24/04/2014 09:14:06
 
 
To
24/04/2014 09:06:36
General information
Forum:
HTML5
Category:
Browser issues
Miscellaneous
Thread ID:
01598938
Message ID:
01598961
Views:
21
>>Just varying either the x or y axis gives hugely different heading results (including at 'steep' angles Nan)
>>
>
>
>
>  // Calculate compass heading
>    var compassHeading = Math.atan(Vx / Vy);
>
>
>Have you tried replacing the Math.atan()) by the Math.atan2() ?

No, but I will. My trig's too rusty to guess what the effect might be :-}

>http://www.w3schools.com/jsref/jsref_atan2.asp
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform