Show HN: Undercutf1 – F1 Live Timing TUI with Driver Tracker, Variable Delay (github.com)
I started to build undercutf1 almost two years ago, after becoming increasingly frustrated with the TV direction and lack of detailed information coming out of the live feed. Overtakes were often missed and strategies were often ill-explained or missed. I discovered that F1 live timing data is available over a simple SignalR stream, so I set out building an app that would let me see all the information I could dream of. Now undercutf1 serves as the perfect companion (like a second Martin Brundle) when I'm watching the sessions live.
If you want to test it out, you replay the Suzuka race easily by downloading the timing data, then starting a simulated session:
1. Download undercutf1 using the installation instructions in the README.
2. Import the Suzuka race session data using `undercutf1 import 2025 -m 1256 -s 10006`.
3. Start the app (`undercutf1`) then press S (Session) then F (Simulated Session), then select Suzuka then Race using the arrow keys, then press Enter.
4. Use arrow keys to navigate between the timing pages, and use N / Shift+N to fast-forward through the session.
If you want to test it out during this weekends Jeddah GP, simply install as in the README then start a live session by pressing S (Session) then L (Live Session).
The app is built for a terminal of roughly 110x30 cells, which probably seems an odd size but just so happens to be the size of a fullscreen terminal on a MBP zoomed in far enough that the text is easily glanceable when the laptop is placed on a coffee table some distance away from me :) Other terminal sizes will work fine, but information density/scaling may not be ideal.
If you're using the TUI during a live session, you'll want to synchronise the delay of the timing feed to your TV feed. Use the N/M keys to increase/decrease the delay. During non-race session, I find it fairly easy to sync the session clock on TV with the session clock on the bottom left of the timing screen. For race sessions, synchronisation is a little harder. I usually aim to sync the start of the race time (e.g. 13:00 on the timing screen clock) with the start of the formation lap, where the live feed helpfully shows the clock tick over to 0 minutes. I usually delay the feed by 30 to 60 seconds.
75 comments
[ 4.8 ms ] story [ 136 ms ] threadLove that it is realtime as well.
Great work on this.
Sixel on the other hand seems like an alien protocol whose implementation daunts me - think it'll be a while before I tackle that one.
I also suspect that the trying to monetize a project like this would not sit well with the FIA, if you had any kind of traction.
It has a Live Timing Client and a lot of historical data.
I only found it the other day, so I have no had a chance to play with it yet.
After a session is finished, F1 do upload json and jsonStream static files which you can download - checkout the DataImporter class to see how this is done (this is what powers the undercutf1 import` command)
> Tyre Strategy page
Nice, I'll be able to see how Ferrari have fumbled strategy for their drivers.
TUI gets you straight to the point, no ads, etc. So the teletext format is now outliving TVs and people read the teletext pages on their mobile phones (via we of dedicated apps)
https://yle.fi/aihe/tekstitv?P=207
If you weren't already aware of it, check out the #f1 community on libera.
Your chances are slim, or mahdollisuutesi ovat niukat.
Unfortunately I don't handle lapped drivers very well, once they're lapped much of the gap related stuff stops working for them. Thankfully the last year or so the field has been close enough where that's not too much of an issue.
I was hoping to test it out during the session currently going on :)
Thanks! This is awesome work and I'm looking forward to tomorrow with much excitement.
Usually downloading the app as a dotnet tool doesn't get flagged as a virus, but it seems this isn't always the case.
I'm curious where the live/static data is coming from and how freely available it is. Most sports are very protective of their data rights in the betting era (I know of one guy who spends six figures on tennis data a year - and yes, he makes a profit from it), so I'm wondering if/how F1 sees all this.
Regardless, I think this is absolutely marvellous, and can see this becoming my second/third screen while sat on the sofa enjoying the races live. Thanks, and if I can find a way to contribute/give back, I will.
There's also static API endpoints which contain .json and .jsonStream files after a session ends, so you can process all the data and run some analytics on it.
I assume they don't mind too much about the usage - on the basis that some of these projects have existed for quite a while. I'm pretty sure everything who performs F1 analysis (like journalists, YouTubers etc) with charts and the like and getting their data via these feeds (either directly or via packages like FastF1.
If you want to learn more about the implementation itself, I'd recommend checking out the DataImporter.cs and LiveTimingClient.cs files in the UndercutF1.Data project of the repo. Although fair warning, my codes not that beautiful :).
However, I'd appreciate an easier way to run it: binaries for Linux aren't standalone -- they require 3rd party dependencies to be installed. Static binaries (or maybe container image?) would be nice.
As noted in https://github.com/JustAman62/undercut-f1/issues/3#issuecomm..., I think there's still more work to do to make the single-file executable work properly on Linux, due to the intricacies of the native Skia libs.
Currently the delay is designed for a minute or two's worth of delay for a live TV feed, or for replaying old sessions. I don't currently have a good way to support a long delay during a live session, without you starting the app before the session starts, and applying the 25 minute delay immediately so that all the data is queued up to be displayed in 25 minutes time.