Calculating Coordinates of Spherical Triangles

In summary: The cross product is the mathematical operation that combines the two vectors. It is a vector that has the magnitude of the product of the two vectors and the direction of the vector that is perpendicular to the first vector and passes through the origin.In summary, when you are calculating coordinates on a globe, you can use 360 great circles to calculate the distance between two points. The first semi-circle is 180 degrees, and the second semi-circle is also 180 degrees. The formula to calculate the coordinates is (x, y, z) = (r, θ, φ).
  • #1
Kel1980
5
0
Hello,

I'm not a student, I'm just trying to figure out how to calculate coordinates on a globe, and I would like to ask for some help.

Let's say I have POINT A on the globe with the following coordinates:
POINT A
Latitude 45° 27' 50.95" N
Longitude 9° 11' 23.98" E

Also I have POINT B which is the Antipode:
POINT B
Latitude 45° 27' 50.95" S
Longitude 170° 48' 36.02" W

Given we are on a sphere (globe), from Point A to Point B for example I can draw 360 great circles, one for each single degree of the sphere:
- and the distance to go from Point A to Point B is 180° (first semi-circle)
- and the distance to go back from Point B to Point A is also 180° (second semi-circle)
Now let's say I have POINT C with the following coordinates:
POINT C
Latitude 45° 26' 48.53" N
Longitude 9° 1' 58.11" E
Given these information, THERE IS ONLY ONE GREAT CIRCLE which:
START IN POINT A
GOES THROUGH POINT C
ARRIVE IN POINT B (completing the first semi-circle of 180°)
COME BACK IN POINT A (completing the second semi-circle of 180°)
My problem is to find the formula to calculate the coordinates of the 2 Points which are half-way (90°) from Point A to Point B.
Let's call these 2 Points as M and N:

START in POINT A
GOES THROUGH POINT C
PASS THROUGH POINT M (at 90°)
ARRIVE IN POINT B (completing the first semi-circle of 180°)
PASS TO POINT N (at 270°)
COME BACK IN POINT A (completing the second semi-circle of 180°)

Which is the formula to calculate M and N?

On a - plain surface - i would have used the simple proportion of triangles to calculate them, but given is a sphere I don't know the formula to be applied.

I did some online search but I find a kind of difficult to figure it out.
I have been out of school from 15 years now, so I would like to ask if somebody can help me.

I hope my explanation is clear, thanks a lot if you can help!

Cheers
 
Last edited:
Mathematics news on Phys.org
  • #2
Hi kel1980! Welcome to MHB! (Smile)

I'm on my phone right now, so I'll keep it short.
We can calculate the cartesian coordinates from the spherical coordinates.
Let a be the vector from the center of the Earth to point A.
And let c be the vector to C.
Then we can find M and N with the cross product.
That is (a x c) x a.
Convert back to spherical coordinates and we're done. That is, we have M, and N is its opposite.
 
  • #3
I like Serena said:
Hi kel1980! Welcome to MHB! (Smile)

I'm on my phone right now, so I'll keep it short.
We can calculate the cartesian coordinates from the spherical coordinates.
Let a be the vector from the center of the Earth to point A.
And let c be the vector to C.
Then we can find M and N with the cross product.
That is (a x c) x a.
Convert back to spherical coordinates and we're done. That is, we have M, and N is its opposite.
Hello Serena!

Thank you soo much for your very fast answer!

I'm trying to do something according to your directions, but I'm not sure I understood them correctly (probably not).
Also still I'm stucked with the formula.

SPHERICAL COORDINATES - I found this on internet: (r, θ, φ) where:
r = Earth radius
θ = altitude
φ = longitude
SO FIRST
I converted my coordinates FROM degress/minutes/seconds TO decimal degrees.
(I used this website https://www.latlong.net/degrees-minutes-seconds-to-decimal-degrees)

POINT A
Latitude 45° 27' 50.95" N -------> Decimal Degrees Latitude 45.46415278
Longitude 9° 11' 23.98" E -------> Decimal Degrees Longitude 9.19000000

POINT B
Latitude 45° 27' 50.95" S -------> Decimal Degrees Latitude -45.46415278
Longitude 170° 48' 36.02" W -------> Decimal Degrees Longitude 170.81000000

POINT C
Latitude 45° 26' 48.53" N -------> Decimal Degrees Latitude 45.44681389
Longitude 9° 1' 58.11" E -------> Decimal Degrees Longitude 9.03277778The conversion allowed me to have the SPHERICAL COORDINATES (r, θ, φ):
POINT A (6,371, 45.46415278, 9.19000000)
POINT B (6,371, -45.46415278, 170.81000000)
POINT C (6,371, 45.44681389, 9.03277778)
SO SECOND I converted the SPHERICAL COORDINATES into CARTESIAN COORDINATES (X, Y, Z)
(using this website: Spherical to Cartesian Coordinates Calculator)

POINT A (4,483.03, 725.29, 4,468.34)
POINT B (4,483.03, -725.29, 4,468.34)
POINT C (4,483.67, 712.77, 4,469.71)
SO THIRD, even if my guess about the coordinate conversion is correct (which I believe not), than how can I calculate the vector??

Thanks a lot if you can help me,

Cheers
 
Last edited:
  • #4
Sure!
I didn't check your results, but they do look correct.
The next step is to calculate the so called 'cross product'. I think we can find online calculators for that as well.
 
  • #5
I like Serena said:
Sure!
I didn't check your results, but they do look correct.
The next step is to calculate the so called 'cross product'. I think we can find online calculators for that as well.
Thx again for your fast reply! (Smile)

When you wrote "cross product" in your first message I didn't really get the meaning of it (I'm not english), so I googled it again now and I found out it is the name of the operation / formula!
(Also I found a website to calculate it! Online calculator. Cross product of two vectors (vector product))So I did it:

I like Serena said:
Let a be the vector from the center of the Earth to point A.


POINT A

Latitude 45° 27' 50.95" N -------> Decimal Degrees Latitude 45.46415278
Longitude 9° 11' 23.98" E -------> Decimal Degrees Longitude 9.19000000

(r, θ, φ) (6,371, 45.46415278, 9.19000000) <--- the spherical coordinates

vector a = (4,483.03, 725.29, 4,468.34) <--- the cartesian coordinates
I like Serena said:
And let c be the vector to C.


POINT C

Latitude 45° 26' 48.53" N -------> Decimal Degrees Latitude 45.44681389
Longitude 9° 1' 58.11" E -------> Decimal Degrees Longitude 9.03277778

(r, θ, φ) (6,371, 45.44681389, 9.03277778) <--- the spherical coordinates

vector c = (4,483.67, 712.77, 4,469.71) <--- the cartesian coordinates
I like Serena said:
Then we can find M and N with the cross product.
That is (a x c) x a.
USING the website i calculated (a x c)

a = (4,483.03, 725.29, 4,468.34)
c = (4,483.67, 712.77, 4,469.71)

a x c = (56937.2641, -3282.0135, -56591.7212)
NOW that I have (a x c), using the website again I calculated (a x c) x a

(a x c) = (56937.2641, -3282.0135, -56591.7212)
c = (4,483.67, 712.77, 4,469.71)

(a x c) x a = (257.266558; -508117438.55983; 56009393.259994)
Which if is correct it means it is M:

M = (257.266558; -508117438.55983; 56009393.259994) <--- the cartesian coordinates
I like Serena said:
Convert back to spherical coordinates and we're done. That is, we have M, and N is its opposite.
USING the website I converted POINT M Cartesian Coordinates in Spherical Coordinates as follow:

POINT M

from Cartesian Coordinates (X, Y, Z) (257.266558, -508117438.55983, 56009393.259994)

to Spherical Coordinates (r, θ, φ) (511,195,054, 83.71, -90)
THEN using the website I converted the coordinates FROM decimal degrees TO degrees/minutes/seconds as follow:

POINT M
LATITUDE 83.71 ----> 83° 42' 36'' N
LONGITUDE -90 ----> 90° 0' 0'' W
----- CONCLUSION / ISSUE -----

POINT M looks just as a random point on the map.

As I said before I need to find POINT M which is Half-Way between POINT A and POINT B, and at the same time on the same Great Circle of POINT C.
----- POSSIBLE MISTAKES -----

1) The steps I used and described in this last post are wrong.

2) In order to calculate the "cross product" (a x c) x a I first calculated (a x c) and than I "cross product" the result with a as (a x c) x a. Is that correct?

3) Maybe I did some calculation errors in this post or in the previous posts.

4) I started with the following Spherical Coordinates:
POINT A (6,371, 45.46415278, 9.19000000)
POINT C (6,371, 45.44681389, 9.03277778)
where 6371 Km is Planet Earth Radius

After all the steps I end up with Spherical Coordinates:
POINT M (511,195,054, 83.71, -90)
Instead of Radius 6,371 I end up with Radius 511,195,054. Does this Radius make sense?

5) I need POINT A, POINT B, POINT C, and POINT M, to be all of them on the same Great Circle.
You told me to calculate Point M as:
"(a x c) x a"
I'm wondering, is this correct? Or is there something missing? Will the formula take in account that also "b" is on the same Great Circle?That's all.

Hope you can help!

Thx again!
 
Last edited:
  • #6
Kel1980 said:
I'm trying to do something according to your directions, but I'm not sure I understood them correctly (probably not).
Also still I'm stucked with the formula.

SPHERICAL COORDINATES - I found this on internet: (r, θ, φ) where:
r = Earth radius
θ = altitude
φ = longitude

I'm afraid that θ is the so called colatitude.
That is $θ = 90^\circ - \text{latitude}$.
Oh, and it is not altitude. That's something else again.

Kel1980 said:
The conversion allowed me to have the SPHERICAL COORDINATES (r, θ, φ):
POINT A (6,371, 45.46415278, 9.19000000)
POINT B (6,371, -45.46415278, 170.81000000)
POINT C (6,371, 45.44681389, 9.03277778)

SO SECOND I converted the SPHERICAL COORDINATES into CARTESIAN COORDINATES (X, Y, Z)
(using this website: Spherical to Cartesian Coordinates Calculator)

POINT A (4,483.03, 725.29, 4,468.34)
POINT B (4,483.03, -725.29, 4,468.34)
POINT C (4,483.67, 712.77, 4,469.71)

So this is not correct after all. On that website for spherical coordinates we need to fill in $θ = 90^\circ - \text{latitude}$.

Kel1980 said:
----- POSSIBLE MISTAKES -----

1) The steps I used and described in this last post are wrong.

They do look all right, although I didn't check them.

Kel1980 said:
2) In order to calculate the "cross product" (a x c) x a I first calculated (a x c) and than I "cross product" the result with a as (a x c) x a. Is that correct?

Yes.

Kel1980 said:
3) Maybe I did some calculation errors in this post or in the previous posts.

Yes, there is a mix-up between latitude and co-latitude.

Kel1980 said:
4) I started with the following Spherical Coordinates:
POINT A (6,371, 45.46415278, 9.19000000)
POINT C (6,371, 45.44681389, 9.03277778)
where 6371 Km is Planet Earth Radius

After all the steps I end up with Spherical Coordinates:
POINT M (511,195,054, 83.71, -90)
Instead of Radius 6,371 I end up with Radius 511,195,054. Does this Radius make sense?

Yes, this is expected, and it's not a problem.
It's because the cross product multiplies the length of the vectors.
And to be fair, we're not interested in the radius, just in the latitude and the longitude.
So we can completely ignore the radius of the earth, and just fill in $r=1$.

Kel1980 said:
5) I need POINT A, POINT B, POINT C, and POINT M, to be all of them on the same Great Circle.
You told me to calculate Point M as:
"(a x c) x a"
I'm wondering, is this correct? Or is there something missing? Will the formula take in account that also "b" is on the same Great Circle?

Yes.
Points A and C define the great circle uniquely.
And B is just opposite of A. Any great circle through A will therefore go through B anyway.
 
  • #7
Hello Serena,

today I have spent some more time trying to figure out the problem.

I found out I several mistakes both of concept and of calculus that I did yesterday.

Now will follow the revised version.

In this revised version I'm pretty confident that the Conversion from Spherical Coordinates to Cartesian Coordinates is accurate 100%.

To make sure that the Conversion is correct, I used 2 different Conversion Methods.
POINT A
LATITUDE 45° 27' 50.95" N
LONGITUDE 9° 11' 23.98" E
- FIRST METHOD -

I converted both Latitude and Longitude from DMS (Degrees Minutes Seconds) to Degree:
LATITUDE 45° 27' 50.95" N -----> 45.464
LONGITUDE 9° 11' 23.98" E -----> 9.190
(I used this website for the conversion: https://www.latlong.net/degrees-minutes-seconds-to-decimal-degrees)

Than in order to transform the (r, θ, φ) Spherical Coordinates, in (x,y,z) Cartesian Coordinates, I applied this formula:

View attachment 7669

where
r is Earth radius 6.371.008
θ is latitude
φ is longitude

PLEASE NOTE:
Latitude (θ) goes from 0° to 90°.
Point A latitude is 45.464 which it means it goes from 0° to 45.464°
In order to apply the formula I need the distance from 45.464° to 90° (see θ on the image above above)
So: θ = 90° minus 45.464° = 44.536° So I converted (r,θ,φ) (6.371.008, 44.536, 9.19), in (x,y,z), applying the formula using this website: Spherical to Cartesian Coordinates Calculator

The Cartesian Coordinates obtained are:

POINT A
X: 4,410,997.72
Y: 713,635.70
Z: 4,541,317.67


PLEASE NOTE:
For any Point that I convert from Spherical to Cartesian with this formula, i always use the same Radius (6.371.008).
This imply that the assumption of this first method is that Earth is a perfect sphere with Radius 6.371.008.

- SECOND METHOD -

The second method is faster.
As you can see from the image below I simply have to fill the DMS (Degrees/Minutes/Seconds) Cordinates, and the website calculate the Cartesian Coordinates.

View attachment 7668

PLEASE NOTE:
As you can see from the Image above, this website use the Ellipsoid WGS World Geodetic System (which is an International standard used also by Google Earth). The "Ellipsoid WGS" keep in consideration the ellipsoid shape of earth, so the result is more accurate.

Over and above of using an ellipsoid shape instead of the sphere, it is possible to adjust even more the Geodetic Height, according to ASL (Above Sea Level) or BSL, to have a much more accurate result. But in my calculation I left "h" empty as I don't need such level of accuracy.

This is the website link for the conversion: APSalin - Free Online Tools - Geodetic To Cartesian Convertor

The Cartesian Coordinates obtained are:

POINT A
X: 4,423,451.03
Y: 715,650.02
Z: 4,523,675.82

- CONCLUSION -

CARTESIAN COORDINATES (x, y, z) OF POINT A with 1st METHOD (4,423,451.03, 715,650.02, 4,523,675.82)
CARTESIAN COORDINATES (x, y, z) OF POINT A with 2nd METHOD (4,410,997.72, 713,635.70, 4,541,317.67)

As we can see there is a very small difference in the results of the 1st Method VS 2nd Method.

The difference is due to the fact that
- in the 1st Method we are assuming Earth is a perfect sphere with radius 6,371,008
while
- in the 2nd method the website calculator takes in account the fact tha Earth is an ellipsoid according to international standard WGS.

The difference is so small - around 0.3% - that is not relevant for my porpouse, but agreeing to the same results with 2 different methods, it means that the my conversion now are 100% correct.
So, as it is faster, I used the second method to calculate all of my Cartesian Coordinates (x,y,z):POINT A (4,410,997.72, 713,635.70, 4,541,317.67)

POINT B (-4,423,451.03, -715,650.02, -4,523,675.82)

POINT C (4,426,754.09, 703,727.61, 4,522,324.06)

Now that the Coordinates Conversion should have been sorted out, I can procede to try to calculate POINT M and POINT N.
I will do it in the next post!

Please let me know what you think. Thx a lot!

Cheers
 

Attachments

  • Geodetic.jpg
    Geodetic.jpg
    20.1 KB · Views: 82
  • Cartesian.jpg
    Cartesian.jpg
    10.4 KB · Views: 77
  • #8
Oh Serena, thanks a lot for this post!

I saw it just now. You posted it while I was writing my last post!

It took me a while to make it, and if I would have seen your post earlier, I would have finished earlier! ghghghg (Smile)
I like Serena said:
Kel1980 said:
I'm trying to do something according to your directions, but I'm not sure I understood them correctly (probably not).
Also still I'm stucked with the formula.

SPHERICAL COORDINATES - I found this on internet: (r, θ, φ) where:
r = Earth radius
θ = altitude
φ = longitude
I'm afraid that θ is the so called colatitude.
That is $θ = 90^\circ - \text{latitude}$.
Oh, and it is not altitude. That's something else again.

I like Serena said:
Kel1980 said:
The conversion allowed me to have the SPHERICAL COORDINATES (r, θ, φ):
POINT A (6,371, 45.46415278, 9.19000000)
POINT B (6,371, -45.46415278, 170.81000000)
POINT C (6,371, 45.44681389, 9.03277778)

SO SECOND I converted the SPHERICAL COORDINATES into CARTESIAN COORDINATES (X, Y, Z)
(using this website: Spherical to Cartesian Coordinates Calculator)

POINT A (4,483.03, 725.29, 4,468.34)
POINT B (4,483.03, -725.29, 4,468.34)
POINT C (4,483.67, 712.77, 4,469.71)

So this is not correct after all. On that website for spherical coordinates we need to fill in $θ = 90^\circ - \text{latitude}$.

I like Serena said:
Kel1980 said:
3) Maybe I did some calculation errors in this post or in the previous posts.
Yes, there is a mix-up between latitude and co-latitude.

yep! I corrected the formula according to the co-latitude. Now the Cartesian Coordinates in my last post should be all of them calculated correctly!

I like Serena said:
Kel1980 said:
2) In order to calculate the "cross product" (a x c) x a I first calculated (a x c) and than I "cross product" the result with a as (a x c) x a. Is that correct?
Yes.

Perfect. I'm going to calculate it, and I will make a new post as soon as I finish!

I like Serena said:
Kel1980 said:
4) I started with the following Spherical Coordinates:
POINT A (6,371, 45.46415278, 9.19000000)
POINT C (6,371, 45.44681389, 9.03277778)
where 6371 Km is Planet Earth Radius

After all the steps I end up with Spherical Coordinates:
POINT M (511,195,054, 83.71, -90)
Instead of Radius 6,371 I end up with Radius 511,195,054. Does this Radius make sense?
Yes, this is expected, and it's not a problem.
It's because the cross product multiplies the length of the vectors.
And to be fair, we're not interested in the radius, just in the latitude and the longitude.
So we can completely ignore the radius of the earth, and just fill in $r=1$.

I'm not sure I got this, btw, i will make some tests first, and i will ask in the next post if the case. Thx!

I like Serena said:
Kel1980 said:
5) I need POINT A, POINT B, POINT C, and POINT M, to be all of them on the same Great Circle.
You told me to calculate Point M as:
"(a x c) x a"
I'm wondering, is this correct? Or is there something missing? Will the formula take in account that also "b" is on the same Great Circle?

Yes.
Points A and C define the great circle uniquely.
And B is just opposite of A. Any great circle through A will therefore go through B anyway.

Yes, now is clear. If I have A and B antipodes, and I pick any point C of the globe, if I make a great circle though A and C, it will go now matter what also through B.

But still I find strange that the cross product beetwen A and C will give me a result which is 90° far away from A. Btw I will make the calculation again with the correct Cartesian Coordinates and I will make a new post later!Thx again!

Cheers
 
Last edited:

FAQ: Calculating Coordinates of Spherical Triangles

How do you calculate the coordinates of a spherical triangle?

To calculate the coordinates of a spherical triangle, you will need to know the length of each side of the triangle, as well as the angles formed by each side. You can then use the law of cosines and the law of sines to solve for the coordinates.

What is the formula for calculating the coordinates of a spherical triangle?

The formula for calculating the coordinates of a spherical triangle is given by the following equations:

cos(a) = cos(b)cos(c) + sin(b)sin(c)cos(A)

cos(b) = cos(a)cos(c) + sin(a)sin(c)cos(B)

cos(c) = cos(a)cos(b) + sin(a)sin(b)cos(C)

Where a, b, and c are the lengths of the sides of the triangle and A, B, and C are the angles opposite those sides.

What is the difference between a spherical triangle and a planar triangle?

A spherical triangle is a triangle drawn on the surface of a sphere, where the sides are arcs of great circles. In contrast, a planar triangle is a triangle drawn on a flat plane. The main difference between the two is that the angles of a spherical triangle are measured along the surface of the sphere, while the angles of a planar triangle are measured in a flat plane.

Can the coordinates of a spherical triangle be calculated using only the lengths of the sides?

No, to calculate the coordinates of a spherical triangle, the lengths of the sides alone are not enough. You will also need to know the angles formed by each side to solve for the coordinates.

What are some applications of calculating coordinates of spherical triangles?

Calculating coordinates of spherical triangles is useful in various fields such as astronomy, navigation, and geodesy. It can help determine the positions of celestial bodies, plan routes for ships and airplanes, and measure distances on the Earth's surface.

Similar threads

Back
Top