I would like to reiterate what JackN said -- you don't have enough
info. But a good place to start would here:
http://www.movable-type.co.uk/scripts/latlong.html
For those interested, a routine for the distance between two points
(on Earth) in kilometers is:
public double gps2m(double lat_a, double lng_a, double lat_b, double
lng_b) {
double R = 6371; //km
double dLat = (lat_b - lat_a) * (Math.PI / 180.0);
double dLon = (lng_b - lng_a) * (Math.PI / 180.0);
double a = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.cos(lat_a *
(Math.PI / 180.0))
* Math.cos(lat_b * (Math.PI / 180.0)) * Math.sin(dLon/2) *
Math.sin(dLon/2);
double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
return R * c;
}
where lat_a and lng_a are your start coordinates and lat_b and lng_b
are your stop coordinates.
Ken H
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en