Finding the Air Cannon
January 29, 2024 10:15 PM   Subscribe

For about three weeks, folks living in Corvallis, OR have had their sleep disrupted by a sound of mysterious origin. Retired software engineer K Lars Lohn engaged in some clever acoustic detective work to pinpoint the source.
posted by mpark (69 comments total) 44 users marked this as a favorite
 
Yay math!
posted by latkes at 10:54 PM on January 29 [7 favorites]


As a professional programmer I approve of using a brute-force scan over the whole area to find a point matching the measured time differences. Because it worked.

The math child in my heart really wanted to see some intersecting hyperbolas, though.
posted by away for regrooving at 11:06 PM on January 29 [21 favorites]


I really admire the way he handled this and also this line in the code:
terrible_number = 100000
Yes it is.
posted by Richard Upton Pickman at 11:43 PM on January 29 [8 favorites]


Shot-spotter!
posted by rhizome at 11:51 PM on January 29 [3 favorites]


To save people a click and say what it was:

It was an air cannon used on a farm. Such air cannons are used to scare off wildlife, particularly Canadian geese in this case according to the author.

The air-cannon sleuth figured out where it was, called the owner of the property, and asked if the onsite staff ran the air cannon at night. They claimed not to, but conveniently after he contacted the owner of the property, the air cannon use at night suddenly stopped.

He didn't name names, but indicated a certain farm that some people suspected was involved was actually innocent of the harm done.

Harm done: sleep disrupted for something like 20 days for quite a few people. Hundreds, thousands, I'm not sure. The author said he saw threads about it on several social media sites from the people affected.

Score one for motivated nerdery looking out for the public good.

(This is my 100% human meat-brain summary, no AI tools were used).
posted by cats are weird at 12:36 AM on January 30 [50 favorites]


his blog is a delight - the mazes are insane and it reminds me of old-school blogs
posted by dorothyisunderwood at 1:16 AM on January 30 [8 favorites]


Two decades ago, and on a much much smaller scale, a car alarm used to go off on my street at half past midnight, every night, for about twenty seconds. For months. One night a friend was visiting and we decided that it was time to act. We chose two positions on the street, the thing went off, and it took us about fifteen seconds to work out which car was responsible. I tucked a note under its wiper ("Do you know your alarm goes off for twenty seconds at 12.30 every night?") and that was the last time it happened.

The key point is not that we stopped it, but that nobody else did. For months.

Be the change &c.
posted by Hogshead at 2:32 AM on January 30 [44 favorites]


the mazes are insane

They are absolutely amazing.
posted by Literaryhero at 2:35 AM on January 30 [7 favorites]


away for regrooving: Yeah my first thought on this one is "...and now there'll be some gnarly trig calculations and formula derivations to figure out where it is" and nope, just iterate through the solution space to find a near-enough value. Definitely a programmer first, mathematician second ;)
posted by parm at 3:33 AM on January 30 [13 favorites]


Such air cannons are used to scare off wildlife, particularly Canadian geese in this case

hard to believe that Canada gooses are still labelled a pest species in most rural areas
posted by flabdablet at 4:00 AM on January 30 [5 favorites]


Some prick across the valley out behind our place occasionally lets one of these things off to disrupt the roosting of our local cockatoo flock.

Yeah, they're loud. Yeah, they massacre young greenery. But what a prick.
posted by flabdablet at 4:02 AM on January 30 [2 favorites]


wildlife, particularly Canadian geese

"Canada Geese", please. We don't claim the cobra chickens as our own.
posted by Paladin1138 at 4:03 AM on January 30 [28 favorites]


the mazes are insane

They are absolutely amazing.


The post about leaving mastodon.art after being told he couldn't mention the graphics program GIMP, which reminded him of a homophobic incident in a seedy Montana bar decades ago, and after years of describing himself as a queer gimp due to a disabling illness, is also worth a read.

Thanks for this, mpark. What a fascinating little blog, and a neat, thoughtful human.
posted by mediareport at 4:15 AM on January 30 [14 favorites]


The Canada Goose is a a pest menace wherever it’s found.
posted by GenjiandProust at 4:45 AM on January 30 [3 favorites]


So's an air gun going off every two minutes (!) throughout the day. I mean, glad the nighttime blasts are gone but damn that's frequent.
posted by mediareport at 4:50 AM on January 30


Lars's PyCon US keynote speech from a few years ago

An amazing spectacle of code and story, memoir and math and music. 52 minutes long.
posted by brainwane at 4:54 AM on January 30 [2 favorites]


hard to believe that Canada gooses are still labelled a pest species in most rural areas

You have obviously never lived beside a large pond/small lake conveniently located along a north/south migration path.

Ah, good old Lake Goosepoop! Those were the days.
posted by Naberius at 5:20 AM on January 30 [4 favorites]


throughout the day. I mean, glad the nighttime blasts are gone but damn that's frequent.

Being super super generous I'd say it was malfunctioning and no one knew how to fix it.
posted by Tell Me No Lies at 5:21 AM on January 30


This is neat, though this little bit from the source caught my eye.

from configmanners import Namespace, configuration

Wonder why he's using what appears to be a custom configparser module. I did a search for 'configmanners' and the only result was the blog post about the air cannon.
posted by RonButNotStupid at 5:21 AM on January 30


The solution is okay, but as a nerd I have to say: there are decibel measuring apps for most cellphones today. All the timing business was unnecessary.
posted by Tell Me No Lies at 5:22 AM on January 30


Isn't the timing necessary for triangulating the position? Wouldn't a decibel measuring app just give you the magnitude with possibly a timestamp?

Or are you just assuming they had a synchronized clock and manually recorded the observations without the use of any equipment like a cell phone with a decibel app, in which case, yeah, they could have taken better measurements with an app (assuming they didn't already do that and the blog's just being vague)
posted by RonButNotStupid at 5:32 AM on January 30 [2 favorites]


(And speaking of assumptions, I just realized I used a particular gender pronoun without first checking. It looks like it is the blog author's preferred one, but I only learned that after a little digging, so this is still an oversight on my part)
posted by RonButNotStupid at 5:38 AM on January 30 [2 favorites]


Absolute hero
posted by minervous at 5:43 AM on January 30


Ha, I expected to read about some high tech measuring equipment. Instead, just three people with an accurate phone clock and a notebook.
posted by jjj606 at 6:07 AM on January 30 [1 favorite]


Isn't the timing necessary for triangulating the position?

You're not triangulating with a decibel app. You're finding a loud noise the way you normally would be with hearing but using a device that is much better than humans at measuring the magnitude of the noise.
posted by Tell Me No Lies at 6:18 AM on January 30


It's always interesting to me how slow the speed of sound is. My favorite visualization of it is the Queen at Live Aid performance (link goes to looping image) where the crowd motion actually visualizes the sound travelling from the stage.
posted by true at 6:19 AM on January 30 [11 favorites]


It's always interesting to me how slow the speed of sound is.

Get involved in optical networking and you start to realize how slow the speed of light is. It takes three milliseconds to get from New York to Chicago, which sounds fast until you realize the light from the sun is coming 91 million miles to get here. And the light from the nearest star is coming 5.88 trillion miles.

The speed of light is a slow crawl compared to the distances it travels.
posted by Tell Me No Lies at 6:26 AM on January 30 [4 favorites]


Try to do fancy maths after 20 days of sleep deprivation. I approve and recommend brute force. I am amazed they managed to keep the variable names safe for work.
posted by Dr. Curare at 6:27 AM on January 30 [8 favorites]


(This is my 100% human meat-brain summary, no AI tools were used).
posted by cats are weird


Sounds like something a dog would say.
posted by grog at 7:06 AM on January 30 [1 favorite]


You're not triangulating with a decibel app. You're finding a loud noise the way you normally would be with hearing but using a device that is much better than humans at measuring the magnitude of the noise.

The triangulation was necessary because they used their ears to determine that the point source was located somewhere on a large swath of inaccessible private property.
posted by grog at 7:14 AM on January 30 [3 favorites]


Cellphone science is neat, even when the actual processing is done elsewhere
posted by scruss at 7:18 AM on January 30


I'm surprised air cannons aren't fitted with radar or some sort of camera with image recognition to detect a flock of geese, and triggered at that point, rather than once every N mins.
posted by hrpomrx at 7:20 AM on January 30


Triangulation is one neat trick. We learned how to do it with earthquake epicenter location in my first geology class. Thought "that was a fun class". Then I decided to get a degree in Geology...
posted by Windopaene at 7:25 AM on January 30 [1 favorite]


K Lars Lohn is a national treasure. Previously on the blue: The Grand Old Lady (electromechanical pinball wonders), but his closing keynote at PyCon 2016 is one of the best live performances I have ever experienced.

His maze illustrations are wonderful.
posted by AlSweigart at 7:35 AM on January 30 [5 favorites]


While I do not support the use of artillery in the removal of Canada Geese, my feelings about them have not changed since the last time I spoke about them.
posted by KingEdRa at 7:41 AM on January 30 [2 favorites]


I was going to say something about how this is what happens when you live in a rural area - it's not always "pastoral" on a working farm. But these air cannons were audible 6 miles away!
posted by thecjm at 7:43 AM on January 30


I've always hated these things for how indiscriminate they are. Sure it's keeping the geese away. It's also stressing most animals, and insects within range.

I mean it is nothing compared to the noise of concentrated humans but it would be nice if our quasi natural areas weren't so hostile.

Get involved in optical networking and you start to realize how slow the speed of light is. It takes three milliseconds to get from New York to Chicago,

I can't send emails more than 500 miles.
posted by Mitheral at 7:54 AM on January 30 [15 favorites]


I feel like I would have just lofted a drone but math is also cool. and anyway no one wants to read an article about a drone.
posted by seanmpuckett at 8:01 AM on January 30 [1 favorite]


There's two minutes between booms. How is a drone or a sound level meter going to help?
posted by mpark at 8:09 AM on January 30


You're finding a loud noise the way you normally would be with hearing but using a device that is much better than humans at measuring the magnitude of the noise.

If the air cannon was a continuous hum and you had a directional decibel meter (or maybe even used your body as a shield?), then yes, you hold it while spinning 360 degrees and determine which direction the noise is "loudest". Do that in a few locations and you could triangulate the position of the source.

The problem is the air cannon wasn't a continuous hum, it was a momentary bang. You'd have to do much more work to acquire all the samples you'd need, and this is where a timing-based approach becomes more practical. It's much easier to record the exact time you get the momentary blip than to compare a bunch of different blips recorded at different times and at different angles to see which one is the biggest.
posted by RonButNotStupid at 8:34 AM on January 30 [4 favorites]


Re: Canada geese being considered pests at ponds. The thing is, the areas around natural ponds don't get paved with goose shit. It's our unnaturally groomed and mown ponds that attract them in large numbers and make big messes. If you want less geese at your pond, plant native plants around them. That's what smart towns are doing, after finally realizing they've been Doing It Wrong for decades. In my town you can see side-by side examples and it's hilarious. The ones that are supposed to look "nice" with acres of short turf are covered in shit, while the ones that have nice natural native plantings around the edge are not.

So if you spend a bunch of time and money and fossil fuel rolling out a goose welcome mat around your pond, don't complain that they take the invitation seriously.
posted by SaltySalticid at 8:52 AM on January 30 [9 favorites]


The brute force search is the sort of solution where it runs slowly, but it's faster in a use-just-once situation when you include both the programming time and the time to develop the algorithm.

The custom configuration library has hilariously straightforward documentation. "I salvaged this from a previous job because I use it. I'm not interested in publishing it properly nor in fixing bugs. If you do those things for me, okay, whatever."
posted by fantabulous timewaster at 8:53 AM on January 30 [7 favorites]


This post is relevant to my life.

Every year, on New Year's Day, some yahoo has set off an absolutely massive explosion that can be heard throughout the county. It's almost certainly some farmer with a shitload of Tannerite.

Anyone who knows who it is isn't talking.

I have thought of getting some friends to do some triangulation as well, but the system would have to be semi-automated, as the occurrences aren't on any kind of schedule beyond being on the same day.
posted by ArgentCorvid at 9:41 AM on January 30


Being super super generous I'd say it was malfunctioning and no one knew how to fix it.

other than it being on at night, it's functioning as intended. it needs to go off frequently enough to scare the geese, but not too often or the geese get used to it and ignore it.
posted by Dr. Twist at 9:53 AM on January 30


This guy is super charitable. He could've put up signs for miles around the farm, pointing the way to the source of everyone's lack of sleep for a month. He could've done that while refraining from warning the farm, so people were still acutely furious when they encountered the signs.

What he did instead is better for everyone. I just can't imagine acting in as benign a way as he did, in the state I'd be in after a month of bad sleep.
posted by gurple at 10:37 AM on January 30 [4 favorites]


<well="actually">Folks are mentioning triangulation, but what's going on here is trilateration. You're localizing based on distances, not angles.

</well>
posted by tss at 10:38 AM on January 30 [12 favorites]


high tech measuring equipment. Instead, just three people with an accurate phone clock

Three pocket clocks that we unthinkingly *expect* to be perfectly in synch — incredibly high tech equipment!

It just vanishes into our consciousness, doesn’t it?
posted by clew at 10:44 AM on January 30 [5 favorites]


Dependent on GPS satellites with atomic clocks. Literally space age nuclear technology we take for granted.
posted by Mitheral at 10:59 AM on January 30 [4 favorites]


Just want to say thanks to everyone who's added more information about K Lars Lohn! I'd seen that PyCon video a long time ago but didn't make the connection.
posted by mpark at 11:07 AM on January 30 [1 favorite]


> It just vanishes into our consciousness, doesn’t it?

Keeping multiple computers in sync is job-related, so this is the sort of thing I get to pay attention to! NTP - Network Time Protocol - can get you within milliseconds, across the Internet, and it was designed by David Mills, who passed away a couple of weeks ago. I know the ntp option is built into MacOS, and offered in Linux.

Cell phone towers also have fairly accurate clocks, though I can't tell how accurate offhand.

I'm curious about how accurate the timing was; a three-way phone call might have been enough - it looks like 20-40 milliseconds is normal.

It feels like this should be doable by hand, right? I think it's about sketching parabolas. It's not, though, like figuring out earthquake epicenters; those have two distinct waves, with different speeds, so you can use circles of certain distances - it's easy by comparison.
posted by Pronoiac at 11:19 AM on January 30 [3 favorites]


While I do not support the use of artillery in the removal of Canada Geese, my feelings about them have not changed since the last time I spoke about them.

When it comes to being mean, vicious and aggressive, Canadian Geese cannot hold a birthday cake candle to Mute Swans. Those are birds you should never want to encounter on either land or water.
posted by y2karl at 11:46 AM on January 30 [1 favorite]


Mute swans for a while were a "classy" way some golf course kept Canada Geese out, because they fucking hate those geese and are bigger and meaner and will not share a small pond with them. But they can absolutely introduce other problems!
posted by SaltySalticid at 11:53 AM on January 30 [1 favorite]


Hoo-boy, mute swans. I took a group of scouts canoeing on the southern stretch of the Rideau Canal last year. It is absolutely infested (they are listed as an invasive species) with those things -- we saw hundreds of them along a stretch we did on one of our canoeing days. We had to stress to the kids how important it was to stay the fuck away from the pretty swans, especially if they had cygnets in tow.
posted by fimbulvetr at 12:03 PM on January 30 [1 favorite]


The only birds meaner and angrier are hummingbirds. Those little fuckers* would gladly kill you, were they big enough. Like, say, Robin size.

*[Autocorrect: Fulkerson!]
posted by y2karl at 12:04 PM on January 30 [3 favorites]


You're not triangulating with a decibel app.

You *could* though, right? Assume the noise produced by the cannon is isotropic and decays as inverse square of distance; take loudness measurements at the same 3 non-equidistant locations they did time-delta measurements at; solve similarly to the time-of-flight approach.
posted by We had a deal, Kyle at 12:09 PM on January 30


Swans hate everything: Swan bites turtle
posted by y2karl at 12:14 PM on January 30


If the air cannon was a continuous hum and you had a directional decibel meter (or maybe even used your body as a shield?), then yes, you hold it while spinning 360 degrees and determine which direction the noise is "loudest". Do that in a few locations and you could triangulate the position of the source.

Or you could just take one omni-directional measurement, move 100 meters down the road and take another measurement, and then you would know which one was closer. That works for any sort of noise and any sort of decibel meter.
posted by Tell Me No Lies at 12:25 PM on January 30 [1 favorite]


>You're not triangulating with a decibel app.

You *could* though, right? Assume the noise produced by the cannon is isotropic and decays as inverse square of distance; take loudness measurements at the same 3 non-equidistant locations they did time-delta measurements at; solve similarly to the time-of-flight approach.


Yep, and then you wouldn't need two other observers and synchronized clocks.

The way they did it is a lot more fun though.
posted by Tell Me No Lies at 12:26 PM on January 30 [2 favorites]


The triangulation was necessary because they used their ears to determine that the point source was located somewhere on a large swath of inaccessible private property.

Agreed that if you want to get it down to a point you can't access that triangulation is the way to go. But you could get pretty close by simply measuring volume on public roads I think.

I really wish Mythbusters was still on the air.
posted by Tell Me No Lies at 12:32 PM on January 30




As a professional programmer I approve of using a brute-force scan over the whole area to find a point matching the measured time differences. Because it worked.

I dunno, my programmer self looked at the diagram, which had a rectangle labeled "Sound Source Search Area," and quietly scoffed at the added complexity of the problem space. Then I realized that not all programmers came of age in the late 90s when they realized they could program their TI-89's to do all their trig equations for them, and thus probably do not still have the law of cosines engraved in inch-tall letters on their frontal cortex. If it were me solving this problem, I'd have done the math necessary to triangulate via trigonometric functions, because that would be the laziest way to get an answer quickly. This dude brute-forced it, because that's the laziest way for HIM to get an answer quickly. I salute our differences.
posted by Mayor West at 12:46 PM on January 30 [5 favorites]


Assume the noise produced by the cannon is isotropic and decays as inverse square of distance; take loudness measurements at the same 3 non-equidistant locations they did time-delta measurements at; solve similarly to the time-of-flight approach.

That makes sense in theory, but the problem is that cell phones are very inaccurate devices for measuring sound levels, which will depend on the exact orientation in three dimensions of the phone relative to the sound source (which is not known precisely), if there's a bit of dust in the mic, atmospheric conditions and who knows what else. You're just not going to get good data on sound levels from a cell phone. Time though, cell phones are quite good at.
posted by ssg at 1:02 PM on January 30 [8 favorites]


"I'm surprised air cannons aren't fitted with radar or some sort of camera with image recognition to detect a flock of geese, and triggered at that point, rather than once every N mins."

Those cannons have been virtually unchanged for decades and work fine without over complication.
posted by Dr. Twist at 1:13 PM on January 30


Okay, it's great how this guy was able to use cleverness to locate the source of the noise, but I think we're losing sight of the fact that THESE ARE CANADA GEESE WE'RE TALKING ABOUT!

The Lord God created all creatures great and small. Except one.

I say Corvallis Oregon needs to grow a pair. An endless cycle of massive booms that keeps you from sleeping for months on end is a small price to pay. With apologies to Bruce Cockburn, If I had a sonic cannon, I would not hesitate.
posted by Naberius at 1:53 PM on January 30 [2 favorites]


You're just not going to get good data on sound levels from a cell phone.

Are you speaking from experience here, because I've gotten some pretty good data on sound levels from cellphones. In fact we checked two iPhones and a Samsung against each other to make sure the app calibrations matched and they came in pretty close.

We were however indoors and I could see wind across the microphone being a problem.
posted by Tell Me No Lies at 7:50 PM on January 30


While I approve of the sentiment I fear the unrestricted use of such will result in the breeding of cannon-resistant geese.
posted by sebastienbailard at 6:00 AM on January 31 [4 favorites]


I’m less worried about cannon-resistant geese than I am about crows noticing, taking over the cannons, and demanding a tribute of peanuts and shiny interesting things or they will set off the cannons all night.
posted by GenjiandProust at 7:06 AM on January 31 [5 favorites]


While I approve of the sentiment I fear the unrestricted use of such will result in the breeding of cannon-resistant geese.

Air cannon, anyway. Perhaps it's time to up our game.
posted by Tell Me No Lies at 9:01 AM on January 31 [3 favorites]


Mod note: You can find this post in the sidebar/Best Of blog!
posted by Brandon Blatcher (staff) at 7:43 AM on February 1 [2 favorites]


« Older It’s cold enough to freeze your tires square.   |   No idea what they might say to the man they... Newer »


This thread has been archived and is closed to new comments