[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
• Status: Solved
• Priority: Medium
• Security: Public
• Views: 700
• Last Modified:

How to calculate the latitude from distance

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?

0
deeptinayak
Asked:
1 Solution

Commented:
This should get you started with your assignment...

http://academic.brooklyn.cuny.edu/geology/leveson/core/linksa/lat_long.html

hec",)
0

Commented:
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

Author 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

Commented:
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.

You need to have some more info.
0

Commented:
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

Author 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.
0

Commented:
Approcimating the earth as an ellipsoid http://kai.er.usgs.gov/ftp/PROJ.4/proj.html
0

Commented:
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).
0

Commented:
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

Author Commented:
I have used haversine formula to calculate the distance

distance(lat1, long1, lat2, long2) = DOUBLE_EARTH_RADIUS *  atan2(sqrt
((sin((lat2-lat1)/2))^2 + cos(lat1) * cos(lat2) * (sin((lon2-lon1)/2)) ^2), sqrt(1-a))
0

Featured Post

Tackle projects and never again get stuck behind a technical roadblock.