GeoclueShare
GeoclueShare copied to clipboard
Wrong NMEA format when phone locale is not US
This app only works if the phones locale uses "." as decimal separator.
So if your phone is set up for lets say French language it will not work since French use "," as decimal separator.
Because of that the NMEA format will be wrong and look something like this:
$GPGGA,233456,1234,567,N,00123,456,E,1,,7,5,75,1,M,,M,,*66
When it should look like:
$GPGGA,233456,1234.567,N,00123.456,E,1,,7.5,75.1,M,,M,,*66
The solution is actually very simple:
Add Locale.US
to instances of String.format
For example:
latStr = String.format(Locale.US, latStr, degrees, minutes, symbol);
This ensures that the decimal separator is "."
@filipkemuel seems your PR never made it in. This seems very important fix so if you could submit a PR, that would be great. I hope @ankitstarski has time to review and merge.
@ankitstarski this seems like a very serious issue so whether or not @filipkemuel has time to create a PR soon, we should look into merging their changes.
Made a pull request.. But the project hasn't been updated in four years so it seems like it has been abandoned.
@filipkemuel yeah, thanks for the PR. Too bad @ankitstarski has disapeared completely. I hope he's OK.