Convert Longitude/Latitude dependent upon the location on the Earth

  • Thread starter Thread starter Tone L
  • Start date Start date
  • Tags Tags
    Convert Earth
Click For Summary

Discussion Overview

The discussion revolves around the conversion of longitude and latitude into a usable unit (such as kilometers) for plotting satellite observations in grid boxes on Earth. The focus includes the implications of the Earth's shape on these conversions, particularly at different latitudes.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants suggest that the north-south distances are consistent, while the east-west distances vary with latitude, proposing a linear relationship for conversions.
  • Others argue that the distance between longitudinal lines is proportional to the cosine of the latitude, indicating that simple approximations may lead to significant errors.
  • One participant mentions that each degree of latitude is approximately 69 miles (111 kilometers) apart, but this distance varies due to the Earth's ellipsoidal shape.
  • There is a discussion about the accuracy required for different applications, with some suggesting that simple conversions may suffice for general purposes, while others emphasize the need for more precise calculations in surveying contexts.
  • A participant provides a code snippet for converting latitude, longitude, and height into Cartesian coordinates, suggesting a method to map these to grid boxes.

Areas of Agreement / Disagreement

Participants express differing views on the relationship between longitude, latitude, and distance, particularly regarding the impact of the Earth's shape. There is no consensus on the best approach for conversion, and multiple competing views remain.

Contextual Notes

Participants note that the Earth's shape complicates geodesic calculations, and various approximations may lead to different results. The discussion highlights the importance of considering these factors when determining distances based on latitude and longitude.

Tone L
Messages
72
Reaction score
7
I am planning to plot all the observations made by a satellite in two respective grid boxes. One grid located at the equator and one grid located at the mid latitudes...

Each grid box will be a 10° x 10° box. However, due to the shape of the Earth the area of each box will indeed not be the same size. Is there some formula to convert latitudinal and longitundal degrees dependent on location of earth? To some useful unit (km).

Thanks!
 
Earth sciences news on Phys.org
The north-south distances will be one to one everywhere. A simple conversion of the east-west distances will be proportional to the latitude.

For example, at the equator, 10 degrees in the east-west direction is 25,000 miles / 36 = 694 miles. This distance is essentially zero at the pole, so that it's a linear relationship as you move north and south. Therefore at 80 degrees north, 10 degrees of longitude would be a ninth of 694 or about 77 miles.

Note that these are simple approximations and do not take into account things like datums, etc.
 
Borg said:
A simple conversion of the east-west distances will be proportional to the latitude.
Hi Borg:

I am pretty certain that the longitude linear distance for 10 degrees is the same as the 10 degree distance at the equator times the cosine of the latitude. This is based on a spherical Earth. Some small and a bit complicated corrections would be needed for the Earth's approximately ellipsoidal shape. Smaller and even more complicated corrections are required if you want to take the actual shape of the Earth into consideration.

The longitudinal distance at the poles is zero. That is the grid "boxes" between 80 degrees and 90 degrees will be triangles.Regards,
Buzz
 
@Buzz Bloom I think that we're saying generally the same thing. The distance between two latitudes along a longitudinal line is the same for every degree of distance. It's the distance between two longitudinal lines that changes depending on the latitude.
 
Hmm. @Borg I do not see it quite your way.

As you know - The Earth is not a perfect sphere. So, Geodesy has a little complexity.
Each degree of latitude is approximately 69 miles (111 kilometers) apart. The range varies (due to the Earth's slightly ellipsoid shape) from 68.703 miles (110.567 km) at the equator to 69.407 (111.699 km) at the poles. This is convenient because each minute (1/60th of a degree) is approximately one [nautical] mile.

Parallel distances across longitude A to longitude B is more interesting.
@Anthony LaRosa
What exactly do you need? How much accuracy? The usual choice is probably a great circle distance between two points given a lat long for each one.
See Vincenty formula for special case of ellipsoids:
https://en.wikipedia.org/wiki/Vincenty's_formulae

You can often use haversines because if the N/S differences are small a spherical approximation is probably okay:
https://en.wikipedia.org/wiki/Haversine_formula

It gets more interesting if you are doing some kind of surveying, where accuracy needs to greater than locating the nearest McDonalds restuarant.

You get to decide.
 
  • Like
Likes   Reactions: Tone L
jim mcnamara said:
Hmm. @Borg I do not see it quite your way.
Each degree of latitude is approximately 69 miles (111 kilometers) apart. The range varies (due to the Earth's slightly ellipsoid shape) from 68.703 miles (110.567 km) at the equator to 69.407 (111.699 km) at the poles. This is convenient because each minute (1/60th of a degree) is approximately one [nautical] mile.
As you know - The Earth is not a perfect sphere. So, Geodesy has a little complexity.
I must be wording things in a way that is confusing. Yes, I agree that the distance between each degree of latitude is mostly the same (ignoring the spheroid issue). Stated your way, I've been trying to say that the distance between each degree of longitude varies proportionally to the latitude.
 
  • Like
Likes   Reactions: Tone L
jim mcnamara said:
It gets more interesting if you are doing some kind of surveying, where accuracy needs to greater than locating the nearest McDonalds restuarant.
This is the real question. Most of this depends on how accurate the OP wants to be. A simple conversion gets your nuke on the right block. Taking the rest into account let's you pick whose window you want to put it through. :oldtongue:
 
Borg said:
The north-south distances will be one to one everywhere. A simple conversion of the east-west distances will be proportional to the latitude.

For example, at the equator, 10 degrees in the east-west direction is 25,000 miles / 36 = 694 miles. This distance is essentially zero at the pole, so that it's a linear relationship as you move north and south. Therefore at 80 degrees north, 10 degrees of longitude would be a ninth of 694 or about 77 miles.

Note that these are simple approximations and do not take into account things like datums, etc.

Borg said:
I must be wording things in a way that is confusing. Yes, I agree that the distance between each degree of latitude is mostly the same (ignoring the spheroid issue). Stated your way, I've been trying to say that the distance between each degree of longitude varies proportionally to the latitude.

@Borg. You keep saying that it is proportional to the latitude. This is not true. As BuzzBloom said, the distance between two longitude lines depends on the cosine of the latitude. So, while 10 degrees of longitude is 694 miles at the equator, at 80 degrees latitude it is 694 * cos(80) = 120 miles, not the 77 miles you quoted. At 10 degrees latitude, your linear approximation would say 10 degrees of longitude is 694 * 8/9 = 617 miles, while the correct answer is at 10 degrees latitude, 10 degrees of longitude = 694 * cos(10) = 683 miles. These differences are large, and will not get you "on the right block".
 
  • Like
Likes   Reactions: Tone L, jim mcnamara and Borg
phyzguy said:
@Borg. You keep saying that it is proportional to the latitude. This is not true. As BuzzBloom said, the distance between two longitude lines depends on the cosine of the latitude. So, while 10 degrees of longitude is 694 miles at the equator, at 80 degrees latitude it is 694 * cos(80) = 120 miles, not the 77 miles you quoted. At 10 degrees latitude, your linear approximation would say 10 degrees of longitude is 694 * 8/9 = 617 miles, while the correct answer is at 10 degrees latitude, 10 degrees of longitude = 694 * cos(10) = 683 miles. These differences are large, and will not get you "on the right block".
Thanks for clarifying my mistake. It has been a long time since I've had to do those calculations.
 
  • #10
Ugh. What was I thinking yesterday? :oldruck:
 
  • #11
Find out about WGS84 here; https://en.wikipedia.org/wiki/World_Geodetic_System#WGS84
This code converts latitude, longitude and height to x, y, z coordinates in metres.
You can then map that to your grid box.
Code:
Sub wgs84(_
Byval latit As Double,_
Byval lng As Double,_
Byval h As Double,_
Byref x As Double,_
Byref y As Double,_
Byref z As Double )

Const a As Double = 6378137 ' Defined semi-major axis, metres
Const ba As Double = .9933056200098587 ' square of b to a ratio bb/aa
Const ee As Double = 6.694379990141316D-03 'square of first eccentricity f(2-f)

Dim As Double sinlat = Sin(latit)
Dim As Double RofC = a / Sqr(1 - ee * sinlat * sinlat) ' radius of curvature
Dim As Double term = (RofC + h) * Cos(latit)

x = term * Cos(lng) ' x-axis is Atlantic Ocean positive
y = term * Sin(lng) ' y-axis is Indian Ocean positive
z = (h + (RofC * ba)) * sinlat ' z-axis is North Pole positive

End Sub
 

Similar threads

  • · Replies 13 ·
Replies
13
Views
4K
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 14 ·
Replies
14
Views
13K
Replies
35
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
17
Views
4K
  • · Replies 5 ·
Replies
5
Views
9K