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

Wrong latitude for Eastern Hemisphere #4

Open
rubenbroman opened this issue Oct 18, 2016 · 2 comments
Open

Wrong latitude for Eastern Hemisphere #4

rubenbroman opened this issue Oct 18, 2016 · 2 comments

Comments

@rubenbroman
Copy link

rubenbroman commented Oct 18, 2016

Hi,

I'm in Stockholm, Sweden which is east of the the prime meridian. Using the fancy-asset-tracker/motion-tracker/main.ino code I've been getting GPS coordinates in the Atlantic ocean where I'm pretty sure I'm not. The fault seems to be that my longitude is negative where it should be positive (Eastern Hemisphere = positive longitude).

Looking thru the code I realise there's a hard coded - in front of longitude on row 214.

+ ",\"lon\":-" + String(convertDegMinToDecDeg(GPS.longitude))

The best solution is probably to use the available GPS.lon value and add a minus sign if the value is 'W'. The same goes for the Latitude where there should be a minus sign if the GPS.latvalue is 'S'.

Cheers
Ruben

@dmiddlecamp
Copy link
Owner

Thanks for reporting! I think you're absolutely right, I'll fix this as soon as I get a chance, which should be next week. Pull requests are of course welcome also if you like! :)

@rubenbroman
Copy link
Author

Thanks for a super quick reply.

I'm not git-savvy enough to pull of a pull request so I'll wait until you get the time.

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