예제 #1
0
          @Override
          public Void call() throws Exception {
            GpsPoint tmp = trackLDMIO.getLastGpsPoint();
            Point2D newpoint = translateToPoint2D(mapDisplayAdapter.lastPos);
            trackLDMIO.addMarker(new Marker(newpoint, tmp.time + 500, tmp));

            tmp.time += 500;
            addGpsPoint(tmp);

            return null;
          }
예제 #2
0
          @Override
          public Void call() throws Exception {
            long nexttime =
                (trackLDMIO.getAllGpsPoints().size() == 0)
                    ? 1000
                    : trackLDMIO.getLastGpsPoint().time + 1000;
            GpsPoint newpoint =
                new GpsPoint(
                    globeDisplayAdapter.lastPos.getLongitude().degrees,
                    globeDisplayAdapter.lastPos.getLatitude().degrees,
                    nexttime);
            addGpsPoint(newpoint);

            return null;
          }
예제 #3
0
    /**
     * Loads .track file from newTrackFile to trackLDMIO, inits debug run, zooms to newest GpsPoint
     *
     * @param newTrackFile URI to track file
     * @return if loading the trackfile was successful
     */
    private boolean loadNewData(String newTrackFile) {
      LDMIOTrack tmpTrackLDMIO;
      try {
        tmpTrackLDMIO = new LDMIOTrack(newTrackFile);
      } catch (IOException e) {
        return false;
      }

      save();
      trackLDMIO = tmpTrackLDMIO;

      enableSettingsMode(true);
      initDebugRun();

      if (trackLDMIO.getAllGpsPoints().size() > 0) {
        View view = globeMapPanel.wwd.getView();
        view.goTo(new Position(translateToGlobePosition(trackLDMIO.getLastGpsPoint()), 0), 4000);
      }

      slider.setMaximum(
          (trackLDMIO.getAllGpsPoints() == null) ? 0 : trackLDMIO.getAllGpsPoints().size());
      setTitle("testloc.world + " + newTrackFile);
      return true;
    }