Show HN: Undercutf1 – F1 Live Timing TUI with Driver Tracker, Variable Delay

github.com

92 points by deltaknight 4 hours ago

undercutf1 is a F1 live timing app, built as a TUI. It contains traditional timing pages like a Driver Tracker, Timing Tower, Race Control, along with some more detailed analysis like lap and gap history, so that you can see strategies unfolding.

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.

happosai an hour ago

TUI for sports reminds me that in Finland, teletext is still very popular for following sports (football, ice hockey, even F1)

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

  • deltaknight 41 minutes ago

    Oh that's fantastic, way better than searching for results on modern sports news sites. Definitely bookmarking this, maybe I'll accidentally learn a bit of Finnish.

mysterydip 36 minutes ago

Thank you for this! I love F1 and TUIs, this will be perfect for my desire to know more of what my midfield favorites are doing while the broadcasters are watching the front!

  • deltaknight 24 minutes ago

    As it happens, I started to make this back when McLaren weren't doing quite as well as they are now... for exactly the reason you describe. Being able to see pit windows easily for drivers all the way down the field, and observe lap times and relative gaps for drivers makes following the midfield much easier.

    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.

noisy_boy 2 hours ago

Congratulations - that is a nicely written README, shows the care you put into this.

scrlk 2 hours ago

Great work!

> Tyre Strategy page

Nice, I'll be able to see how Ferrari have fumbled strategy for their drivers.

yahoozoo 3 hours ago

This is awesome. My wife and me and are going to the Miami Grand Prix here in a few weeks, big fans. Excited to play with this for Jeddah sessions/race.

  • deltaknight 2 hours ago

    Wow I'd love to go to a US race at some point, the vibe in those weekends feels so unique compared to the classic European race. Hope you have a great time! Happy to take any feedback/suggestions after the Jeddah sessions if you have any

    • glenngillen 2 hours ago

      I was fortunate enough to go to the very first race in Austin. That was pre the DTS-driven levels of attendance you get at races these days, and (maybe because it was their first time hosting?) it was also super cheap compared to attending any other race. And honestly it was one of the best race weekends I've attended. The layout of the track (e.g., a main straight that goes into a hairpin, comes back downhill, sweeps back right and uphill...) seems almost uniquely designed to give someone in the paddock the ability to watch multiple parts of the circuit. Also Austin was just a great city to visit too.

davidevansdev 29 minutes ago

Kudos to you for even using Whisper to transcribe radio messages!

  • deltaknight 22 minutes ago

    I have to admit, the transcription quality isn't all that great, it depends heavily on the driver and the audio quality on that particular weekend. I think it's better than nothing though.

johnbellone an hour ago

This is freaking awesome. I am going to use it tomorrow. Great work!

sph 2 hours ago

Anyone know any API for real time Formula 1 timing info, standings, historical info, etc? I don't suppose FOM releases this data for free.

  • deltaknight an hour ago

    There is https://openf1.org which has an API, although I don't believe it's real-time. My projects uses the SignalR stream directly from F1, but it's not very API friendly and you have to learn and do a decent amount of processing to make it in to useful display data. Check out the UndercutF1.Data project to see how this is done. FastF1 also has a live timing client, although I don't think its their preferred method of analysis.

    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)

  • pyepye an hour ago

    Check out FastF1 - https://docs.fastf1.dev/

    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.

  • fkarg 2 hours ago

    certainly not free, but with F1TV Access you have access to historical and real time data through the API. There should be decent documentation on it out there, otherwise projects like Multiviewer or this TUI wouldn't be quite realistic.

  • andypants 2 hours ago

    It's not meant for public use, but it's also not protected. Best documentation is the fastf1 project.

nchagnet 2 hours ago

This is such a cool project! Congrats!

epolanski 2 hours ago

What an impressive project!

nikolayasdf123 2 hours ago

even live track map. wow, impressive tool!

  • deltaknight 2 hours ago

    Thank you! I'm very proud of the track map and lap charts. I mulled over for months about rewriting the app into a native app or website so that I could do proper graphics etc, but then one day earlier this year I suddenly realised I could use Terminal Graphics protocols to achieve inline graphics in the TUI itself, giving me the best of both worlds!

    • testing22321 an hour ago

      If you wanted to monetize you’ll get way more users from a website or app. This is fantastic , but for techies only.

      • eertami 26 minutes ago

        There's already a pretty popular free/opensource website with similar live data (https://f1-dash.com/) which would be an obvious alternative.

        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.

      • deltaknight an hour ago

        Yeah that's a fair point. Although I've been a bit iffy about the ethics of monetising somebody else's data - and I feel that line would be definitely crossed if I made a direct competitor to F1s own products. So monetisation is very much off the table :)

terminaltrove 2 hours ago

This looks very good, the screenshots are very detailed and helpful and it's nice to see TUIs using the kitty graphics protocol.

Love that it is realtime as well.

Great work on this.

  • deltaknight an hour ago

    Thank you! Yes, learning about the kitty and iterm graphics protocols was surprisingly fun, and opened my eyes to the potential power of modern TUIs (even if I'm not making best use of all the power).

    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.