I am using react-native-sensors mangetometer to create a compass based application.
There are 2 questions that i need help on :- 1
The react native sensor magnetometer by default points 0 degrees at east where as it should be pointing to 0 degree to North ideally. ( To solve this a 90 degree adjustment was added ) . How can i make ( where as it should be pointing to 0 degree to North ) this possible ?
The compass re rotates once it reaches the 271 degree mark which is not ideal in terms of ux. I am not able to understand why this happens.
Here is the link of the code i have used for Point 1 :-
https://github.com/rahulhaque/compass-react-native/blob/master/App.js
Here is the gif for point 2 :-
https://drive.google.com/file/d/1YjltGc-m33YKbrkrRwNvwYsbYuk2a5Nk/view?usp=sharing
Also is there any other way i can use the compass functionallity in react native ?