Examples of GpxPosition


Examples of slash.navigation.gpx.GpxPosition

        this.heading = heading;
    }
   

    public GpxPosition asGpxPosition() {
        GpxPosition position = super.asGpxPosition();
        position.setHeading(getHeading());
        return position;
    }
View Full Code Here

Examples of slash.navigation.gpx.GpxPosition

    public Wgs84Position asGpsTunerPosition() {
        return asWgs84Position();
    }

    public GpxPosition asGpxPosition() {
        return new GpxPosition(getLongitude(), getLatitude(), getElevation(), getSpeed(), getTime(), getDescription());
    }
View Full Code Here

Examples of slash.navigation.gpx.GpxPosition

        this.satellites = satellites;
    }


    public GpxPosition asGpxPosition() {
        GpxPosition position = super.asGpxPosition();
        position.setHeading(getHeading());
        position.setHdop(getHdop());
        position.setPdop(getPdop());
        position.setVdop(getVdop());
        position.setSatellites(getSatellites());
        return position;
    }
View Full Code Here

Examples of slash.navigation.gpx.GpxPosition

        else
            return null;
    }

    public GpxPosition asGpxPosition() {
        GpxPosition position = super.asGpxPosition();
        position.setHeading(getHeading());
        position.setHdop(getHdop());
        position.setPdop(getPdop());
        position.setVdop(getVdop());
        position.setSatellites(getSatellites());
        return position;
    }
View Full Code Here

Examples of slash.navigation.gpx.GpxPosition

    private List<NavigationPosition> copy(List<NavigationPosition> positions) {
        List<NavigationPosition> result = new ArrayList<NavigationPosition>();
        for (NavigationPosition position : positions) {
            // TODO should copy extra properties, too
            result.add(new GpxPosition(position.getLongitude(), position.getLatitude(), position.getElevation(),
                    position.getSpeed(), position.getTime(), position.getDescription()));
        }
        return result;
    }
View Full Code Here

Examples of slash.navigation.gpx.GpxPosition

        checkTripmasterDescription("Weil Der Stadt", "Wpt", "13:36:13 - Wpt : Weil Der Stadt - 408.5 m - 0.1 km - 25 km/h");
        checkTripmasterDescription("Acigné", "Cape 155", "08:52:25 - Cape 155 : Acigné - 39.4 m - 2.1 km - 54 Km/h");
    }

    private void checkTripmasterGpxDescription(String expectedDescription, String expectedReason, String description) {
        GpxPosition position = new GpxPosition(0.0, 0.0, 0.0, null, null, description);
        assertEquals(expectedReason, position.getReason());
        assertEquals(expectedDescription, position.getCity());
        assertEquals(expectedDescription, position.getDescription());
    }
View Full Code Here

Examples of slash.navigation.gpx.GpxPosition

        assertNotNull(routes);
        assertEquals(1, routes.size());
        GpxRoute route = routes.get(0);
        assertEquals(Track, route.getCharacteristics());
        assertEquals(881, route.getPositionCount());
        GpxPosition position1 = route.getPositions().get(441);
        assertDoubleEquals(53.9783, position1.getLatitude());
        assertDoubleEquals(11.148, position1.getLongitude());
        assertDoubleEquals(22.6, position1.getElevation());
        assertEquals("Kl\u00fctz", position1.getDescription());
        assertEquals("Kl\u00fctz", position1.getCity());
        assertEquals("Richtung 248", position1.getReason());
        assertDoubleEquals(248.0, position1.getHeading());
        CompactCalendar actual = position1.getTime();
        String cal1 = DateFormat.getDateTimeInstance().format(actual.getTime());
        CompactCalendar expected = calendar(2007, 6, 23, 14, 57, 14);
        String cal2 = DateFormat.getDateTimeInstance().format(expected.getTime());
        assertEquals(cal2, cal1);
        assertEquals(expected.getTimeInMillis(), actual.getTimeInMillis());
        assertEquals(expected.getTime(), actual.getTime());

        GpxPosition position2 = route.getPositions().get(442);
        assertDoubleEquals(53.978, position2.getLatitude());
        assertDoubleEquals(11.1451, position2.getLongitude());
        assertDoubleEquals(18.0, position2.getElevation());
        assertEquals("Kl\u00fctz", position2.getDescription());
        assertEquals("Kl\u00fctz", position2.getCity());
        assertEquals("Punkt", position2.getReason());

        GpxPosition position3 = route.getPositions().get(443);
        assertDoubleEquals(53.9778, position3.getLatitude());
        assertDoubleEquals(11.1386, position3.getLongitude());
        assertDoubleEquals(20.3, position3.getElevation());
        assertEquals("Kl\u00fctz", position3.getDescription());
        assertEquals("Kl\u00fctz", position3.getCity());
        assertEquals("Abstand 211", position3.getReason());
    }
View Full Code Here

Examples of slash.navigation.gpx.GpxPosition

        assertNotNull(routes);
        assertEquals(1, routes.size());
        GpxRoute route = routes.get(0);
        assertEquals(Track, route.getCharacteristics());
        assertEquals(735, route.getPositionCount());
        GpxPosition position1 = route.getPositions().get(441);
        assertDoubleEquals(53.79967, position1.getLatitude());
        assertDoubleEquals(10.36535, position1.getLongitude());
        assertDoubleEquals(17.9, position1.getElevation());
        assertDoubleEquals(13.0, position1.getSpeed());
        assertEquals("Bad Oldesloe; 170.1 Km", position1.getDescription());
        assertEquals("Bad Oldesloe; 170.1 Km", position1.getCity());
        assertEquals("Course 184", position1.getReason());
        CompactCalendar actual = position1.getTime();
        String cal1 = DateFormat.getDateTimeInstance().format(actual.getTime());
        CompactCalendar expected = calendar(2007, 7, 15, 15, 2, 53);
        String cal2 = DateFormat.getDateTimeInstance().format(expected.getTime());
        assertEquals(cal2, cal1);
        assertEquals(expected.getTimeInMillis(), actual.getTimeInMillis());
        assertEquals(expected.getTime(), actual.getTime());

        GpxPosition position2 = route.getPositions().get(442);
        assertDoubleEquals(53.79544, position2.getLatitude());
        assertDoubleEquals(10.35700, position2.getLongitude());
        assertDoubleEquals(3.9, position2.getElevation());
        assertDoubleEquals(13.0, position1.getSpeed());
        assertEquals("Bad Oldesloe; 170.9 Km", position2.getDescription());
        assertEquals("Bad Oldesloe; 170.9 Km", position2.getCity());
        assertEquals("Dist. 171", position2.getReason());

        GpxPosition position3 = route.getPositions().get(443);
        assertDoubleEquals(53.79446, position3.getLatitude());
        assertDoubleEquals(10.35603, position3.getLongitude());
        assertDoubleEquals(5.6, position3.getElevation());
        assertEquals("Bad Oldesloe; 171.0 Km", position3.getDescription());
        assertEquals("Bad Oldesloe; 171.0 Km", position3.getCity());
        assertEquals("Dur. 3:49:31", position3.getReason());
    }
View Full Code Here

Examples of slash.navigation.gpx.GpxPosition

        Calendar local = localCalendar(now).getCalendar();
        CompactCalendar compactLocal = fromCalendar(local);
        Calendar utc = utcCalendar(now).getCalendar();
        CompactCalendar compactUtc = fromCalendar(utc);

        GpxPosition gpxPosition = new GpxPosition(3.0, 2.0, 1.0, null, compactLocal, "gpx");
        assertCalendarEquals(compactUtc, gpxPosition.getTime());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.