public Emulation(Route r) {
   route = r;
   sStation = route.getRoute().get(0);
   fStation = route.getRoute().get(route.getRoute().size() - 1);
   lon = sStation.getCoordinatePoint().getLon();
   lat = sStation.getCoordinatePoint().getLat();
   prStation = sStation;
   nextStation = route.getRoute().get(1);
 }
 public void calculate() {
   if (!isDone) {
     if (distance() < 0.003) {
       lon = nextStation.getCoordinatePoint().getLon();
       lat = nextStation.getCoordinatePoint().getLat();
       prStation = nextStation;
       route.getRoute().remove(0);
       if (prStation == fStation) {
         done();
       } else {
         nextStation = route.getRoute().get(1);
       }
     }
   }
   destination = nextStation.getCoordinatePoint();
 }