A presentation at iOSDC 2025 Japan exploring the algorithm behind Eki Live, an iOS app that automatically detects the railway and next station for a train you're riding in Tokyo and updates it in the Dynamic Island.
to closest station S — Calculate direction vector c from Location to S Case Result d < 200m "Now: S" d < 500m && c > 0 "Soon: S" c > 0 "Next: S" else "Next: S+1"