I am calculation distance between a fix geopoint and my phone current location using haversine formula inside geolocator.poistionchanged event. But the phone's current geocoordinates are changing without moving the phone and the distance is varying greatly. How can i fix this problem or at least reduce it?
Most GPS chips in mobile devices have an accuracy of 15 meters. As such the position it reports often jumps around, especially if there are tall buildings around.
If you are indoors, the GPS likely isn't getting a signal, so the phone would then fall back to WIFI positioning which has an accuracy of about 100 meters.
If GPS and wifi can't be used for some reason, the phone will then fall back to IP address which, at best is accurate to the city.
Now, assuming you have good GPS signal, the way to reduce the noise is to make use of the movement threshold and the report interval. Here is a good blog post about these options: