B4Xer's,
Eish (South African Term) - please start by reading this
https://en.wikipedia.org/wiki/Location-based_service
Your "smart" device has 3 locations stored or used at any given time. These are:
1. GPS
2. LBS (Uses WiFi, Cell Towers, IP address)
3. Last known location
So your location is always known (this is how GSM/LTE functions with several things like RSSI, Satellites, IP Address etc coming into play to provide the data)
This information can be obtained by your GPS, by Trilateration (
Info Here) or your last known IP address and is stored on your device (last known location) and if your location services are on then it is passed to Google for all sorts of strange things.
When you have an app that needs location for what ever reason (and you are using Fused Location Provider for example) you can look at whatever is available and start your process on that while your app connects to GPS and gets a Lat/Lon reading (heading/bearing, speed, altitude is also available) to give a more accurate picture of what you require.
Given all this, bear in mind that GPS is battery intensive and at times (especially travelling in urban areas - speed slower) it will suffice to use LBS (WiFi or Cell Towers) to navigate and by so doing save battery power and only occasionally call on GPS for a more accurate update.
Then, after all this is considered, where does the
Haversine Formula play a part here ??
PS. Google have several API's that assist with all these issues.
As
@Peter Simpson Says
Enjoy...