-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Description
A null direction stops the handleArrivalDeparture method of PredictionAccuracyModule matching an arrivalDeparture event to a PredAccuracyPrediction in memory. The map key includes direction.
PredictionKey key = new PredictionKey(arrivalDeparture.getVehicleId(),
arrivalDeparture.getDirectionId(), arrivalDeparture.getStopId());
List<PredAccuracyPrediction> predsList = predictionMap.get(key);
Not sure on the solution but for me I did this in the new GTFSRealtimePredictionAccuracyModule I am working on. This is similar to what is done in NextBusPredictionAccuracyModule.
String direction=null;
if(update.getTrip().hasDirectionId())
direction=""+update.getTrip().getDirectionId();
if (update.getTrip() != null) {
Trip trip = dbConfig.getTrip(update.getTrip().getTripId());
if (trip != null) {
direction = trip.getDirectionId();
} else {
logger.error("Got tripTag={} but no such trip in "
+ "the configuration.", update.getTrip().getTripId());
}
}
Metadata
Metadata
Assignees
Labels
No labels