Changeset 18048 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/rtklib/RtkLibPosReader.java
r17839 r18048 83 83 currentwp.put(GpxConstants.RTKLIB_SDN, fields[IDX_SDN]); 84 84 currentwp.put(GpxConstants.RTKLIB_SDE, fields[IDX_SDE]); 85 currentwp.put(GpxConstants.RTKLIB_SD E, fields[IDX_SDU]);85 currentwp.put(GpxConstants.RTKLIB_SDU, fields[IDX_SDU]); 86 86 currentwp.put(GpxConstants.RTKLIB_SDNE, fields[IDX_SDNE]); 87 87 currentwp.put(GpxConstants.RTKLIB_SDEU, fields[IDX_SDEU]); … … 90 90 currentwp.put(GpxConstants.RTKLIB_RATIO, fields[IDX_RATIO]); 91 91 double sdn = Double.parseDouble(fields[IDX_SDN]); 92 double sde = Double.parseDouble(fields[IDX_SD N]);92 double sde = Double.parseDouble(fields[IDX_SDE]); 93 93 currentwp.put(GpxConstants.PT_HDOP, (float) Math.sqrt(sdn*sdn + sde*sde)); 94 94 waypoints.add(currentwp); -
trunk/test/unit/org/openstreetmap/josm/io/rtklib/RtkLibPosReaderTest.java
r17987 r18048 51 51 52 52 List<WayPoint> wayPoints = new ArrayList<>(in.getGpxData().tracks.iterator().next().getSegments().iterator().next().getWayPoints()); 53 assertEquals(DateUtils.parseInstant("2019-06-08T08:23:12.000Z"), wayPoints.get(0).get(GpxConstants.PT_TIME)); 53 WayPoint wp0 = wayPoints.get(0); 54 assertEquals(DateUtils.parseInstant("2019-06-08T08:23:12.000Z"), wp0.get(GpxConstants.PT_TIME)); 54 55 assertEquals(DateUtils.parseInstant("2019-06-08T08:23:12.300Z"), wayPoints.get(1).get(GpxConstants.PT_TIME)); 55 56 assertEquals(DateUtils.parseInstant("2019-06-08T08:23:12.600Z"), wayPoints.get(2).get(GpxConstants.PT_TIME)); 56 assertEquals(w ayPoints.get(0).getInstant(), wayPoints.get(0).get(GpxConstants.PT_TIME));57 assertEquals(wp0.getInstant(), wp0.get(GpxConstants.PT_TIME)); 57 58 58 assertEquals(Instant.parse("2019-06-08T08:23:12.000Z"), w ayPoints.get(0).getInstant());59 assertEquals(Instant.parse("2019-06-08T08:23:12.000Z"), wp0.getInstant()); 59 60 assertEquals(Instant.parse("2019-06-08T08:23:12.300Z"), wayPoints.get(1).getInstant()); 60 61 assertEquals(Instant.parse("2019-06-08T08:23:12.600Z"), wayPoints.get(2).getInstant()); 61 62 62 assertEquals(new LatLon(46.948881673, -1.484757046), wayPoints.get(0).getCoor()); 63 assertEquals(5, wayPoints.get(0).get(GpxConstants.RTKLIB_Q)); 64 assertEquals("92.3955", wayPoints.get(0).get(GpxConstants.PT_ELE)); 65 assertEquals("2", wayPoints.get(0).get(GpxConstants.PT_SAT)); 66 assertEquals("2.2090015", wayPoints.get(0).get(GpxConstants.PT_HDOP).toString().trim()); 63 assertEquals(new LatLon(46.948881673, -1.484757046), wp0.getCoor()); 64 assertEquals(5, wp0.get(GpxConstants.RTKLIB_Q)); 65 assertEquals("92.3955", wp0.get(GpxConstants.PT_ELE)); 66 assertEquals("2", wp0.get(GpxConstants.PT_SAT)); 67 assertEquals("1.8191757", wp0.get(GpxConstants.PT_HDOP).toString().trim()); 68 69 assertEquals("1.5620", wp0.get(GpxConstants.RTKLIB_SDN)); 70 assertEquals("0.9325", wp0.get(GpxConstants.RTKLIB_SDE)); 71 assertEquals("0.8167", wp0.get(GpxConstants.RTKLIB_SDU)); 72 assertEquals("-0.7246", wp0.get(GpxConstants.RTKLIB_SDNE)); 73 assertEquals("0.7583", wp0.get(GpxConstants.RTKLIB_SDEU)); 74 assertEquals("0.6573", wp0.get(GpxConstants.RTKLIB_SDUN)); 67 75 } 68 76
Note:
See TracChangeset
for help on using the changeset viewer.