I have many requests at the same time on the server side with longitude and latitude coordinates how can I figure out which points are located in the circumcircle of 5 meter with Java?
How to do it with Java is trivial once you have the formula. So that's where you need to start.
How accurate do you want it? Assuming rectangular coordinates is easiest, but obviously pretty inaccurate. Even assuming a sphere has inaccuracies since the world isn't a perfect sphere.
You can google for the formula. Or, speaking of Google, can you just use their geo web service and have them do all the hard work?
I am trying to use the haversin formula to prevent updating the mysql table. I am implementing an app based on crowdsorucing where the data mac, route, lat, long is being recorded by the devices of the passangers im bus and send to the server.
My database table has mac address as UNIQUE KEY. So to avoid that other passanger in the same bus to store their data in the table I would filter these requests out by using the Haversin formula but I tried it with tow point which are roughly 20 meter close to eachother but I am gettig number of 4803.800129810092
does someone know any idea how can I reach that? the most buses are without WIFI access point.
I understand your point thanks. Is this formula sufficient for my issue since I am trying to calculate distace between two point with distance of 5 meter?
It looks pretty much identical to code that I have used in the past for calculating the length of a GPS track based on points measured once a minute by a person on foot. Probably we got it from the same source. Anyway, testing should clarify whether it works for you, no?
Maybe : I have multiplied R with 1000 to get the result in meter and I am getting value between 8-15 meter. I have picked some geocoordinates from my vicinity I have to test it real but I am realy surprised ;)
Catch Ernie! Catch the egg! And catch this tiny ad too:
a bit of art, as a gift, that will fit in a stocking