-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add real lat/lon to RMC sentence #3
Conversation
index.js
Outdated
|
||
function conv_latlon(val) | ||
{ | ||
if ( val < 0 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Math.abs()
index.js
Outdated
} | ||
|
||
var lati = Math.floor(val) | ||
var latm = val - lati |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me val % 1
would read easier.
I would also use longer variable names to make it obvious what is being done.
index.js
Outdated
return (pad + n).slice(-pad.length); | ||
} | ||
|
||
function conv_latlon(val) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about toNmeaDegrees
or something similar?
No description provided.