branigan.ca

Never-Stop Train Simulator

2026-03-10 · Kevin Branigan

There is an issue I have with the subway in that it stops every few hundred meters but what I really want is a train that only stops at my destination - can you imagine how fast that would be? It might be a genuine contender to driving. So how do you get a train that only stops once? Ok so far the only way I've discovered is really having two trains, one that stops and one that goes. At first my idea was have the trains drive next to each other and open the doors at speed so people can transfer between the trains. Problem is of course the existing tunnels would have to be double wide and you couldn't support existing stations which have the platforms on the outside. So instead of side-to-side train connections, why not front-back? As a train approaches an empty station, the last few train cars detach and stop. The rest of the train continues driving along. As another train approaches that station, the train cars waiting at the station close their doors and start moving, it accelerates up to speed and merges with the front of that new train and becomes part of the new train. Once it's attached, passengers looking to go a large distance walk forward on to the new car. As a passenger, you can walk the length of the train as the front of the train gets new front cars from each station and looses back cars to the stations the train quickly drives through.

Here is the interface with the minimap, short train waiting in a station

Here is a traveling train, the station is the 'yellow' station - the cars on the right side have detached and are approaching and stopping at this station. You can see the people on the train car are all yellow as well because this is their destination. The cars on the left are speeding up, aiming to match the travelling train. You can see people on that train. Some are sitting waiting, some are bunched up right at the back wall waiting for the trains to merge so they can walk backwards to get on the red train car behind them because they are going to the red station and that's where the red car is.

Originally I made this all in OpenGL and C++ but I wouldn't expect anyone to download a mac binary so I converted it to WebGL and wasm, so here it is: My Never Stop Train Simulator

Pallet Pilot Project

2024-10-07 · Kevin Branigan

I didn't have a chance to check out Nuit Blanche because I put wheels on a pallet and went down Spadina with a friend and made some new friends too.

I don't really know why I did this but it was fun so hey maybe that's why.

The Spadina streetcar isn't operating right now, so it wasn't that dangerous.

GPS conversion

2023-10-12 · Kevin Branigan

Bit of a repeat project but I focused on a short and simple route in Toronto called 125 Drewry.

I fetched the shape data from the official GTFS and plotted the 2 primary shapes (east and westbound below). You can basically ignore the axis labels - they are in meters east and north of a MTM meridian I think 17T. Also I shifted the one of them up by a bit to isolate them visually.

I took the realtime GPS feed from the TTC and fetched all gps updates for this route for a single day as plotted below. (includes dead mileage on the left)

This step is a bit of a leap but it visualizes the GPS coordinates translated from physical coordinates (in meters) to progress along the GTFS shapes length over time. Vertically stratified by individual vehicle to eliminate visual overlap.

And then I overlap to be able to visually compare with the GTFS schedule.

I fed all this data into a neural network to produce predictions of future performance to produce more accurate nextbus arrival times.

I did all this (and a lot more) to power the Circular Transit Schedule and originally TTC 7 Bathurst In A Storm.

Archive