Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reverse Data #2

Open
HannHank opened this issue Mar 23, 2019 · 1 comment
Open

reverse Data #2

HannHank opened this issue Mar 23, 2019 · 1 comment

Comments

@HannHank
Copy link

Hello, this library is very great, but I have a problem. My Compass give me the reverse Data. It only worked for me when I turned the Compass on the other side, but there must be another way. I cant't use him in this position because the build in GPS need's it antenna pointed to the sky.

Thank's in advanced.

@sezercoban
Copy link

change compas_heading into this: `void compass_heading(){
compass_scalled_reading();

float heading = atan2(compass_x_scalled, compass_y_scalled);
// result need adjustment
if(heading > PI) {
heading -= PI;
}else {
heading = heading + PI;
}
bearing = heading * 180/M_PI;
}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants