Package de.psi.telco.sumoplayer.util

Examples of de.psi.telco.sumoplayer.util.Point


      }
    }
   
    if (trackedVehicles.contains(vehicleId)){  // handle a tracked vehicle only
      // calculate geo position
      Point p = resolver.resolv(edgeId, laneId, pos);
     
      // calculate jitter if required
      if (jitter > 0){
        double jitterLon = GeoCalc.getLonOffset(p.getX(), p.getY(), jitter)*((Math.random()*2)-1);
        double jitterLat = GeoCalc.getLatOffset(p.getX(), p.getY(), jitter)*((Math.random()*2)-1);
        p = new PointImpl(p.getX()+jitterLon,p.getY()+jitterLat);
      }
     
      // call the listener
      this.listener.LocationUpdated(vehicleId, timestep, p.getX(), p.getY(), speed*3.6);
    }
  }
 
View Full Code Here


  }

  public Point resolv(String edgeId, String laneId, double pos){
    //System.out.println("Resolver call - edge:"+edgeId+" - lane:"+laneId+" - pod:"+pos);
    if (this.network != null){  // network loaded. do look up
      Point out = network.lanes.get(laneId).getPositionWithin(pos);
     
      out = proj.transformInvers(out);
      return out;
    }else{
      return new PointImpl(0,0);
View Full Code Here

 
  public double getLength(){
    if (length == -1){
      length = 0;
      Iterator i = points.iterator();
      Point a = null;
      Point b = null;
      while (i.hasNext()){
        if (a == null){
          a = (Point)i.next();
          continue;
        }
View Full Code Here

    }
    try{
      int idx = 0;
      double len = 0;
      Iterator i = points.iterator();
      Point a = null;
      Point b = null;
      boolean foundWithin = false
      while (i.hasNext()){
        if (a == null){
          a = (Point)i.next();
          continue;
View Full Code Here

TOP

Related Classes of de.psi.telco.sumoplayer.util.Point

Copyright © 2018 www.massapicom. 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.