Wanna know how far the last thunderstrike was?

Please remember the terms of your membership agreement.

Moderators: valis, garyb

Post Reply
User avatar
kensuguro
Posts: 4434
Joined: Sun Jul 08, 2001 4:00 pm
Location: BPM 60 to somewhere around 150
Contact:

Post by kensuguro »

well, as you may know from my thunder patch and what not, I'm a thunder kinda guy. Consider this, if all my visa went as planned, I would have been in Florida by now. Yup, to fight all those hurricanes.

Not sure if hurricanes cause any thunder, but I thought I'd do a little practice program. (I'm learning MFC right now) This little program figures out how far a thunderstrike is. All you have to do is click a button when you see a flash, and then click it again when you "hear" the strike. Of course, this is fairly inaccurate, as you could be hearing sounds from earlier strikes... but atleast it gives you something to fiddle around with. :smile:

http://www.iface.ne.jp/~ken/thundercalc.exe

The current version is all done in imperial (read American) measurements, mainly because of my sympathy for Floridians taking recent damage.

It's a simple, cheap, poorly written software... but if anyone wants a metric version, I'd be happy to compile one. It was originally in metric units, but as it was in Japanese, I decided to compile an English, imperial version.
User avatar
BingoTheClowno
Posts: 1722
Joined: Wed Nov 12, 2003 4:00 pm
Location: Chicago
Contact:

Post by BingoTheClowno »

The next step would be to implement code that will read images from a video camera at 30 f/s and sample the sound of input signal where a microphone would monitor the thunder strikes then detect the peak of the thunder and the image data + peak audio data to determine the distance :smile:

Great ideea! :smile:
User avatar
kensuguro
Posts: 4434
Joined: Sun Jul 08, 2001 4:00 pm
Location: BPM 60 to somewhere around 150
Contact:

Post by kensuguro »

wait 'till I get my hands on directX! Funny you mensioned about machine vision, I'm developing towards something similar, with pattern recognition and motion detection. But of course, I'm still wrestling with basic windows programming so, who knows when I'll get to the juicy stuff... tough stuff, this programming thing. It poses different challenges than what I'm used to in mod patching or Max/MSP.

<font size=-1>[ This Message was edited by: kensuguro on 2004-09-16 11:46 ]</font>
User avatar
BingoTheClowno
Posts: 1722
Joined: Wed Nov 12, 2003 4:00 pm
Location: Chicago
Contact:

Post by BingoTheClowno »

Microsoft Vision SDK is all you need:

http://msdn.microsoft.com/library/defau ... vissdk.asp
http://research.microsoft.com/vision/

:wink:

Direct X is fun, my head is spinning just reading words like vertices, alpha blending, tweening....

LOL

http://msdn.microsoft.com/library/defau ... irectx.asp


<font size=-1>[ This Message was edited by: BingoTheClowno on 2004-09-16 11:56 ]</font>
Counterparts
Posts: 1963
Joined: Tue Aug 19, 2003 4:00 pm
Location: Bath, England

Post by Counterparts »

Sounds like a rather hig-tech solution!

I just start counting, "1-Mississippi, 2-Mississippi, 3-Mississippi..."

Every four and a half seconds == 1 mile.

Easy! :smile:

Royston

edit:

p.s. if your head's on fire, it's RIGHT ABOVE YOU! :grin:

<font size=-1>[ This Message was edited by: Counterparts on 2004-09-16 12:05 ]</font>
Immanuel
Posts: 3018
Joined: Thu Oct 25, 2001 4:00 pm
Location: Aalborg, Denmark

Post by Immanuel »

Every four and a half seconds == 1 mile.

Easy! :smile:

Royston
This is MUCH easyer in metric. We just count 3 seconds and then we have a km :razz:
User avatar
BingoTheClowno
Posts: 1722
Joined: Wed Nov 12, 2003 4:00 pm
Location: Chicago
Contact:

Post by BingoTheClowno »

I was thinking a little more about this topic. I think maybe one can use a photosensor of some kind to determine the intensity of the flash and time of occurence then use the audio peak to calculate the distance.
User avatar
valis
Posts: 7653
Joined: Sun Sep 23, 2001 4:00 pm
Location: West Coast USA
Contact:

Post by valis »

Let me know when you're ready to implement a skin or two.. :razz:
User avatar
BingoTheClowno
Posts: 1722
Joined: Wed Nov 12, 2003 4:00 pm
Location: Chicago
Contact:

Post by BingoTheClowno »

LOL
User avatar
astroman
Posts: 8446
Joined: Fri Feb 08, 2002 4:00 pm
Location: Germany

Post by astroman »

ok Bingo, food for thought...
how do you tell which lightning was the source of which thunder event ?
... lightnings may be out of sight, behind the camera, or obscured by clouds (PinkFloyd already were aware of this problem) :wink:
sound may be reflected, even multiple times

the actual trigger of the thunder isn't a fixed point in space, but moving along lines.
Not always directly to ground but also from cloud to cloud. The distance of the electrical unloading may cover anything from 100 m to 10 km.

and you probably will not only want to know where the last lightning hit, but also which direction the thunderstorm will take.

a pretty complex problem - but with some (outdoor) experience you almost immediately know the solution if confronted with the real-world event... :grin:

cheers, Tom
User avatar
BingoTheClowno
Posts: 1722
Joined: Wed Nov 12, 2003 4:00 pm
Location: Chicago
Contact:

Post by BingoTheClowno »

Good point.

Maybe mount photosensors on the perimeter of a circle, you know, have maybe a hundred or so sensors distributed on that perimeter. The sensor that has the stronger peak, that's where the flash came from (theoretically :smile: ) and automaticaly trigger the audio sampling.
Counterparts
Posts: 1963
Joined: Tue Aug 19, 2003 4:00 pm
Location: Bath, England

Post by Counterparts »

I saw an interesting story about a lightning strike on TV a little while ago.

There was a young lady on holiday, jet-skiing about - clear blue skies, beautiful sunny day, then she woke up in hospital.

Apparently, she was struck by a strike coming from a thrundercloud formation about ten miles away!

ZZZZZZZzzzzzzzzzap!

Moral: Thor hates jet skis (?)

Royston
Post Reply