Page 1 of 1
Posted: Thu Sep 16, 2004 10:22 am
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.
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.
Posted: Thu Sep 16, 2004 10:33 am
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
Great ideea!

Posted: Thu Sep 16, 2004 10:43 am
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>
Posted: Thu Sep 16, 2004 10:51 am
by BingoTheClowno
Microsoft Vision SDK is all you need:
http://msdn.microsoft.com/library/defau ... vissdk.asp
http://research.microsoft.com/vision/
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>
Posted: Thu Sep 16, 2004 11:01 am
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!
Royston
edit:
p.s. if your head's on fire, it's RIGHT ABOVE YOU!
<font size=-1>[ This Message was edited by: Counterparts on 2004-09-16 12:05 ]</font>
Posted: Thu Sep 16, 2004 11:57 am
by Immanuel
Every four and a half seconds == 1 mile.
Easy!
Royston
This is MUCH easyer in metric. We just count 3 seconds and then we have a km

Posted: Thu Sep 16, 2004 2:49 pm
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.
Posted: Thu Sep 16, 2004 2:52 pm
by valis
Let me know when you're ready to implement a skin or two..

Posted: Thu Sep 16, 2004 2:57 pm
by BingoTheClowno
LOL
Posted: Thu Sep 16, 2004 3:16 pm
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)

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...
cheers, Tom
Posted: Thu Sep 16, 2004 3:29 pm
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

) and automaticaly trigger the audio sampling.
Posted: Fri Sep 17, 2004 4:49 am
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