org.onebusaway.transit_data_federation.services.blocks
Interface ScheduledBlockLocationService


public interface ScheduledBlockLocationService

Methods for retrieving the scheduled location of a vehicle traveling along a block of trips.

Author:
bdferris
See Also:
ScheduledBlockLocation

Method Summary
 ScheduledBlockLocation getScheduledBlockLocationFromDistanceAlongBlock(BlockConfigurationEntry blockConfig, double distanceAlongBlock)
           
 ScheduledBlockLocation getScheduledBlockLocationFromDistanceAlongBlock(ScheduledBlockLocation previousLocation, double distanceAlongBlock)
          Same behavior as getScheduledBlockLocationFromDistanceAlongBlock(BlockConfigurationEntry, double) except we take advantage of the fact that we might already have a ScheduledBlockLocation that comes just a bit before the target scheduleTime, which should make lookup faster.
 ScheduledBlockLocation getScheduledBlockLocationFromScheduledTime(BlockConfigurationEntry blockConfig, int scheduleTime)
          If you request a schedule time that is less than the first arrival time of the block, we will still return a ScheduledBlockLocation.
 ScheduledBlockLocation getScheduledBlockLocationFromScheduledTime(ScheduledBlockLocation previousLocation, int scheduleTime)
          Same behavior as getScheduledBlockLocationFromDistanceAlongBlock(BlockConfigurationEntry, double) except we take advantage of the fact that we might already have a ScheduledBlockLocation that comes just a bit before the target scheduleTime, which should make lookup faster.
 

Method Detail

getScheduledBlockLocationFromScheduledTime

ScheduledBlockLocation getScheduledBlockLocationFromScheduledTime(BlockConfigurationEntry blockConfig,
                                                                  int scheduleTime)
If you request a schedule time that is less than the first arrival time of the block, we will still return a ScheduledBlockLocation. If the distance along the block of the first stop is greater than zero, we attempt to interpolate where the bus currently is along the block based on the relative velocity between the first two stops in the block. We return a null location when requesting a schedule time that is beyond the last scheduled stop time for the block.

Parameters:
stopTimes -
scheduleTime -
Returns:
the schedule block position

getScheduledBlockLocationFromScheduledTime

ScheduledBlockLocation getScheduledBlockLocationFromScheduledTime(ScheduledBlockLocation previousLocation,
                                                                  int scheduleTime)
Same behavior as getScheduledBlockLocationFromDistanceAlongBlock(BlockConfigurationEntry, double) except we take advantage of the fact that we might already have a ScheduledBlockLocation that comes just a bit before the target scheduleTime, which should make lookup faster.

Parameters:
previousLocation - a scheduled block location that comes right before the target schedule time
scheduleTime -
Returns:
the schedule block position

getScheduledBlockLocationFromDistanceAlongBlock

ScheduledBlockLocation getScheduledBlockLocationFromDistanceAlongBlock(BlockConfigurationEntry blockConfig,
                                                                       double distanceAlongBlock)
Parameters:
stopTimes -
distanceAlongBlock - in meters
Returns:
the schedule block position, or null if the distance is outside the range of the block

getScheduledBlockLocationFromDistanceAlongBlock

ScheduledBlockLocation getScheduledBlockLocationFromDistanceAlongBlock(ScheduledBlockLocation previousLocation,
                                                                       double distanceAlongBlock)
Same behavior as getScheduledBlockLocationFromDistanceAlongBlock(BlockConfigurationEntry, double) except we take advantage of the fact that we might already have a ScheduledBlockLocation that comes just a bit before the target scheduleTime, which should make lookup faster.

Parameters:
previousLocation - a scheduled block location that comes right before the target schedule time
scheduleTime -
Returns:
the schedule block position


Copyright © 2011 OneBusAway. All Rights Reserved.