Calculating Great Circle Distance

  • Thread starter Rapier
  • Start date
  • Tags
    Circle
In summary, Homework Statement Find the distance from Atlanta to San Francisco if Atlanta is @ 33.75°N and 84.40°W and San Francisco is @ 37.78°N and 122.42°W. Explain your strategy.The distance from Atlanta to San Francisco is 8,480 miles if Atlanta is at 33.75 degrees north and 84.40 degrees west and San Francisco is at 37.78 degrees north and 122.42 degrees west.
  • #1
Rapier
87
0

Homework Statement


Find the distance from Atlanta to San Francisco if Atlanta is @ 33.75°N and 84.40°W and San Francisco is @ 37.78°N and 122.42°W. Explain your strategy.


Homework Equations


cos phi = z/rho
cos theta = x/r
r = rho*sin phi

The Attempt at a Solution


I believe that latitudes are my thetas and the longitudes are my phis. I've tried to come up with equations that allow me to solve for a single variable but I keep having too many unknowns.

Someone suggested use the difference in theta (and phi) in my equations but even then I am still stuck on how to convert these angle measures into spherical coords.

I am looking for a way to get started, and any help would be greatly appreciated.
 
Physics news on Phys.org
  • #2
Rapier said:

Homework Statement


Find the distance from Atlanta to San Francisco if Atlanta is @ 33.75°N and 84.40°W and San Francisco is @ 37.78°N and 122.42°W. Explain your strategy.


Homework Equations


cos phi = z/rho
cos theta = x/r
r = rho*sin phi

The Attempt at a Solution


I believe that latitudes are my thetas and the longitudes are my phis. I've tried to come up with equations that allow me to solve for a single variable but I keep having too many unknowns.

Someone suggested use the difference in theta (and phi) in my equations but even then I am still stuck on how to convert these angle measures into spherical coords.

I am looking for a way to get started, and any help would be greatly appreciated.

Hi Rapier! :smile:

I recommend converting your coordinates to cartesian vectors.
Then you can calculate the angle between them using the dot product.
Since you know you're interested in a great circle, the distance is the arclength of the circle segment between the 2 vectors.
 
  • #3
Hi Rapier! :smile:

Alternatively, if you know your spherical trigonometry,

apply it to the obvious spherical triangle :wink:
 
  • #4
I like Serena said:
Hi Rapier! :smile:

I recommend converting your coordinates to cartesian vectors.
Then you can calculate the angle between them using the dot product.
Since you know you're interested in a great circle, the distance is the arclength of the circle segment between the 2 vectors.

That is the problem I am having. I am trying to convert the two angle measures to cartesian coords, but I'm running into problems. As much as I massage my equations from my triangles to try and convert the coords, I end up with an extra term I can't solve for (eg three unknowns and two equations). I have a hunch that I should be possibly leaving one of the values as a ratio (eg r/z) but I keep ending up in circles, where I start with cos θ = x/r and after three or four substitutions I have cos θ = x/r.
 
  • #5
Rapier said:
That is the problem I am having. I am trying to convert the two angle measures to cartesian coords, but I'm running into problems. As much as I massage my equations from my triangles to try and convert the coords, I end up with an extra term I can't solve for (eg three unknowns and two equations). I have a hunch that I should be possibly leaving one of the values as a ratio (eg r/z) but I keep ending up in circles, where I start with cos θ = x/r and after three or four substitutions I have cos θ = x/r.

If I understand correctly, you don't know how to convert spherical coordinates (r,ϕ,θ) to cartesian coordinates (x,y,z)?
Well, you are using an extra "r" and you are missing an "y", so that might muddy your set of equations...

The conversion from spherical to cartesian is:
x = ρ sin ϕ cos θ
y = ρ sin ϕ sin θ
z = ρ cos ϕ
where ρ is the Earth radius, ϕ is the colatitude (90° - latitude), and θ is the longitude.
 
  • #6
I like Serena said:
If I understand correctly, you don't know how to convert spherical coordinates (r,ϕ,θ) to cartesian coordinates (x,y,z)?
Well, you are using an extra "r" and you are missing an "y", so that might muddy your set of equations...

The conversion from spherical to cartesian is:
x = ρ sin ϕ cos θ
y = ρ sin ϕ sin θ
z = ρ cos ϕ
where ρ is the Earth radius, ϕ is the colatitude (90° - latitude), and θ is the longitude.

AH HAH! I got so wrapped up in the math that I forgot that this was an actual problem and not an exercise. The term I was missing was the radius of the Earth (ρ). That made all the difference.

Using these definitions (I'm using N and E as positive directions):
SF: θ=33.75°, ϕ=-84.4°
AT: θ=37.78°, ϕ=-122.42°

So now I've converted my terms:
SF = 6.3781e6m <-.8275, -.5529, .0976>
AT = 6.3781e6m <-.6672, -.5171, -.5361>

Looking at my terms, they look real good. I would expect that my vectors from the center of the Earth to any point on the surface would be the radius and if I find the magnitude of my vectors they are 1 (well, out to 4 decimal places, so close enough).

Using a sketch, I've determined that D = SF - AT (image attached)
I found my straight line distance between the two points, which is .7875ρ.
The angle between the two vectors (A.S = ||A|| ||S|| cos θ) is 38.215° or .66698 radians.

The arc length is the angle of the arc * radius (technically θ/total degrees in circle * C) .

s = θ * 6.3791e3 km, I used radians (but to make double sure I also used degrees and got the same value)
But I come out with 4254.050 km. I found a Great Circular Calculator online that say the distance between the two cities is 3443.341 km.

I've made an error somewhere. You mentioned a colatitude and I don't know what that is. I am wondering if the angle measures I'm using are not the correct ones. Could you verify that my triangles are using the correct angle measures or help me to understand my error (image attached)?

OR considering the distances, is this an acceptable amount of error?
 

Attachments

  • mms_img50368.jpg
    mms_img50368.jpg
    10.8 KB · Views: 493
  • mms_img72130.jpg
    mms_img72130.jpg
    11.7 KB · Views: 508
Last edited:
  • #7
AH HAH! I got so wrapped up in the math that I forgot that this was an actual problem and not an exercise. The term I was missing was the radius of the Earth (ρ). That made all the difference.
:)


Your triangles are correct.

But you have San Francisco at 33.75°N.
This is a latitude, which is the angle relative to the equator.
However, the angle in spherical coordinates is the angle relative to the north pole.
This is called the colatitude.
To find the colatitude, you need to calculate 90° - latitude.

There is internationally some confusion about what should be called theta and what should be called phi in spherical coordinates.
However, in the formulas you've shown, phi corresponds to the colatitude, which is the angle with the north pole.
You've switched the angles around.

To find the distance, you should not calculate the length of the vector, but the arclength of the great circle segment, which is radius times angle.

Btw, what are you using for the Earth radius?
 
  • #8
STOP! Hold the presses!

Latitude is measured from the equator north, no? So, I can think of that measure being from the horizontal up. My ϕ measurements are from the vertical down. So I need to use the compliment (which a quick wiki search tells me is the COlatitude).

YES? Let me recalculate and I'll get back to you.
 
  • #9
Rapier said:
STOP! Hold the presses!

Latitude is measured from the equator north, no? So, I can think of that measure being from the horizontal up. My ϕ measurements are from the vertical down. So I need to use the compliment (which a quick wiki search tells me is the COlatitude).

YES? Let me recalculate and I'll get back to you.

Yes.
 
  • #10
I like Serena said:
But you have San Francisco at 33.75°N.
This is a latitude, which is the angle relative to the equator.
However, the angle in spherical coordinates is the angle relative to the north pole.
This is called the colatitude.
To find the colatitude, you need to calculate 90° - latitude.

To find the distance, you should not calculate the length of the vector, but the arclength of the great circle segment, which is radius times angle.

Btw, what are you using for the Earth radius?

Re = ρ = 6.3781e3 km

Using these definitions (I'm using N and E as positive directions):
SF: θ=56.25°, ϕ=-84.4°
AT: θ=52.22°, ϕ=-122.42°

So now I've converted my terms to cartesian coords:
SF = 6.3781e3 km <-.5529, -.8275, .0976>
AT = 6.3781e3 km <-.5171, -.6672, -.5361>

SF.AT = ||SF|| ||AT|| cos θ
(.2859+.5521-.0523) = (1)(1) cos θ
θ = 38.215° = .66697 radians

s = θ * ρ
s = .66697 radians * 6.3781e3 km
s = 4253.7547 km

I'm still running at 23% error.
 
  • #11
Apparently you've still switched θ and ϕ around.

You can see that your numbers are wrong, since AT has a negative z coordinate, while it's above the equator.
 
  • #12
I like Serena said:
Apparently you've still switched θ and ϕ around.

You can see that your numbers are wrong, since AT has a negative z coordinate, while it's above the equator.

Oh geez louise! I was using (ρ,ϕ,θ) instead of (ρ,θ,ϕ). θ is my longitude (eg prime meridian) and ϕ is my lattitude (eg equator). I had my triangles swapped the whole time. It's always the little things isn't it?
 
  • #13
Rapier said:
Oh geez louise! I was using (ρ,ϕ,θ) instead of (ρ,θ,ϕ). θ is my longitude (eg prime meridian) and ϕ is my lattitude (eg equator). I had my triangles swapped the whole time. It's always the little things isn't it?
;)

Do you have the right answer now?
 
  • #14
I like Serena said:
;)

Do you have the right answer now?

Yes, I got 3435.488 km which is .22% error. That's pretty good! Thanks for all the help!
 
  • #15
Rapier, do you know the spherical trig formulas?

If not, don't worry; but if you do, then applying them to the appropriate triangle would get you the result rather more easily. :smile:
 
  • #16
tiny-tim said:
Rapier, do you know the spherical trig formulas?

If not, don't worry; but if you do, then applying them to the appropriate triangle would get you the result rather more easily. :smile:

No, I don't. I just looked it up on wikipedia and none of that looks familiar. I took Geometry and Trig in the 1980s and I'm finding that they have really filled in the curriculum in the past 20 years. It's not unusual for me to run into a topic and find that it's something that I never had a chance to learn. Sigh.
 

FAQ: Calculating Great Circle Distance

1. How do you calculate the great circle distance?

The great circle distance can be calculated using the Haversine formula, which takes into account the radius of the Earth and the latitude and longitude of two points. The formula is:
d = 2r * arcsin(√(sin²((φ₂-φ₁)/2) + cos(φ₁) * cos(φ₂) * sin²((λ₂-λ₁)/2)))
where d is the distance, r is the radius of the Earth, φ₁ and φ₂ are the latitudes of the two points, and λ₁ and λ₂ are the longitudes of the two points.

2. What is the significance of calculating great circle distance?

The great circle distance is significant because it is the shortest distance between two points on the surface of a sphere, such as the Earth. This is important for navigation, flight planning, and determining the most efficient routes for transportation.

3. What units are typically used to measure great circle distance?

The great circle distance is typically measured in nautical miles, which is the standard unit of measurement for air and marine navigation. It can also be measured in kilometers or miles for other purposes.

4. Can the Haversine formula be used for any two points on Earth?

Yes, the Haversine formula can be used to calculate the great circle distance between any two points on Earth, as long as the latitude and longitude of the points are known.

5. Are there any limitations to using the Haversine formula for calculating great circle distance?

While the Haversine formula is an accurate method for calculating great circle distance, it does not take into account factors such as changes in elevation or variations in the Earth's shape. For more precise calculations, other methods such as the Vincenty formula may be used.

Similar threads

Back
Top