public class SpatialMatcher
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.util.List<SpatialMatch> |
getSpatialMatches(AvlReport avlReport,
Block block,
java.util.List<Trip> tripsToInvestigate)
Goes through the Block assignment data and determines the closest spatial
matches.
|
static java.util.List<SpatialMatch> |
getSpatialMatches(VehicleState vehicleState)
Starts at the previous match and goes from that point forward through the
block assignment looking for the best spatial matches.
|
static java.util.List<SpatialMatch> |
getSpatialMatchesIgnoringLayovers(AvlReport avlReport,
Block block,
java.util.List<Trip> tripsToInvestigate)
Goes through the Block assignment data and determines the closest spatial
matches that are not for layovers.
|
static boolean |
problemMatchDueToLackOfHeadingInfo(SpatialMatch spatialMatch,
VehicleState vehicleState)
Checks to see if for a non-layover match if can verify that the vehicle
is moving in the proper direction.
|
public static boolean problemMatchDueToLackOfHeadingInfo(SpatialMatch spatialMatch, VehicleState vehicleState)
If cannot confirm that the heading of the vehicle matches then should reject all matches so that won't wrongly match to a layover for another trip. When get another AVL report for the vehicle will then be able to see if heading proper using two AVL reports.
spatialMatch
- The spatial match that should be investigatedvehicleState
- For determining previous AVL reportspublic static java.util.List<SpatialMatch> getSpatialMatches(AvlReport avlReport, Block block, java.util.List<Trip> tripsToInvestigate)
avlReport
- The AVL report to match to the blockblock
- The block being investigatedtripsToInvestigate
- List of trips that should bother investigating. The calling
function can determine which trips are currently active and
pass that list in such that this method doesn't need to look
through all trips.public static java.util.List<SpatialMatch> getSpatialMatchesIgnoringLayovers(AvlReport avlReport, Block block, java.util.List<Trip> tripsToInvestigate)
avlReport
- The AVL report to match to the blockblock
- The block to investigatetripsToInvestigate
- List of trips that should bother investigating. The calling
function can determine which trips are currently active and
pass that list in such that this method doesn't need to look
through all trips.public static java.util.List<SpatialMatch> getSpatialMatches(VehicleState vehicleState)
vehicleState
- the previous vehicle state