Comment by Pragmata

1 day ago

Yeah and that's fucking ridiculous and a damning indictment of the glaring incompetence of train companies.

If I can have reasonably accurate gps readings of my phone while I'm on the train, there is zero reason for train companies to not have systems that are at least as accurate.

Does your phone's GPS work in a tunnel? What happens if GPS ever gets jammed (or worse, spoofed)?

Aviation also doesn't exclusively rely on GNSS positioning, so why should train protection, given that it's also extremely safety critical?

  • > Does your phone's GPS work in a tunnel?

    My car's GPS does, using dead reckoning.

    Trains can also use dead reckoning.

    /me checks notes, I've heard that they move on inflexible things called "rails" that almost never change the location.

    • The thing is that trains move way faster compared to friction (which is needed for breaking and manoveering) than cars. The equivalent is if you would be driving 900-1200 km/h with your car[1]. Good luck being able to break in time on that speed and estimating your position with GPS.

      Also the hard part is knowing the position of the others and their trajectory, which changes in between moving towards them and is done by a third party. The normal passing distance is smaller than the width of your vehicle and you can only change your own direction every few kilometers. That means that the others trajectory towards you can only become known after you are already past your last opportunity to change your trajectory and even within your breaking distance. Good luck!

      [1] Friction for cars on the road is 0.010-0.015, for trains 0.001-0.002; train speed 120 km/h * 7.5 = 900 km/h equivalent for car; that's not even a high-speed train.

Part of the problem is multiple tracks. Those tracks may be only 10 feet (3 m) apart. (I don't know if high-speed rail lines in Spain are that close, and I don't know if the line where the accident occurred was double track.)

"Reasonably accurate GPS" trying to determine which track you're on at 150 mph is not as simple as you make it sound. Yeah, it can determine how far along the track you are. But when you get two trains moving toward each other, each at 150 MPH, do you really trust that GPS to tell you that they're on different tracks?

  • I agree that the problem here has no easy, general and automatic gps-based solution but I think it's helpful to keep the actual likely situations in mind. Usually we have the most trains/densest timetables close to major transport hubs where speeds are low anyway and driving 'on sight' is a good compromise of safety and keeping things working. Where speed really matters - outside of major hubs, straight ruralish routes - we simply don't usually have great density of trains AND tracks. At least from my travels in western Europe I don't think I've ever seen more than two tracks in the same direction on high-speed-segments. So if we keep that in mind and don't expect a general and automatic solution, a simple, gps-based fallback-system that requires all trains that are within a radius of X of each other (either in time or space) MUST coordinate, else they both shutdown/move on sight, could work reasonably well. In reality and for the involved parties (the trains that are close to each other), it's a very human-scale problem.

  • Trains can't change lanes without warning like a Nissan Altima on the Dan Ryan Expressway. The only way a train can move from one track to an adjacent track -- or get on the first track in the first place -- is if switches are set to allow the train onto that track. And on any modern high-speed line, those switches are centrally controlled by dispatch.

    Keeping track of which parallel track a train was on automatically was a solved problem a hundred years ago, using relays and lights and hard-wired logic. Adding computers and GPS greatly increases the precision with which dispatch knows position and speed along the track, but knowing which track has not changed in the last century.

    • Yes, but as long as the central signalling system is working, it already knows where the train is, with no need to involve GPS. (And where modern signalling and train protection systems need increased precision as compared to the granularity of track circuits/axle counter sections, the solution usually involves a combination of on-train odometry plus track balises at occasional intervals in order to reset any inaccuracies that might have accumulated.)

      What we're talking about here is some sort of TCAS-equivalent for the case where the central signalling is down – while it's easy to accurately localise trains with the aid of a central signalling system that authoritatively knows about the infrastructure layout, it's quite more difficult when you're trying to do the same thing in a decentralised, train-local fashion.

      3 replies →

  • It's very easy since there is limited ability for trains to change tracks, so the location history of the train is a strong indicator of which track it is on. Even Google Maps can tell you which lane you are in since god knows when, and cars can freely change lanes. And that's just consumer software. For something commercial like a train they could trivially solve this problem with something more robust. But I'm not familiar with the Spanish system; how much of the engineering did they do?

    • There are switches that move trains between tracks. Now you need every switch to report, keep a history of that. Many trains also separate and combine. Trains sometimes go backwards to be switched.

      It's not impossible. But handwaving GPS placement of trains at the correct location, direction, and track deserves more than a handwave as trivial.

      7 replies →

    • Yes, it can tell you. How perfectly, though? Perfectly enough to bet 60 lives on?

      When Google Maps gets wrong what lane I'm in, nobody dies. It can be right 99% of the time, that's good enough. It's not good enough for a train system, though - at least, I suspect it's not. I'd want a lot more than "it works in my car" before I trusted it.

      2 replies →

    • HN does railway safety... The Dunning-Kruger level in this thread is ridiculous.

      As a passenger, I'm very glad software engineers haven't (fully) taken over aviation and railway safety yet.

    • Google maps gives me the directions for the express lanes when I'm in the normal lanes and vice versa like 50% of the time, and that's an order of magnitude greater error in distance than the distance between adjacent train tracks. And several orders of magnitude greater failure rate than is acceptable for a safety system.

      2 replies →

Would that work in tunnels and forests too?

  • Tunnels are controlled by a single block - only one train can ever be allowed access at once, period. Until the "current" occupant train is verifiably out of the tunnel, that block is forbidden to all.

    Forests are irrelevant; rail right-of-way contains no trees, and is wide enough to assure clear "view" of satellites.

    • You are just answering how the current system actually works. This discussion was about how a hypothetical system works based on GPS or radar alone.

    • > Tunnels are controlled by a single block - only one train can ever be allowed access at once, period.

      Absolute nonsense. Do you have any idea how long some tunnels are?

      1 reply →

> a damning indictment of the glaring incompetence of train companies.

No, what I describe has nothing to do with the companies, that's the research state. It's just an indictment of you making bold statement about a subject, you don't now enough about.

> I can have reasonably accurate gps readings of my phone

Would you dare to cross on a rope over a deep valley, blind using only GPS readings of your phone? Because that's kind what you are suggesting, expect you also move a few hundred other people.

  • > Would you dare to cross on a rope over a deep valley, blind using only GPS readings of your phone?

    Hang on, this is nothing at all like that - trains run on fixed tracks. The only bit of data we are interested in for collision avoidance is the linear offset along the track. Even the shittiest GPS fix of all-time would give a good-enough intersection with a fixed path to avoid crashing into a second stationary train in the open country-side (do you see any satellite line-of-sight blockers in the crash footage?)

    • > The only bit of data we are interested in for collision avoidance is the linear offset along the track.

      So that is naive, but assuming that would be all that you need, with GPS you would also need the positions of all other trains. But why would you transmit all this information to every train, instead of just computing the collisions in a central node? (That's what is done now.) A better fit for what you suggest would be radar, and this does exist. [1] But that's where your original assumption is naive. You regularly pass other trains within <2m at high speeds, so linear offset is not all you need.

         [1] https://www.dlr.de/en/kn/research-transfer/projects/next-generation-train/rcas-railway-collision-avoidance-system

      10 replies →

  • The way I think of it, divide the tracks into segments. Before you put a train on a segment, you must ask a question - is there a train on it. There are only two answers possible, No, and something else. If it is something else, stop. Don't let the train on that segment.

    There are optimizations possible like make segments smaller etc but the original algorithm is trivial. If we can't figure things out, we make segments longer and we slow down the trains until we can. I am positive for a sufficiently large track segment and a sufficiently slow train, we can always answer the question with a no.