Dev blog #6. The humbling one. Real golfers do a lot more than swing, and my app noticed all of it.
In a clean test you set up and you hit. The app catches it, buzzes, done. I had that working and I was feeling pretty smug about it.
Then I went and hit balls like an actual human for an hour, and the smugness evaporated. Because here's what you really do at a net or a mat: you set the club down behind the ball to check your aim. You nudge the ball to a fresh lie. You take a practice swing. You waggle. You reach down and pick the ball up to grab another. Every one of those moves the ball or the club right where the app is watching, and the early version went "ooh, a swing!" at nearly all of them. Nope. That was me tidying up.
The naive idea, and why it's wrong
My first cut at this was the obvious one. The app is watching the spot where the ball sits, so if the ball leaves that spot, you must have hit it. Swing detected.
The problem is that "the ball left its spot" is one of the least specific things that can happen in golf. The ball leaves its spot when you pick it up. It leaves when you roll it two inches to a cleaner lie. It leaves when you clip it with the clubhead on a practice swing. It even "leaves" when it didn't move at all and the app just lost sight of it for a few frames. Every one of those looks, to a naive watcher, exactly like the ball vanishing. Which is the whole trap: absence, the ball simply not being where it was, is a terrible foundation for a swing detector. It fires for a dozen reasons that have nothing to do with a strike.

The rogues' gallery
So I went and collected the ways it got fooled, because each one taught me something specific.
The club set behind the ball was the sneakiest of all. You rest the clubhead right where the ball is to check your alignment, and now the club is sitting on top of the ball, hiding it from the camera. To the app the ball just disappeared. It didn't go anywhere. It's right there, under the club.
The nudge was next. You bump the ball a couple inches to a fresh lie. It genuinely moved, it genuinely left its original spot, and it absolutely did not fly anywhere. A detector that only stares at the exact original spot sees "gone" and gets excited, while the ball is sitting there, perfectly happy, two inches to the left.
The backswing got me too. On the way back, the club sweeps straight through the little region the app is watching. Loads of motion, no strike.
And then the pickups and the roll-offs. You reach in and lift the ball to tee up another, or flick it off the mat with a finger. The ball leaves for real this time, but slowly, by hand, with nothing remotely like the violence of a struck shot.
The reframe that fixed it
Staring at that list, the fix finally clicked, and it was a reframe rather than a clever trick. Every single one of those fakeouts has the same hole in it: the ball never flies. A pickup is slow. A nudge travels two inches. A club setup doesn't move the ball at all. Out of everything that happens in a whole session, exactly one kind of event sends the ball departing fast, on a real trajectory, screaming away from the lie. An actual strike.
So I stopped asking "is the ball gone?" and started asking "did the ball actually fly?" That flips the entire problem from hunting for absence to demanding positive evidence. Don't react to the ball disappearing, because everything makes the ball disappear. React only when there is real, honest-to-goodness flight to point at. The fakeouts can all make the ball vanish. Not one of them can fake a struck ball tearing off the lie.


The catch: flight isn't always pretty
There was a sting in the tail. Not every real swing is a clean one launched straight down the line. I hit a shank that shot up and to the left, and an early version of my "did it fly?" check missed it, because somewhere in there it was quietly expecting flight to look a certain tidy way. That's the opposite failure, and it's every bit as bad: a false negative, ignoring a shot you really did hit. A launch monitor that shrugs off your mishits is its own kind of useless, and mishits are exactly when you most want to know what happened.
So the flight evidence had to get more open-minded about what flight is allowed to look like. A struck ball might rocket straight out or skew off sideways off the heel, and the check can't be fussy about which direction. It just has to recognize the unmistakable signature of a ball that's been hit, wherever it decides to go.
Building the scorecard
The only way to make any of this honest was to stop trusting my gut and build a real scorecard. I took a pile of session footage and labeled every single event by hand. This is a real swing. This is a club setup. This is a nudge. This is a pickup. This is just the backswing. Then I held the detector to a simple, brutal standard: out of all the dozens of little events in a session, only the true strikes are allowed to survive. Every real swing has to produce flight. Every fake has to be thrown out.
I won't pretend it's flawless, because nothing tested against a real fidgety human ever is, and I keep finding fresh ways to confuse it. But the gap between the version that cried wolf at every waggle and the version that quietly ignores all my tidying up is night and day, and it only closed because I stopped testing in the clean world and went and made a deliberate mess.
The exact machinery that decides all this is staying in the vault. But the lesson is free, and it's one of my favorites from the whole build: don't detect the thing disappearing, detect the thing actually happening.
Next up: a left-field idea that turned out to be one of the most reliable signals of all. I started listening for the strike.
Want to follow along? Pre-register and stick around. See you on the range.
0 comments