**reversed**. What a headache for something so simple.

Here's the algorithm for calculating the latitude, phi2, and longitude, lambda2, of a point distance, d (in meters), away from a point with latitude, phi1, longitude, lambda1, and angle, theta (from vertical, parallel to longitude lines).

d_rad = d/6378137 (6378137 m is radius of Earth at the equator)

phi2 (in radians) = asin(sin(phi1)*cos(d_rad) + cos(phi1)*sin(d_rad)*cos(theta))

dlon = atan2(sin(theta)*sin(d_rad)*cos(phi1), cos(d_rad) - sin(phi1)*sin(phi2))

lambda2 (in radians) = Modulus(lambda1+dlon+PI, 2PI) - PI

Remember to change everything back into degrees for GE.

## No comments:

Post a Comment