Opened 17 years ago
Closed 17 years ago
#1519 closed defect (fixed)
[PATCH] Fix NumberFormatException in NmeaReader
Reported by: | Owned by: | framm | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Core | Version: | |
Keywords: | Cc: |
Description
Right now the NmeaReader hardcodes a few values that will work if the device/program creating the NMEA file will follow the standard 100%. Naturally some programs don't do that. The attached patch works around that by starting from the rear end parsing latidute and longitude.
The format is xxDDLL.LLLL
xx optional whitespace
DD (int) degres
LL.LLLL (double) latidude
It also trims of any whitspace and skips points that don't follow this format. I'm not sure if silently skipping or bombing out is the better solution. If one the commiter thinks throwing an exception is better just remove the
if (latdegsep < 0) {
return null;
}
and
if (londegsep < 0) {
return null;
}
lines.
Attachments (1)
Change History (2)
by , 17 years ago
Attachment: | nmea-stabilization.patch added |
---|
comment:1 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Added in r938.