Checkpoint

This commit is contained in:
2026-05-14 08:42:10 +01:00
parent b3f251e4cc
commit 2dd7d2f83e
5 changed files with 42 additions and 26 deletions
+4 -1
View File
@@ -68,10 +68,13 @@ impl Gtfs {
if trips.contains_key(&stop_time.trip_id) {
let stop_timestamp = stop_time.departure_time.or(stop_time.arrival_time).unwrap();
debug!("Stop timestamp {} current timestamp {}", stop_timestamp, current_timestamp);
let trip= &self.trips.get(&stop_time.trip_id).unwrap();
if current_timestamp < stop_timestamp.into() {
let arrival: Arrival = Arrival {
route: self.routes.get(&self.trips.get(&stop_time.trip_id).unwrap().route_id).unwrap(),
route: self.routes.get(&trip.route_id).unwrap(),
stop: self.stops.get(&stop_time.stop_id).unwrap(),
stop_time: stop_time,
trip: &trip,
departure_time: NaiveTime::from_num_seconds_from_midnight_opt(stop_timestamp, 0).unwrap()
};
arrivals.push(arrival);