If I have a latitude/longitude value and DISTANCE value, How can I compute the latitude/longitude which is at “DISTANCE” miles from the given latitude/longitude value?
There are an infinite number of latitude/longitude values which are at “DISTANCE” miles from a given latitude/longitude value. (Unless “DISTANCE” is 0 or half way around the world)
Assuming the world is a sphere and “DISTANCE” is measured along a great circle.
“DISTANCE” =
arcsin(sqrt(
(sin(latitude1)-sin(latitude0))²
+ ((sin(longitude1)*cos(latitude1)-sin(longitude0)*cos(latitude0))²
+ ((cos(longitude1)*cos(latitude1)-cos(longitude0)*cos(latitude0))²
)/2)*circumfrence of earth/pi
0
deeptinayakAuthor Commented:
I need to calculate it the other way round.
If the latitude value is 14.52 degrees, I need the latitude delta value within 50 miles of distance.
I know the result would be around ~0.01 degrees
0
Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.
As ozo has said, there's an infinite number of possible solutions.
Imagine a point on the Earth. Now draw a circle around this point with a radius of "distance". The corresponding lat/long values that you're looking for could be _anywhere_ on the circumference of that circle.
And even if you specified one of the values (either lat OR long) for the point you're trying to find, it would still be ambiguous; as a circle is a many-to-many function, and you'll end up with 2 possible solutions.
if everything always has the same longitude value, then 50 miles would be about .7228 degrees of latitude
(a little more near the equator, a little more near the poles)
0
deeptinayakAuthor Commented:
latitude would always be same. 1 degree = 69.2 miles so latitudedelta = 1*50/69.2
But I need exact value for longitude, how can I figure out the exact difference as distance in 1 degree of longitude differs at equator and poles.
This formula for R gives but a rough approximation to the radius of curvature as a function of latitude. The radius of curvature varies with direction and latitude; according to Snyder ("Map Projections - A Working Manual", by John P. Snyder, U.S. Geological Survey Professional Paper 1395, United States Government Printing Office, Washington DC, 1987, p24), in the plane of the meridian it is given by
R' = a * (1 - e^2) / (1 - e^2 * sin^2(lat))^(3/2)
where a is the equatorial radius, b is the polar radius, and e is the eccentricity of the ellipsoid = (1 - b^2/a^2)^(1/2).
But when you take into account the fact that the Earth is not quite a sphere, there are subtly different ways of defining "latitude", so you may need to ask a more precise question to get a more precise answer.
0
deeptinayakAuthor Commented:
I have used haversine formula to calculate the distance
http://academic.brooklyn.cuny.edu/geology/leveson/core/linksa/lat_long.html
hec",)