Search in sources :

Example 16 with TripStatusBean

use of org.onebusaway.transit_data.model.trips.TripStatusBean in project onebusaway-application-modules by camsys.

the class CurrentVehicleEstimationServiceImpl method addResult.

private void addResult(BlockLocation location, double cumulativeP, String debug, double minProbabilityForConsideration, List<CurrentVehicleEstimateBean> beans) {
    if (cumulativeP >= minProbabilityForConsideration) {
        CurrentVehicleEstimateBean bean = new CurrentVehicleEstimateBean();
        bean.setProbability(cumulativeP);
        TripStatusBean status = _tripStatusBeanService.getBlockLocationAsStatusBean(location, location.getTime());
        bean.setTripStatus(status);
        bean.setDebug(debug);
        beans.add(bean);
    }
}
Also used : CurrentVehicleEstimateBean(org.onebusaway.transit_data.model.realtime.CurrentVehicleEstimateBean) TripStatusBean(org.onebusaway.transit_data.model.trips.TripStatusBean)

Aggregations

TripStatusBean (org.onebusaway.transit_data.model.trips.TripStatusBean)16 TripBean (org.onebusaway.transit_data.model.trips.TripBean)12 ArrayList (java.util.ArrayList)8 RouteBean (org.onebusaway.transit_data.model.RouteBean)6 StopBean (org.onebusaway.transit_data.model.StopBean)5 FeedEntity (com.google.transit.realtime.GtfsRealtime.FeedEntity)4 AgencyAndId (org.onebusaway.gtfs.model.AgencyAndId)4 VehicleStatusBean (org.onebusaway.transit_data.model.VehicleStatusBean)4 ServiceAlertBean (org.onebusaway.transit_data.model.service_alerts.ServiceAlertBean)4 Date (java.util.Date)3 Test (org.junit.Test)3 TimepointPredictionRecord (org.onebusaway.realtime.api.TimepointPredictionRecord)3 ArrivalAndDepartureBean (org.onebusaway.transit_data.model.ArrivalAndDepartureBean)3 BlockTripBean (org.onebusaway.transit_data.model.blocks.BlockTripBean)3 BlockStopTimeEntry (org.onebusaway.transit_data_federation.services.transit_graph.BlockStopTimeEntry)3 FeedMessage (com.google.transit.realtime.GtfsRealtime.FeedMessage)2 TripDescriptor (com.google.transit.realtime.GtfsRealtime.TripDescriptor)2 TripUpdate (com.google.transit.realtime.GtfsRealtime.TripUpdate)2 VehicleDescriptor (com.google.transit.realtime.GtfsRealtime.VehicleDescriptor)2 VehiclePosition (com.google.transit.realtime.GtfsRealtime.VehiclePosition)2