Closed HerrLevin closed 2 years ago
Okay, so this is definitely happening.
Current example is the S8 from Wiesbaden Hbf towards Offenbach. They're ending in Mainz-Bischofsheim.
The last available station also has a cancelled
tag. We could distinguish a cancelled station from an available station by looking at arrival
, plannedArrival
and the not nulled arrivalPlatform
.
"arrival": "2022-03-03T09:42:00+01:00",
"plannedArrival": "2022-03-03T09:40:00+01:00",
"arrivalDelay": 120,
"arrivalPlatform": "1",
"plannedArrivalPlatform": "2",
"departure": null,
"plannedDeparture": "2022-03-03T09:40:00+01:00",
"departureDelay": null,
"departurePlatform": null,
"plannedDeparturePlatform": null,
"cancelled": true,
The result of https://v5.db.transport.rest/trips/1|229480|2|80|3032022?lineName=S 8
(in parts):
{
"origin": {
"type": "stop",
"id": "8000250",
"name": "Wiesbaden Hbf",
"location": {
"type": "location",
"id": "8000250",
"latitude": 50.070563,
"longitude": 8.243639
},
"products": {
"...": "..."
}
},
"destination": {
"type": "stop",
"id": "8004645",
"name": "Offenbach(Main)Ost",
"location": {
"type": "location",
"id": "8004645",
"latitude": 50.102655,
"longitude": 8.784529
},
"products": {
"...": "..."
}
},
"departure": "2022-03-03T09:18:00+01:00",
"plannedDeparture": "2022-03-03T09:18:00+01:00",
"departureDelay": 0,
"arrival": null,
"plannedArrival": "2022-03-03T10:32:00+01:00",
"arrivalDelay": null,
"reachable": true,
"line": {
"type": "line",
"id": "4-800528-8",
"fahrtNr": "35825",
"name": "S 8",
"public": true,
"adminCode": "800528",
"productName": "S",
"mode": "train",
"product": "suburban",
"operator": {
"type": "operator",
"id": "db-regio-ag-s-bahn-rhein-main",
"name": "DB Regio AG S-Bahn Rhein-Main"
}
},
"direction": "Offenbach(Main)Ost",
"arrivalPlatform": null,
"plannedArrivalPlatform": null,
"departurePlatform": "3",
"plannedDeparturePlatform": "3",
"stopovers": [
{
"stop": {
"type": "stop",
"id": "8000250",
"name": "Wiesbaden Hbf",
"location": {
"type": "location",
"id": "8000250",
"latitude": 50.070563,
"longitude": 8.243639
},
"products": {
"nationalExpress": true,
"national": true,
"regionalExp": false,
"regional": true,
"suburban": true,
"bus": true,
"ferry": false,
"subway": false,
"tram": false,
"taxi": false
}
},
"arrival": null,
"plannedArrival": null,
"arrivalDelay": null,
"arrivalPlatform": null,
"plannedArrivalPlatform": null,
"departure": "2022-03-03T09:18:00+01:00",
"plannedDeparture": "2022-03-03T09:18:00+01:00",
"departureDelay": 0,
"departurePlatform": "3",
"plannedDeparturePlatform": "3"
},
{
"stop": {
"type": "stop",
"id": "8006404",
"name": "Wiesbaden Ost",
"location": {
"type": "location",
"id": "8006404",
"latitude": 50.041438,
"longitude": 8.256412
},
"products": {
"nationalExpress": false,
"national": false,
"regionalExp": false,
"regional": true,
"suburban": true,
"bus": true,
"ferry": false,
"subway": false,
"tram": false,
"taxi": false
}
},
"arrival": "2022-03-03T09:22:00+01:00",
"plannedArrival": "2022-03-03T09:22:00+01:00",
"arrivalDelay": 0,
"arrivalPlatform": "3",
"plannedArrivalPlatform": "3",
"departure": "2022-03-03T09:22:00+01:00",
"plannedDeparture": "2022-03-03T09:22:00+01:00",
"departureDelay": 0,
"departurePlatform": "3",
"plannedDeparturePlatform": "3"
},
{
"...": "..."
},
{
"stop": {
"type": "stop",
"id": "8000241",
"name": "Mainz-Bischofsheim",
"location": {
"type": "location",
"id": "8000241",
"latitude": 49.992941,
"longitude": 8.358062
},
"products": {
"...": "..."
}
},
"arrival": "2022-03-03T09:42:00+01:00",
"plannedArrival": "2022-03-03T09:40:00+01:00",
"arrivalDelay": 120,
"arrivalPlatform": "1",
"plannedArrivalPlatform": "2",
"departure": null,
"plannedDeparture": "2022-03-03T09:40:00+01:00",
"departureDelay": null,
"departurePlatform": null,
"plannedDeparturePlatform": null,
"cancelled": true,
"remarks": []
},
{
"stop": {
"type": "stop",
"id": "8005221",
"name": "Rüsselsheim Opelwerk",
"location": {
"type": "location",
"id": "8005221",
"latitude": 49.987827,
"longitude": 8.400743
},
"products": {
"...": "..."
}
},
"arrival": null,
"plannedArrival": "2022-03-03T09:44:00+01:00",
"arrivalDelay": null,
"arrivalPlatform": null,
"plannedArrivalPlatform": null,
"departure": null,
"plannedDeparture": "2022-03-03T09:44:00+01:00",
"departureDelay": null,
"departurePlatform": null,
"plannedDeparturePlatform": null,
"cancelled": true,
"remarks": []
}
],
"cancelled": true,
"id": "1|229480|2|80|3032022",
"realtimeDataUpdatedAt": 1646295074
}
Describe the bug When a train terminates before its last station, it might provoke a false-positive "cancelled station". In this example, the RE 8 19074 terminates in Lauda instead of Würzburg Hbf. Both stops have the
cancelled
key set totrue
, however Lauda still has aarrival
, aarrivalDelay
and aarrivalPlatform
, everydeparture
-tag is set to null. I'm guessing thatcancelled
might only be an indicater whether the train still departs from this stop.To Reproduce Find a Train with cancelled last stop.
Expected behavior Show the correct stops.
Additional context Tested on 2020-02-21 with
1|262777|0|80|21022020
between 15:50 and 16:10.API-Response: