calculates distances between target and user in the main activity and updates every 2 sec.