Closed mk-fg closed 7 years ago
Same thing repeats for W34557_W34958 association of likely same trains, apparently splitting at the same stop in similar fashion later in the day: https://gist.github.com/mk-fg/b22916dfb3007dba643df4f4c0657e58
EDIT: and in many other places actually - definitely mismatch in how times are handled, not underlying data.
I believe it's because I'm only storing one time (public if it's available, scheduled if not) the arrival of the W34557 at SAL is 13:56 and therefore the W34557_W34958 cannot depart SAL at 13:55 as it's departure time would be earlier than the arrival time.
I guess I could just always assume that the first stop of the assoc service will always have the correct time but then the arrival time will always be inaccurate as the first stop of any service never has an arrival time.
Btw, southeasternrailways api only returns one time for stops, which matches departure times, so those are the only ones that get checked. If arrival times are inaccurate, they'd never be reported like that, unfortunately.
always be inaccurate
Guess that'd be only different if splits can happen after the public stop, in which case setting arrivals from base train will sometimes be accurate. I don't know enough about railways, but can that be the case? Or maybe trains always separate before boarding/unloading passengers?
But of an ugly fix, but I've changed the behaviour so that it uses the arrival and departure time of the assoc schedule stop if my merge doesn't make sense.
As far as I know passengers are always allowed off the train before and split or join happens
As far as I know passengers are always allowed off the train before and split or join happens
Hmm, that's interesting, looks like a mismatch/bug in the atoc data then, or how'd there be an arrival time before departure then?
And setting minimal departure time in this case sounds like a safer fix, indeed.
Looking at W34496_W34952 association with pre-latest timetable data (ttis653.zip): https://gist.github.com/mk-fg/93a5acda3e710d215665d2a7657dcef5
For date 2017-09-10:
southeasternrailway.co.uk has (or had) 13:55 as a departure time for that SAL stop, which seem to make sense here - it looks like W34952 might split from W34496 before latter makes public stop, hence public arrival for W34496 is after W34952.
Which is why I think in case of splitting trains, it'd seem to be more correct to only use arrival/departure times of the splitting part on that stop, completely ignoring times for other - potentially already separated - part, and not combine arrival/departure like it's currently done.