I still don't know why the train drivers don't have a simple data: The distance to the train that is next in in that railway in its direction. With this information, that accident will have never happened.

Signalling systems are never simple.

The LZB system, which broke down, had the data you describe. It knows when trains pass over fixed sensors so it computes where they are, and sends data packets to specific trains informing them their current speed limit, and the next, and how far away that is. If the driver won't slow down, the train will.

When LZB broke down, they had to switch to their other system, BSL (fixed block signalling: https://en.wikipedia.org/wiki/Automatic_block_signaling). You can then know the distance to the next block, and if it's occupied or not, but not where the train is inside the block. You can only guess.

In the next few days we'll likely find out if the control centre also fucked up the block signals...

I'm wondering why don't they use GPS as a redundant data source too.

There is a system that does exactly that, its called ETCS Level 2: https://en.wikipedia.org/wiki/European_Train_Control_System But its not so wide spread unfortunately. Also if it fails then you are back to operators taking decisions

Because the issue is knowing where the other trains are, not yours.

TCAS has solved this for airplanes. It wouldn't take much to modify the system for trains so that, in the least, it notifies when an unexpected train is nearby. A little more logic could allow it to verify which track each train is on.

Obviously it wouldn't be "just" GPS. In the simplest example - if I choose to add a friend to "Find my Friends" on iPhone, both our locations are visible to each other via GPS when our phones are on.

> our locations are visible to each other via GPS

... via mobile data or WiFi, you mean. Whether it uses GPS, Galileo, track measurement points, or even "driver calls the control centre to update their position" doesn't have much to do with it. What I assume you mean is redundancy so that two or more systems can communicate train positions independently, where the more relevant problem is how to get the data across in a timely manner. The driver of the stationary train called in their position and it wasn't used: it's a communication problem, not a "where am I" problem. Idk why the focus on GPS and using GPS for communication (which GPS can't do, and newer systems only do at very low speeds for emergency communication) but finding one's position is usually not the problem

"Just put airtags on all the trains"... obviously simplistic but I get your point.

This isn't as simple as a Disney monorail. There can be many tracks, multiple routes can share some segments of track, trains can go from one track to another, tracks can be stacked on top of each other on some bridges and go inside tunnels so GPS/GNSS is insufficient, the train in front of you can stop for emergency, etc. It's like the aeronautical collision issue, but the tracks are in charge of determining and transmitting position.

General case, it's not that simple. Say there's another train a mile ahead of you...but it's on a siding. To compute the effective distance, you'll need to know the positions of the switches connecting the main line to that siding. And switch positions can change far faster than you can stop, even if the other train doesn't move.

There's like 100s location data on each train, do they not just have a map of where all nearby trains are.

If it was so easy then this never would have happened.