Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show delay times #9

Open
thekonz opened this issue Mar 4, 2016 · 6 comments
Open

Show delay times #9

thekonz opened this issue Mar 4, 2016 · 6 comments

Comments

@thekonz
Copy link

thekonz commented Mar 4, 2016

There should be data about delays in the API.

It should show in the departureBoard, arrivalBoard and journeyDetail.

Proposed format for departureBoard and arrivalBoard:

"Departure/Arrival": [
    {
        "name": "IC 2264",
        "type": "IC",
        "stopid": "8000191",
        "stop": "Karlsruhe Hbf",
        "time": "19:55",
        "isDelayed": true,
        "delayAmount": "00:05",
        "date": "2016-03-04",
        "direction": "Basel Bad Bf",
        "track": "6",
        "JourneyDetailRef":
        {
            "ref": "http://..."
        }
    }
]

With the isDelayed, you indicate, whether the train is delayed. If you have a delayed train without an estimated amount of delay time, the delayAmount would be 00:00 or null, but the isDelayed still shows the fact, that the train is delayed.

Proposed format for journeyDetail:

"Stops": {
    "Stop": [
        {
            "name": "München Hbf",
            "id": "8000261",
            "lon": "11.558338",
            "lat": "48.140228",
            "routeIdx": "0",
            "depTime": "16:48",
            "isDelayed": true,
            "delayAmount": "00:05",
            "depDate": "2016-03-04",
            "track": "17"
        }
    ]
}

What do you think about the format?

@marcelbuesing
Copy link

isDelayed would be fairly subjective. From my perspective one minute late could already mean delayed. I think either a delay, like you mentioned 00:05, or a scheduled arrival 16:48 and actual arrival 16:53 would make more sense.

@highsource
Copy link
Collaborator

In Lufthansa API they have:

  • scheduledTimeLocal, scheduledTimeUTC
  • estimatedTimeLocal``,estimatedTimeUTC`
  • actualTimeLocal``,actualTimeUTC`

Both for depature and arrival. They also have timeStatus like delayed or early. This is subjective, but there is some official DB "opinion" on that.

@Stefan-Hintz
Copy link

The above Lufthansa API approach looks much more useful to me.
There should be standard date format, which includes time and timezone.
I think, if all dates include the given timezone of the local station, then the UTC fields might not needed.
Having them could be convenient but increases the size of the JSON.

@Stefan-Hintz
Copy link

Stefan-Hintz commented Jun 6, 2016

(How would cancelled trains will be displayed?)

I found now the documentation of cancelled trains in:
http://open-api.bahn.de/bin/rest.exe/v1.0/xsd?name=hafasRestDepartureBoard.xsd

It would be nice, if all the spreaded documentation would be here at github. So changed to it would be clearly visible.

@Stefan-Hintz
Copy link

Stefan-Hintz commented Jun 7, 2016

What about unknown delay times? https://twitter.com/ntvde/status/740084190843047937

@DaleSchultz
Copy link

the data is not mean to be realtime, just the schedule, so no delays or actual arrival/departure data is present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants