I am trying to replicate a gps reminder app. Currently the user will able to choose a point through a map and set it as a location. and then add a range to it.
when the user comes to that range the alarm has to ring.
my current obstacle is to add a range lets say 1KM to the latitude and longitude point set by the user and get a new latitude longitude point.
Is there any other method through which I could match the users current location with the range?
I tried the formula below. but I am not getting the desired results.
- CalcLatitude: 1 deg = 110.54 km
- CalcLongitude: 1 deg = 111.320*cos(latitude after adding km)
- NEW Latitude = Old Latitude + CalcLatitude
- OLD Longitude = Old Longitude + CalcLongitude