Live data from Hacker News

Berlin public transport in real time

fahrinfo.vbb.de

61–70 of 143 posts

Re: Berlin public transport in real time

#61

Looks like they are just interpolating the location between two stations using the expected arrival times. If no expected arrival times are available, they simply simulate the location to match the planned arrival times. So this is not really "live". > VBB-Livekarte zeigt berechnete Positionen der Fahrzeuge zwischen zwei Stationen; falls kein Live-Fahrplan vorhanden, dann Position gemäß geplanten Fahrzeiten

Agreed, it's not really live, but still cool. There's a similar project for Swiss trains here: http://maps.vasile.ch/transit-sbb/

Source is available on Github (not my project).

Re: Berlin public transport in real time

#63

This appears to use the theoretical schedule, rather than real-time information. I live next to a busy tram line, and what I see through the window does not match what the site shows.

Totally, buses never seem to stop at traffic lights.

In my city, Eindhoven in the Netherlands, traffic lights are often calibrated to make sure that buses don't have to stop at a red light.

Re: Berlin public transport in real time

#64
Helsinki has one for their trams, subway and ferries: http://live.mattersoft.fi/hsl/Default.aspx?lang=en

I really wish there was this service for buses. Quite often the digital displays saying when the bus will arrive are inaccurate, as are the actual timetables printed on the bus stop (when there is traffic etc.)

Re: Berlin public transport in real time

#65

Earlier quoted context omitted.

Totally, buses never seem to stop at traffic lights.

In my city, Eindhoven in the Netherlands, traffic lights are often calibrated to make sure that buses don't have to stop at a red light.

God, how I wish I lived in the Netherlands...

Re: Berlin public transport in real time

#66

Earlier quoted context omitted.

Totally, buses never seem to stop at traffic lights.

In my city, Eindhoven in the Netherlands, traffic lights are often calibrated to make sure that buses don't have to stop at a red light.

It goes beyond that in the Netherlands. A lot of bus lanes have their own traffic light system -- they have very small lights to show when they can go or stop. :)

Re: Berlin public transport in real time

#70
post #14

Earlier quoted context omitted.

It's quite easy to make this particular *.exe path return an "Internal Error" by fuzzing the GET parameters, which may or may not be due to someone having written something that parses user-supplied data in C that then segfaults :)

Well, what else would you return? A `400 Bad Request` error might be more appropriate, but a `500 Internal Server Error` is "A generic error message, given when an unexpected condition was encountered and no more specific message is suitable." - you don't want to leak internal state, obviously, so just log the problem and respond with a 500. TL;DR: Might be a segfault, but it's 2015 - it probably isn't.

5xx to me suggests that retrying is worthwhile. Any "deterministic" error (as a function of the parameters I submitted) should be a 4xx.
Post reply on HN