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

Add real lat/lon to RMC sentence #3

Merged
merged 4 commits into from
Apr 24, 2017
Merged

Conversation

sbender9
Copy link
Member

No description provided.

index.js Outdated

function conv_latlon(val)
{
if ( val < 0 )
Copy link
Member

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
Copy link
Member

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)
Copy link
Member

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?

@tkurki tkurki merged commit f8d1b48 into SignalK:master Apr 24, 2017
fsaux added a commit to fsaux/signalk-to-nmea0183 that referenced this pull request Jan 28, 2023
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

Successfully merging this pull request may close these issues.

2 participants