I researched a little in this topic, but there are many opinions that don't exactly give a clear image. My problem is this: I'm developing a GPS-based app for Android, in which I want to know distance between my current location specified by Androids LocationManager, and other location in real time. I tried Haversine formula, a Law of Cosines formula, then I discovered, that Android SDK gives me a simple function Location.distanceTo(Location) - I'm not sure what method does this function runs on.
So, the point is, which one will be good for me to use, in situations when real distance between these locations most of the time won't be larger than aprox. 100-200m? Maybe I should check Vincenty's formulae? Is it really that slow? Can someone please explain me what should I choose?
Don't use distanceTo. Use the distanceBetween method as it sounds like you already have the coordinates and that's all you need with this method: Location.distanceBetween() Javadoc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With