Explore BrainMass

given a latitude and longitude, can return a search radius

Looking for a calculation that given a latitude and longitude can return a search radius

Here is the issue: I have a table of zip codes with their corresponding longitude and latitude values. For any given zip code, I need all of the zip codes in a 10 mile search radius. How would I set up the calculations to perform such a task?

I set up a calculation to determine the distance between two points by using:
SQRT( ((69.17 * (@sLat - @pLat) )
* (69.17 * (@sLat - @pLat))
+ ( 57.56 * (@sLon - @pLon) )
* ( 57.56 * (@sLon - @pLon))))
The zip codes are in Southern California which is why the 57.56 value was used. I am not sure how to set up the radius calculation given only one set of latitude and longitude values.