By clicking “Post Your Answer”, you agree to our To subscribe to this RSS feed, copy and paste this URL into your RSS reader. Detailed answers to any questions you might have meters from where? However, you will need to get the appropriate The earth is an annoyingly irregular surface, so there is no simple formula to do this exactly. site design / logo © 2020 Stack Exchange Inc; user contributions licensed under Also remark that 1° of longitude is almost always a different distance than 1° of latitude. Learn more about hiring developers or posting ads with us

Where developers & technologists share private knowledge with coworkersProgramming & related technical career opportunitiesWhat do you mean by converting a lat/long to meters? Discuss the workings and policies of this site Though I can't figure out if the distance is in meters or some other measurement. Sort of like a reverse Haversine. It sounds like you're using Java, so I would recommend looking into something like UTM is nice, because it's meters, so easy to work with.
@Thomas Yes, that's right. I checked against a UTM calculation using equal x- and y-displacements of 1400 m (so the total displacement is 2 km).

Length in meters of 1° of longitude = 40075 km * cos ( latitude ) / 360. share.

For pole the formula gives 40075 * cos(90°) / 360 = 0 km.I think this approach is simple especially as the question didn't ask for the exact distance between two points, but rather if they are "reasonably close enough".With these formulas we easily check if the user is within a square centered on the waypoint.



The longitude lines come together at the poles, where 360 degrees = 0 metres.

Lengths for both are calculated in nautical miles, statute miles, feet, and meters. If moving in the x direction +100m, would it be 100÷(111,111×(cos 10))?

Are you looking for a way to compute the distance along the surface of the earth from one coordinate to another?Define "waypoint".
with a latitude of 90 degrees you'd expect it to show near 111km; but instead it shows 0; similarly, values close to it are also near 0.Latitude is 0° at the equator and 90° at the pole (and not the opposite). As for me, Elliptical Mercator seems very well. Read between the lines.No, the nautical mile is defined by international standard (No, that does not work! Y axis means longitude and X axis means latitude Edwin 2020-01-23 10:16:42 Can you help me to convert 29.17983*E and 23.56970* to Degrees, minutes and seconds(DMS). See However, doing this isn't necessarily difficult. Length in meters of 1° of latitude = always 111.32 km. It only takes a minute to sign up.I'm looking for an algorithm which when given a latitude and longitude pair and a vector translation in meters in Cartesian coordinates (x,y) would give me a new coordinate.

instead of the comma. Is this really what you want to know: "how do you calculate the distance between two points given their latitude and longitude?

Featured on Meta "I stumbled upon this question wanting to do SQL queries on latitude and longitude and found For those looking for a library to convert between wgs and utm: Would be really grateful if somebody could add in some explanatory comments on the above code.

Using offsets measured in a local projected coordinate system the rotational errors may grow quite large.That's an excellent point: we have implicitly assumed the x-displacement is at least close to The d distance parameter of the Aviation Formulary equations is in radians, e.g. Please let me know if any formula we can use for this. Note that it's more accurate than you suspect (the error is typically less than 5 m over 2000 m).I wondered if I should add a remark in my answer that this is an identical solution to yours except for the value of R, but left it out due to brevity. Anybody can ask a question Define "reasonable". It is usually expressed in degrees and minutes.

I follow the American convention (which I believe is the convention of international publications, too) of using a comma to separate long digit strings into groups of three and a decimal point "." The worst latitude (for this direction and amount of displacement) is 81 degrees: the approximation actually gets more accurate as you move north and its error stays below 10 meters until you get beyond 89.6 degrees!Incidentally, these magic numbers of 111,111 are easy to remember by knowing some history: the French originally So with the formula if I wanted to move +100m in the y direction from say 10.0 N, 10.0 E, would I just add 100 / 111111? The Overflow Blog Start here for a quick overview of the site @Thomas: Actually, you can be very close to the poles. Stack Overflow for Teams is a private, secure spot for you and