Changeset 12424 in josm for trunk/src/org
- Timestamp:
- 2017-06-22T22:02:55+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/nmea/NmeaReader.java
r12422 r12424 42 42 public class NmeaReader { 43 43 44 publicenum VTG {44 enum VTG { 45 45 COURSE(1), COURSE_REF(2), // true course 46 46 COURSE_M(3), COURSE_M_REF(4), // magnetic course … … 56 56 } 57 57 58 publicenum RMC {58 enum RMC { 59 59 TIME(1), 60 60 /** Warning from the receiver (A = data ok, V = warning) */ … … 78 78 } 79 79 80 publicenum GGA {80 enum GGA { 81 81 TIME(1), LATITUDE(2), LATITUDE_NAME(3), LONGITUDE(4), LONGITUDE_NAME(5), 82 82 /** … … 96 96 } 97 97 98 publicenum GSA {98 enum GSA { 99 99 AUTOMATIC(1), 100 100 FIX_TYPE(2), // 1 = not fixed, 2 = 2D fixed, 3 = 3D fixed) … … 108 108 public final int position; 109 109 GSA(int position) { 110 this.position = position; 111 } 112 } 113 114 enum GLL { 115 LATITUDE(1), LATITUDE_NS(2), // Latitude, NS 116 LONGITUDE(3), LONGITUDE_EW(4), // Latitude, EW 117 UTC(5), // Universal Time Coordinated 118 STATUS(6), // Status: A = Data valid, V = Data not valid 119 /** 120 * Mode (A = autonom; D = differential; E = estimated; N = not valid; S = simulated) 121 * @since NMEA 2.3 122 */ 123 MODE(7); 124 125 public final int position; 126 GLL(int position) { 110 127 this.position = position; 111 128 } … … 413 430 414 431 // TODO fix? 415 // * Mode (A = autonom; D = differential; E = estimated; N = not valid; S 416 // * = simulated) 432 // * Mode (A = autonom; D = differential; E = estimated; N = not valid; S = simulated) 417 433 // * 418 434 // * @since NMEA 2.3 419 435 // 420 436 //MODE(12); 437 } else if (isSentence(e[0], Sentence.GLL)) { 438 // coordinates 439 LatLon latLon = parseLatLon( 440 e[GLL.LATITUDE_NS.position], 441 e[GLL.LONGITUDE_EW.position], 442 e[GLL.LATITUDE.position], 443 e[GLL.LONGITUDE.position] 444 ); 445 if (LatLon.ZERO.equals(latLon)) { 446 ps.zeroCoord++; 447 return false; 448 } 449 // only consider valid data 450 if (!"A".equals(e[GLL.STATUS.position])) { 451 return false; 452 } 453 454 // RMC sentences contain a full date while GLL sentences contain only time, 455 // so create new waypoints only of the NMEA file does not contain RMC sentences 456 if (ps.pTime == null || currentwp == null) { 457 currentwp = new WayPoint(latLon); 458 } 421 459 } else { 422 460 ps.unknown++;
Note:
See TracChangeset
for help on using the changeset viewer.