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

geoBearing function explanation #2

Open
Christiandd opened this issue Dec 1, 2017 · 0 comments
Open

geoBearing function explanation #2

Christiandd opened this issue Dec 1, 2017 · 0 comments

Comments

@Christiandd
Copy link

Hi, I'm sorry for the improper use of the "issues" page but I didn't find a way to contact you!
I would some explanation concerning the "geoBearing" function because I'm doing a similar project but with two Android (one on arduino and one phone, connected via ESP8266 to Arduino), but I don't understand the calculation that you have done in this function: I mean, I haven't understand why is not as I written in my code , without sin and cos :

  float y = latPhone - latArd;
  float x = lonPhone - lonArd;
  dirPhone = 2 * atan( y / ( sqrt(x * x + y * y) + x)); //gived in Radians
  dirPhone = dirPhone * 180 / M_PI;  //radians to grade

I haven't tested it in an open space, but if you can explain to me why it is wrong to not considerate sin and cos, it would be great!
Thanks in advance!

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

1 participant