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

pos2nmea: handle properly positions W and S #3

Merged
merged 3 commits into from Nov 21, 2017

Conversation

Projects
None yet
2 participants
@daniestevez
Contributor

daniestevez commented Nov 19, 2017

This fixes a bug where positions west of Greenwich or south of the
equator are not converted correctly to the format used in NMEA.

The bug happens as follows. For instance, to convert longitude -3.58021, the code computes -3 * 100 + 60 * 0.58021 and then inverts the sign of the whole thing. The correct computation is (-1) * (-3) * 100+60 * 0.058021.

daniestevez added some commits Nov 19, 2017

pos2nmea: handle properly positions W and S
This fixes a bug where positions west of Greenwich or south of the
equator are not converted correctly to the format used in NMEA.

@rs1729 rs1729 merged commit 639dc9b into rs1729:master Nov 21, 2017

@rs1729

This comment has been minimized.

Show comment
Hide comment
@rs1729

rs1729 Nov 21, 2017

Owner

thanks

Owner

rs1729 commented Nov 21, 2017

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment