ipeaGIT / gtfs2gps

Convert GTFS data into a data.table with GPS-like records in R
https://ipeagit.github.io/gtfs2gps/
Other
71 stars 10 forks source link

adjust_arrival_departure needs to consider midnight trips #237

Open Joaobazzo opened 2 years ago

Joaobazzo commented 2 years ago

If a trip starts at 00:00:00, the first line of àrrival_time would be negative

> tmp_gtfs <- gtfs2gps::adjust_arrival_departure(gtfs_data = tmp_gtfs
                                               ,min_lag = 15)
> tmp_gtfs$stop_times
        trip_id arrival_time departure_time  stop_id stop_sequence
 1: 1012-10-0_1    -00:00:07       00:00:07   301729             1
 2: 1012-10-0_1     00:01:35       00:01:50   301764             2
 3: 1012-10-0_1     00:03:18       00:03:33   301724             3
 4: 1012-10-0_1     00:05:01       00:05:16 30003042             4