Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is an unexpected programming application. It's nice that the farmer actually changed behavior after receiving the phone call.

At first, I thought there was a clear improvement. This problem essentially boils down to finding the intersection point of three circles. But it's also likely that with the small fuzz from imprecise time measurement that the three measured circles wouldn't actually intersect. I would guess that a small boost could be achieved by sampling points near the two intersection points of any two circles, but this is moot when it's just possible to brute force the whole grid.



Since the time of the cannon shot is unknown, only the time when it can be heard at a known location, you can't even pinpoint its unknown origin in space to a circle. Instead, the range of possibilities forms a cone in spacetime (exactly like the lightcone of electromagnetic waves, except with sound and also treating space as two-dimensional for simplicity).

The intersection of two such cones is a parabola. The intersection of the third cone with the plane containing said parabola gives another parabola that can intersect the first one in zero, one, two or an infinite number of points. In the zero-point case, you could still find the location where the two parabolas are closest.

(Or you could forget about geometry, define an objective function and do gradient descent to it.)


Good point. I think my intuition about triangulation comes from GPS, where pulses are emitted simultaneously from many points at a known time. This problem is a little trickier.


Ah yes, you're right! Thank you.


Oregon state and Corvallis have a noise ordinances. The farm likely would have faced significant fines if he hadn’t solved the problem.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: