

Ask YC: Radar Collision Detection Algorithm? - davidw

Hi guys, I've had this problem that's been bugging me for a while.  Say you have a series of radar images, that show something, like a thunderstorm or a tornado, marching across a map.  How would you calculate whether a given area is going to get rained on?  The thing that makes it tricky is that you're not talking about some definite shape X that has a constant area.  It's a problem that people are relatively good, if imperfect at, because you can see the thing moving and say, yeah, it'll probably hit that point soon.
======
RiderOfGiraffes
In short:

    
    
        Compare two images with a known time difference.
        Remove all the parts that appear not to have moved
        Remove all the small stuff
        Compute the "centre of mass" of what's left
        Do a finite difference to compute the velocity.
        Repeat on another pair of images
        Tracks the centroids using Alpha/Beta
            (or Kalman, or unscented Kalman)
    

For large masses that are moving fairly consistently, this approach will work
pretty well. From here you need to:

    
    
        Write clearly the assumptions made
        Test that your assumptions are valid
        For those that aren't, decide their impact on tracking
        Modify the tracking process to allow for the differences
        Lather, Rinse, Repeat.
    

Finding and removing small centroids can be tricky, but doesn't matter so much
if they're not moving. Coping with your "cloud", "rain" or "tornado" breaking
up is harder. You can for example, smooth your image to help remove holes.
There's a bunch of stuff to help with that.

------
Tangurena
Collision detection is an essential feature of game programming, and since
we're programmers, and games are cool (for some values of games, and some
values of cool), therefore, I'm going to recommend that take a look in that
area for algorithms and techniques.

The book _Game Programming Gems_ (the first one) has a chapter on collision
detection. <http://www.amazon.com/Game-Programming-Gems/dp/1584500492/>

Article to start with:
<http://www.gamedev.net/reference/articles/article1234.asp>

As an aside, one thing that took some getting used to, after moving to
southern Florida, was that when the forecasters there said "25% chance of
rain" it meant something different than when that exact same phrase was
uttered in the rest of America. In S. FL, it meant "25% of the listening area
will get wet" compared to the rest of the country, where it means "no chance
of rain."

------
davidw
Hrm... Wikipedia says people _are_ best:

<http://en.wikipedia.org/wiki/Weather_forecasting#Nowcasting>

I guess really good models would include history, and actual knowledge of
weather. I'd be happy with something simpler, though.

