When you go to the app’s URL, you’ll be given instructions on how to install it (it’s as simple as bookmarking it to your homescreen). Then, when you launch it, it will download and cache all the assets2, and each subsequent launch after that will check for updates if your device has network access.
How it works
Basically, the app calculates how fast you’re going by getting the distance between your current position and your last position and dividing that by how long it took to get there. There are other things going on, like soft rejecting3 positions that would seem to indicate an acceleration of anything above 2g4.
This could be further optimized, of course, and when I do that, I can push those changes and everyone (with a network connection) will have access to the new version as soon as they launch.
- A speedometer
- A bearing indicator (it tells you what direction you’re heading)
- An analog clock
The clock was really just an exercise for myself. It’s basically a rotary gauge with 3 custom indicators with their own values.
Debugging and testing this isn’t easy. While iPhone can hit .local domains on a local network, I couldn’t exactly do use a local network to test this app. I had to be in motion. I spent time while commuting to do my testing and debugging. I also needed full access to the internet to update the remote servers so the iPhone could access the app. I don’t think I could have done this without tethering5.
I might have been able to create a WiFi network with my MacBook to get access to the .local domain, but even in that case, I’d have to configure my development environment to serve this app from my .local address, and that’s also not ideal. Meh, I’ll figure out the best solution eventually.
Forgive my rambling, I had to be up early this morning (like, so early it was still Saturday for another 30 minutes).
With the exception of the startup graphic and app icon. ↩
Is that a thing? Basically, what I mean by this is that if it the location doesn’t fit the criteria, I’ll ignore it, but keep it around. If it starts looking like the location was correct, I’ll switch to the rejected set. ↩
If you happen to be able to accelerate at 2g, let me know once you’ve returned to Earth. ↩
Which I technically shouldn’t be able to do until tomorrow (Monday, June 7th). ↩