i've observed some apps misinterpreting non-padded 2 digit longitude values in the encoded $GPRMC sentences - like:
$GPRMC,165550.00,A,3732.74173,N,7620.78632,W,3.6,1.46,181027,,,A*4D
...and reading that as 762 degrees W... which is nuts.. but meh.
The NMEA standard says:
"Longitude yyyyy.yy Fixed/Variable length field:
degreesminutes.decimal - 3 fixed digits of degrees, 2 fixed
digits of minutes and a variable number of digits for
decimal-fraction of minutes. Leading zeros always
included for degrees and minutes to maintain fixed length.
The decimal point and associated decimal-fraction are
optional if full resolution is not required."
So I have adjusted the code to pad longitude degrees to 3 digits, and latitude degrees to 2 digits.
fix readme examples fix failing unit tests
i've observed some apps misinterpreting non-padded 2 digit longitude values in the encoded $GPRMC sentences - like: $GPRMC,165550.00,A,3732.74173,N,7620.78632,W,3.6,1.46,181027,,,A*4D
...and reading that as 762 degrees W... which is nuts.. but meh.
The NMEA standard says:
"Longitude yyyyy.yy Fixed/Variable length field: degreesminutes.decimal - 3 fixed digits of degrees, 2 fixed digits of minutes and a variable number of digits for decimal-fraction of minutes. Leading zeros always included for degrees and minutes to maintain fixed length. The decimal point and associated decimal-fraction are optional if full resolution is not required."
So I have adjusted the code to pad longitude degrees to 3 digits, and latitude degrees to 2 digits.