This is a clever approach and it got me wondering a few things.
An hour or so from where I live there have been complaints about an infrequent low rumbling sound for years[0]. I'd wondered -- at the time -- why you couldn't just do something like they do with the gunshot detectors to find the source of the sound[1]. I suspect there must be a technical/physics reason that I am not familiar with. This article re-enforced that thinking for me -- I think I've heard one of these air cannons, before (I have not heard the Windsor Hum), and its characteristics seem more like a gunshot kind of sound than what's described here but ... if you can record the time it starts from three different points (and all you're looking for is "an area roughly the size of a large factory" because it had always been suspected to be one of the plants along the river), wouldn't this approach have been simple/cheap enough to do to figure it out[2]?
[1] Part of the problem was that a subset of the population could hear it and a subset of that population noticed it enough to be bothered about it so it kind of led to a large number of people dismissing complaints as "people who complain about WiFi signals harming their health"
[2] And if I answer my own question: I suspect it probably was and I suspect the reason it wasn't done is that nobody cared enough to do it, really. :)
I really like the usage here. I would love to generalize the app to find people hunting and setting off fireworks at impolite times.
Why did you use pixels on a map image for location, instead of GPS? Phones have GPS these days. You could have a simple app where you push the button when you hear the noise, it reports to a cloud function, and instantly triangulates and throws a point on your favorite map program.
A person's auditory reaction time is probably below 1s and that would throw off your calculation by ~340m. Most farms are larger than 340m in any direction so you still end up within the same property area.
GPS sync allows phones to have accurate time to within microseconds if not hundreds of nanoseconds. Since sound travels ~300 m/s even 100ms only adds about 30 meters error. That's more than accurate enough to pin point a plot of land.
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.
> Twenty minutes later, he called back reaffirming they are not running their cannons at night. He also assured me that their air cannons could not be heard more than a mile away.
This is the point at which I would have changed my attitude to the situation quite dramatically. Given the opportunity to own up and simply apologize and fix the issue, the fellow just went full lie-to-your-face mode. What in the everloving heck is wrong with people?
I'm curious if regularly firing these cannons on a schedule actually works to scare the geese away. When reading about the accident of Ural Airlines Flight 178 [1], the airport had air cannons for scaring off birds, but they fired them on a regular schedule instead of in response to particular flocks, and the local birds just got used to it. I don't know if the circumstances are similar enough for that to apply with these farms and birds, though.
I can't imagine having to hear explosions every 2 minutes for 20 days!
The Army is doing some artillery training during the day and night for the past week or so in my area, but luckily they aren't doing it every 2 minutes all day and night, just for a few hours up until about 11 or 12 at night and maybe every 5 or 10 minutes they will fire a few rounds. It doesn't bother me anymore after hearing it constantly, but I also live directly next to a very busy street, so I am pretty used to loud noises. Maybe next year when they do the training again I'll try to pinpoint the explosions using this method (just for fun, because I am pretty sure there's only one firing range around here).
My neighborhood had a similar issue a while ago (suspected fireworks). I imagined a mobile phone app solution based with high precision timing from GPS signal. Maybe there is a market for it...
I cannot understand why the Canada Goose is protected under federal law. There are so many in Stewart Park that I think about taking one down with a net or a bolo but (1) I could get in trouble and (2) I find commercial goose meat to be disgusting (when they talk about eating a goose in a Dickens novel I gag) and can't imagine a wild goose is palatable at all.
(I do have reports though that the eggs are great, I think commercial goose eggs make the best Pirogi, and that someone was able to take two eggs from a nest year after year and even though they hissed bitterly the same pair would come back again year after year.)
The Canada Goose is protected under federal law in the United States primarily due to the Migratory Bird Treaty Act of 1918.
This was a treaty between Canada and USA, enacted to prevent more extinctions due to hunting, as happened to the passenger pigeon.
You can hunt them in the fall in most states, but you can't hunt the most annoying ones that live inside city limits year round. They do not taste great, good for dog food though.
Imagine using such a farmers setup as vortex cannon, you could down non turbulence resistant air vehicles such as drones and glide bombs, with good timing.
>>> Farmers with field crops are often beset with Canadian Geese overwintering in the Willamette Valley.
No. I strongly suspect they are dealing with Canada Geese. They are dominant in the photos. Canadian geese would be some random species of geese carrying a Canadian passport. Canada geese are the distinct grey-black species aka cobra chickens.
A large number of people believe it impolite to correct someone's language. I've seen it even called "colonial" to correct written grammar, that we should just let language evolve naturally and not try to enforce rules on others. I am not of that mindset.
I don't think it's obvious that Canadian Goose is any less correct. It's in most dictionaries, and the scientific name "canadensis" is supposed to mean "from Canada", which is what Canadian means. Canada Goose is more common, but that doesn't mean it's better.
It's also pretty likely that the geese in question in this story are literally from Canada.
I am letting language evolve naturally, by providing evolutionary pressure. The people who tell me not to correct people are the ones who don't let language evolve.
Nice work. I feel like there must be some way to triangulate the sound source through direct calculation, but that trigonometry is too advanced for me.
If you want to avoid doing the maths I think you can draw the problem out (assuming the world is a flat piece of paper and the source is located on the same piece of paper with you)
From the timings given you can work out the distance from location B and C to the wavefront when it hits point A (4 x 330 and 6 x 330).
If you then draw a circle centered at point B with radius 1320m, and a circle centered C with radius 1980m, then there is only one circle you can draw that intersects point A, and is tangent with the circles drawn at B and C. The center of that circle is the source (with an appropriate radius of error for timing measurement and distance measurement between A, B, and C)
Epic comment and diagram, thanks. From this, how can we calculate bearing and distance from one of our locations to the source? Edit: I see that we can use multilateration suggested by parent-sibling comment if we just had distance to source (ie radius of unique tangent circle).
ChatGPT tipped me off that it's called multilateration and provided the formulas. I Google search turned up this Python code: https://github.com/glucee/Multilateration
"multilateration (MLAT) ... is a technique for determining the position of an unknown point, such as a vehicle, based on measurement of the times of arrival (TOAs) of energy waves traveling between the unknown point and multiple stations at known locations."
This is a clean install of Python straight from the Python developers in a clean container. And it doesn't work. I figured I must need "points" so I pip-installed that.
Feels like every time I try to use Python, stupid, incomprehensible errors such as this occur:
```
root@1623eb794014:/# ./tri.py
Traceback (most recent call last):
File "//./tri.py", line 6, in <module>
from points import Point, Block
ImportError: cannot import name 'Point' from 'points'
(/usr/local/lib/python3.12/site-packages/points/__init__.py)
That's because the points package [1] (which is a dead project) doesn't have a Point class. The code in the article is probably referring to their own custom module that they never shared. No programming language lets you import code that only exists on somebody else's hard drive.
> this code is shared to show the algorithm, not as a drop-in application that just runs. It depends on two private modules configmanners and Points. Both of these are on github
I don't know why you would find this so confusing, or blame Python. The author literally explains that the points module is not on pip. You installed some random pip package and expected it to replace a different dependency.
Was this note at the bottom not there earlier? It seems to me like a clear enough disclaimer.
Please note: this code is shared to show the algorithm, not as a drop-in application that just runs. It depends on two private modules configmanners and Points. Both of these are on git hub, but to put them upload them to pip would be to commit to supporting them in perpetuity. I'm not willing to do that.
This is a valid criticism of the Python community and something the core language maintainers should look to address.
Working in Python in the 2000s, I was extremely happy. Working in Python (especially ML and data science applications) in the 2020s is a nightmare. The world has come a long way, and Python has actually taken a backslide.
Python would do well to learn from the Rust project and their Cargo package manager and tooling.
> This is a valid criticism of the Python community and something the core language maintainers should look to address.
The author didn't include one of his custom source libraries that's not needed to understand the code, so that makes this a valid criticism of the Python community? lol
The code shouldn't build, go green, or be in any shareable state. This is horrifically bad practice.
A language should remove all of these thorns in a first-class manner.
Until you use a package manager like Cargo, you probably can't intuit the wide gulf here. A good analogy might be imagining the world before version control.
Dependency control matters immensely. Hermeticity and repeatability matter immensely. We should strive to build these into the very foundations.
An hour or so from where I live there have been complaints about an infrequent low rumbling sound for years[0]. I'd wondered -- at the time -- why you couldn't just do something like they do with the gunshot detectors to find the source of the sound[1]. I suspect there must be a technical/physics reason that I am not familiar with. This article re-enforced that thinking for me -- I think I've heard one of these air cannons, before (I have not heard the Windsor Hum), and its characteristics seem more like a gunshot kind of sound than what's described here but ... if you can record the time it starts from three different points (and all you're looking for is "an area roughly the size of a large factory" because it had always been suspected to be one of the plants along the river), wouldn't this approach have been simple/cheap enough to do to figure it out[2]?
[0] https://www.npr.org/2020/08/04/898853311/it-took-a-pandemic-... -- it was solved because a steel plant shut down and the problem went away.
[1] Part of the problem was that a subset of the population could hear it and a subset of that population noticed it enough to be bothered about it so it kind of led to a large number of people dismissing complaints as "people who complain about WiFi signals harming their health"
[2] And if I answer my own question: I suspect it probably was and I suspect the reason it wasn't done is that nobody cared enough to do it, really. :)