Package org.onebusaway.transit_data_federation.model

Examples of org.onebusaway.transit_data_federation.model.TargetTime


    return results;
  }

  @Override
  public BlockLocation getBlockForVehicle(AgencyAndId vehicleId, long time) {
    TargetTime target = new TargetTime(time, time);
    return _blockLocationService.getLocationForVehicleAndTime(vehicleId, target);
  }
View Full Code Here


      long time, List<BlockLocation> results) {

    if (instance == null)
      return;

    TargetTime target = new TargetTime(time, time);

    // Try real-time trips first
    List<BlockLocation> locations = _blockLocationService.getLocationsForBlockInstance(
        instance, target);
View Full Code Here

   
    List<Record> records = new ArrayList<Record>();

    for (int i = 0; i < 5 * 60; i += 30) {

      TargetTime tt = new TargetTime(time - i * 1000);
      BlockLocation location = _blockLocationService.getLocationForVehicleAndTime(
          vid, tt);

      if (location != null) {

        CoordinatePoint p = applyNoiseToLocation(location.getLocation(), noise);

        Record r = new Record();
        r.setLocation(location.getLocation());
        r.setTimestamp(tt.getTargetTime());
        r.setLocation(p);
        r.setAccuracy(noise);
        records.add(r);
      }
    }
View Full Code Here

TOP

Related Classes of org.onebusaway.transit_data_federation.model.TargetTime

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.