Filming the Fastest Two Milliseconds in Golf

Filming the Fastest Two Milliseconds in Golf

Dev blog #3. Last time we settled that a phone can see the ball. Now the fun part: catching the exact instant it gets smashed.

There's a big difference between filming your swing and capturing your swing. Anybody can prop up a phone and get a nice slow-mo of themselves for the 'gram. I needed something else. I needed the handful of frames right around the strike, the moment the face meets the ball, and I needed them to be honest about when they happened.

That window is tiny. Club and ball are only in contact for something like half a millisecond. The interesting stuff, the part that tells you ball speed and launch, plays out over a few thousandths of a second on either side of that. Blink and you've missed it a few hundred times over.

Two problems, not one

The obvious problem is speed. You need the camera running fast enough that the ball shows up in enough frames near impact to actually measure anything. We talked about that last time. Fine.

The sneaky problem is honesty. Every frame needs to know exactly when it was taken, and I mean exactly. Here's why that matters: measuring speed is really just distance divided by time. The camera gives me the distance part. The timing of the frames gives me the time part. If a frame lies about when it happened, even a little, the math turns your gorgeous 7-iron into a wedge, and now the app is lying to you. A launch monitor that lies is worse than no launch monitor.

So a big chunk of this phase wasn't glamorous at all. It was me being deeply suspicious of my own phone. Are these frames actually evenly spaced in time, or just pretending? When the camera says a frame landed at a certain moment, can I trust that clock? I spent a lot of time checking the phone's homework before I let any of it near a speed number.

A single high-speed camera frame showing a golf ball, grainy and low-contrast
One frame off the sensor. Now imagine needing to know precisely when this one was taken, and the next, and the next.

The boring work that makes the cool stuff possible

This is the stuff nobody puts in the highlight reel. There's no satisfying screenshot of "I verified the timing was trustworthy." But it's load-bearing. Everything flashy that comes later, the flight tracking, the numbers, all of it sits on top of frames that are fast enough and honest enough to build on. Get this wrong and you don't find out until your distances make no sense and you can't figure out why.

I'll spare you exactly how I get the phone to capture and timestamp all this. That's part of the secret recipe, and it's some of the work I'm proudest of. What I'll say is that phones are not really designed to do this on purpose. They can be talked into it, but they fight you, and the edges are sharp. More on one of those sharp edges next time, because it turned into the single most frustrating part of the whole build so far.

Next up: the memory problem nobody warns you about, and the day I deleted a huge pile of work and started over.

Want to follow along? Pre-register and stick around. See you on the range.

0 comments

Leave a comment

Please note, comments need to be approved before they are published.