Ignore:
Timestamp:
2021-07-17T15:51:20+02:00 (3 years ago)
Author:
Don-vip
Message:

fix #20677 - fix wrong parsing of RTKLIB .pos files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/io/rtklib/RtkLibPosReaderTest.java

    r17987 r18048  
    5151
    5252        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));
    5455        assertEquals(DateUtils.parseInstant("2019-06-08T08:23:12.300Z"), wayPoints.get(1).get(GpxConstants.PT_TIME));
    5556        assertEquals(DateUtils.parseInstant("2019-06-08T08:23:12.600Z"), wayPoints.get(2).get(GpxConstants.PT_TIME));
    56         assertEquals(wayPoints.get(0).getInstant(), wayPoints.get(0).get(GpxConstants.PT_TIME));
     57        assertEquals(wp0.getInstant(), wp0.get(GpxConstants.PT_TIME));
    5758
    58         assertEquals(Instant.parse("2019-06-08T08:23:12.000Z"), wayPoints.get(0).getInstant());
     59        assertEquals(Instant.parse("2019-06-08T08:23:12.000Z"), wp0.getInstant());
    5960        assertEquals(Instant.parse("2019-06-08T08:23:12.300Z"), wayPoints.get(1).getInstant());
    6061        assertEquals(Instant.parse("2019-06-08T08:23:12.600Z"), wayPoints.get(2).getInstant());
    6162
    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));
    6775    }
    6876
Note: See TracChangeset for help on using the changeset viewer.