Examples of Wgs84Position


Examples of slash.navigation.base.Wgs84Position

    }

    private void deleteLogicalWrongPositionsInList(List<Wgs84Position> positions) {
        int i = 1;
        while (i < positions.size() - 1) {
            Wgs84Position prev = positions.get(i - 1);
            Wgs84Position actual = positions.get(i);
            Wgs84Position next = positions.get(i + 1);

            if (prev.getTime().getTimeInMillis() < actual.getTime().getTimeInMillis() &&
                    actual.getTime().getTimeInMillis() < next.getTime().getTimeInMillis())
                i++;
            else
                positions.remove(i);
        }
    }
View Full Code Here

Examples of slash.navigation.base.Wgs84Position

        ByteBuffer sbpRecordByteBuffer = ByteBuffer.wrap(record);
        sbpRecordByteBuffer.order(ByteOrder.LITTLE_ENDIAN);

        List<Wgs84Route> result = new ArrayList<Wgs84Route>();
        Wgs84Route activeRoute = null;
        Wgs84Position position;
        Wgs84Position previousPosition = null;
        int readBytes = 0, pointCount = 0;
        while (source.read(record) == SBP_RECORD_LENGTH) {
            readBytes += SBP_RECORD_LENGTH;
            do {
                sbpRecordByteBuffer.position(0);
View Full Code Here

Examples of slash.navigation.base.Wgs84Position

                (city != null ? city + ", " : "") +
                (street != null ? street + " " : "") +
                (houseNo != null ? houseNo : "");

        CompactCalendar calendar = parseTime(time);
        Wgs84Position position = new Wgs84Position(parseDouble(longitude), parseDouble(latitude),
                null, null, calendar, description);
        position.setStartDate(startDate);
        return position;
    }
View Full Code Here

Examples of slash.navigation.base.Wgs84Position

        position.setHeading(getHeading());
        return position;
    }

    public Wgs84Position asWgs84Position() {
        Wgs84Position position = super.asWgs84Position();
        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.base.Wgs84Position

        assertFalse(format.isPosition("11.10717,49.37578,HOLSTEINBRUCH BEI WORZEL,HOLSTEINBRUCH BEI WORZELDORF B - GC13VV5"));
    }

    @Test
    public void testParsePosition() {
        Wgs84Position position = format.parsePosition("51.0450383,7.0508300,124.5", null);
        assertDoubleEquals(7.0508300, position.getLongitude());
        assertDoubleEquals(51.0450383, position.getLatitude());
        assertDoubleEquals(124.5, position.getElevation());
        assertNull(position.getDescription());
    }
View Full Code Here

Examples of slash.navigation.base.Wgs84Position

        assertNull(position.getDescription());
    }

    @Test
    public void testParsePositionWithoutElevation() {
        Wgs84Position position = format.parsePosition("51.0450383,7.0508300", null);
        assertDoubleEquals(7.0508300, position.getLongitude());
        assertDoubleEquals(51.0450383, position.getLatitude());
        assertNull(position.getElevation());
        assertNull(position.getDescription());
    }
View Full Code Here

Examples of slash.navigation.base.Wgs84Position

        assertFalse(format.isPosition("Position;X;Y;Empfänger;Land;PLZ;Ort;Strasse;Hausnummer;Planankunft;Zusatzinfos"));
    }

    @Test
    public void testParsePosition() {
        Wgs84Position position = format.parsePosition("113;7.0475000000;50.7500000000;PHE I;;53119;Bonn;Oppelner Str.;126;16:49;", null);
        assertDoubleEquals(7.0475000000, position.getLongitude());
        assertDoubleEquals(50.7500000000, position.getLatitude());
        assertNull(position.getElevation());
        String actual = DateFormat.getDateTimeInstance().format(position.getTime().getTime());
        CompactCalendar expectedCal = calendar(1970, 1, 1, 16, 49, 0);
        String expected = DateFormat.getDateTimeInstance().format(expectedCal.getTime());
        assertEquals(expected,  actual);
        assertEquals(expectedCal, position.getTime());
        assertEquals("PHE I: 53119 Bonn, Oppelner Str. 126", position.getDescription());
    }
View Full Code Here

Examples of slash.navigation.base.Wgs84Position

    public void testParsePositions() {
        String url = format.findURL(INPUT1);
        List<Wgs84Position> positions = format.parsePositions(url);
        assertNotNull(positions);
        assertEquals(17, positions.size());
        Wgs84Position position1 = positions.get(1);
        assertDoubleEquals(-16.8338, position1.getLongitude());
        assertDoubleEquals(32.70498, position1.getLatitude());
        Wgs84Position position3 = positions.get(3);
        assertDoubleEquals(-16.86777, position3.getLongitude());
        assertDoubleEquals(32.66431, position3.getLatitude());
    }
View Full Code Here

Examples of slash.navigation.base.Wgs84Position

        assertEquals("PHE I: 53119 Bonn, Oppelner Str. 126", position.getDescription());
    }

    @Test
    public void testParseNegativePosition() {
        Wgs84Position position = format.parsePosition("113;-7.0475000000;-50.7500000000;PHE I;;53119;Bonn;Oppelner Str.;126;16:49;", null);
        assertDoubleEquals(-7.0475000000, position.getLongitude());
        assertDoubleEquals(-50.7500000000, position.getLatitude());
    }
View Full Code Here

Examples of slash.navigation.base.Wgs84Position

        section.put("Path", "waypoint.bmp");
        section.put("XKoord", "13.41151290");
        section.put("YKoord", "52.52020790");
        assertEquals("waypoint.bmp", section.get("Path"));
        assertEquals(1, section.getPositionCount());
        Wgs84Position position = section.getPosition(0);
        assertEquals(13.41151290, position.getLongitude());
        assertEquals(52.52020790, position.getLatitude());
        assertNull(position.getDescription());
        assertNull(position.getElevation());
        assertNull(position.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.