8 ms·
Finding the Air Cannon
- xnx 3y agoNice 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.
- xnx 3y agoChatGPT 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 https://github.com/glucee/Multilateration
- avidiax 3y agoThis is not the same problem. We don't have the distance to the source, only the difference in arrival times.
- xnx 3y ago"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." https://en.wikipedia.org/wiki/Pseudo-range_multilateration https://en.wikipedia.org/wiki/Pseudo-range_multilateration
- bryanlarsen 3y agoDefinitely what I would have tried to do. Likely would have taken me longer than the approach the OP took.
- votingprawn 3y agoIf 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) https://imgur.com/a/tqV0ToU https://imgur.com/a/tqV0ToU
- te 3y agoEpic 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).
- mixedmath 3y agoThis 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.
- yorwba 3y agoSince 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.)
- mixedmath 3y agoAh yes, you're right! Thank you.
- titanomachy 3y agoGood 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.
- more_corn 3y agoOregon state and Corvallis have a noise ordinances. The farm likely would have faced significant fines if he hadn’t solved the problem.
- NotYourLawyer 3y agoI was thinking that you’d need a pretty accurate clock reference to do this, automatically triggering based on a microphone to log the time. But I guess not. Sound is slow on a distance scale of miles, so timing it to the nearest second is good enough.
- elteto 3y agoA 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.
- throwup238 3y agoGPS 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.
- gwern 3y agoFun historical trivia: shortly after winning the Nobel Prize, Bragg https://en.wikipedia.org/wiki/Lawrence_Bragg#Work_on_sound_ranging https://en.wikipedia.org/wiki/Lawrence_Bragg#Work_on_sound_r... spent WWI working on exactly this problem https://en.wikipedia.org/wiki/Artillery_sound_ranging https://en.wikipedia.org/wiki/Artillery_sound_ranging
- mmh0000 3y agoI really dislike Python. 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) ```
- advisedwang 3y agoThat'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. [1] https://pypi.org/project/points https://pypi.org/project/points
- paavope 3y agoIn this case it’s the fault of the author in either not including all the source code, or having undocumented dependencies
- echelon 3y agoThis 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.
- pokey00 3y ago> 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
- sandworm101 3y ago>>> 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. https://midwesternnewspapers.com/dont-cross-the-dreaded-canadian-cobra-chicken/ https://midwesternnewspapers.com/dont-cross-the-dreaded-cana...
- pnemonic 3y agoPedantic snark aside, "cobra chicken" is god damned hilarious.
- beAbU 3y agoNot sure why you are being downvoted, this is the best kind of pedanticism.
- sandworm101 3y agoA 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.
- burkaman 3y agoI 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.
- deleted 3y ago[deleted]
- 3y ago
- andrewla 3y agoMore than the code, I'd be very interested in having the dataset be made public.
- mdip 3y agoThis 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]? [0] https://www.npr.org/2020/08/04/898853311/it-took-a-pandemic-mystery-of-windsor-hum-is-solved 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. :)
- efitz 3y agoI 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.
- fwip 3y agoWriting an app and deploying it to three different devices seems like a lot of complexity, compared to a clock, a pen, and a piece of paper.
- Log_out_ 3y agoArtillery triangulation app. 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.
- VMG 3y agoMy 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...
- ok_dad 3y agoI 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).
- PaulHoule 3y agoI 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.)
- opwieurposiu 3y agoThe 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.
- aaron695 3y ago[dead]
- DylanSp 3y agoI'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. [1] https://en.wikipedia.org/wiki/Ural_Airlines_Flight_178 https://en.wikipedia.org/wiki/Ural_Airlines_Flight_178. There's a good article about the accident at https://admiralcloudberg.medium.com/russias-potemkin-miracle-the-story-of-ural-airlines-flight-178-5608e797c63e https://admiralcloudberg.medium.com/russias-potemkin-miracle....
- Levitating 3y agoSometimes you have to fire a few rounds at them.[1] [1]: https://youtu.be/n-Ej2EtE744 https://youtu.be/n-Ej2EtE744
- gorkish 3y ago> 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?