原文
| ||||||||||
| ||||||||||
![]() |
原始链接: https://news.ycombinator.com/item?id=43691054
开发者silverr 创建了一款 iOS 实时F1赛道追踪应用,每秒更新车手位置。出于对F1的热爱,这个项目始于一张静态的SVG地图和一些占位点,很快就演变成一个复杂的挑战。最困难的部分是将GPS/遥测数据精确地映射到不规则的赛道布局上,需要平滑的插值。针对屏幕上每秒20多个车手的性能优化至关重要,以避免耗电,尤其是在缩放和旋转等UI功能的情况下。应用扩展到包括比赛结果、车手/车队信息和排名,实时赛道地图仍然是核心功能。开发者学习了很多关于iOS动画、刷新率和后台任务的知识。一位评论者指出,这篇文章更侧重于遇到的问题,而不是实施的解决方案。另一位用户质疑了数据来源和潜在的许可问题。
| ||||||||||
| ||||||||||
![]() |
At first, I had no idea where to start. The initial version of the app was just a static SVG of the track and a bunch of placeholder dots. But I quickly realized that turning this into something dynamic and precise was going to require a lot more work—both technically and creatively.
One of the hardest parts was figuring out how to map GPS or telemetry-like data (or simulated equivalents) to the actual layout of the track. Circuits aren’t perfect circles or squares—they’re highly irregular, and getting the math right to interpolate positions smoothly along the path took a lot of iteration.
Once I had the basic movement working, I ran into performance issues. Updating 20+ driver positions every second, animating them smoothly, and not killing the battery or CPU on an iPhone took careful optimization, especially when combined with UI features like zooming, rotating, or switching to other parts of the app.
From there, the app grew: I added race results, driver and team info, standings, and more. But the live circuit map remains the heart of it—a tiny simulation of the race, in your pocket.
I learned a lot building this, from low-level animation tricks to dealing with refresh rates and background tasks on iOS. If you’re curious, you can check it out here
reply