From Geographical coordinates to Cartesian coordinates

Click For Summary

Discussion Overview

The discussion revolves around converting geographical coordinates (latitude and longitude) to Cartesian coordinates to calculate the angle with respect to the north pole. Participants explore various methods and considerations for this conversion, particularly in the context of calculating direction based on two nearby points.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant suggests using a simple Cartesian representation where x=longitude and y=latitude, followed by applying the arctan function to find the angle from the equator and adjusting for the north pole.
  • Another participant argues that while local Cartesian coordinates can be used, it may be unnecessary and suggests drawing a diagram instead.
  • A later reply clarifies the intent to calculate the direction of a moving car using the angle from the north pole, seeking validation of the proposed method.
  • One participant indicates that assuming Cartesian coordinates locally is reasonable, implying that a bearing is expected.
  • Another participant recommends using the arctan function for the difference in coordinates, emphasizing the need to calculate the north/east distance between the two points.
  • It is noted that the proposed method may only work near the equator and that the equirectangular projection does not preserve bearing, suggesting the use of a Mercator projection instead.
  • Two participants present a cosine formula involving the radius of the Earth, indicating that latitude in radians is needed for calculations, and state that longitude is not necessary for determining the angle.
  • One participant questions the application of the cosine formula and the necessity of longitude in calculations, while another argues for the intuitive nature of transforming to Cartesian coordinates using a Mercator transformation.

Areas of Agreement / Disagreement

Participants express differing views on the appropriateness of using Cartesian coordinates for this problem, with some advocating for its use and others suggesting alternative methods. There is no consensus on the best approach or the necessity of longitude in the calculations.

Contextual Notes

Participants highlight limitations related to the accuracy of different coordinate transformations and the conditions under which certain methods may be valid, particularly regarding proximity to the equator and the preservation of bearings.

Aleoa
Messages
128
Reaction score
5
I have 2 points expressed in (latitude,longitude) and I want to calculate the angle with respect to the north pole.

Since the two points are very near (like hundred of meters), is it possible to consider the two points in the carthesian system simply as:

x=longitude
y=latitude

Then applying \arctan(y/x), I get the angle from the equator and so, summing this angle to (-90°) i get the bearing (angle from north pole).

Is this correct?
 
Mathematics news on Phys.org
Locally, it is possible to express coordinates on the surface of a sphere with Cartesian coordinates and work with those, but it seems unnecessary. There is an easier solution. Perhaps try drawing a diagram. Also, the angles in a triangle on the surface of a sphere don't add up to 180°...
 
Matternot said:
Locally, it is possible to express coordinates on the surface of a sphere with Cartesian coordinates and work with those, but it seems unnecessary. There is an easier solution. Perhaps try drawing a diagram. Also, the angles in a triangle on the surface of a sphere don't add up to 180°...

I wasn't clear in the main post. I simply need to calculate the direction of a moving car given two points in the map and i want to express this direction using the angle from the north pole.
Is the solution i proposed correct ?
 
In this case, it seems clear that they expect you to assume that locally, coordinates are Cartesian and hence, a bearing is probably what they expect. i.e. North is y axis, East is x axis.
 
Use the arctan, but use it for the difference of the coordinates: The length north/east from one point to the other. This is not directly the difference in coordinates but it is quick to calculate from them.
 
This is only going to work near the equator. Transforming latitude to the y-axis in this way is called the “equirectangular projection” and does not preserve bearing. You need to use a Mercator projection.
 
## Cosθ = \frac { Cos(a/R) - Cos(b/R).Cos(c/R)} { Sin(b/R).Sin(c/R)} ##

R is the radius of the Earth. You find b and c directly from Latitude expressed in Radians, viz. b = (π/2-Latitude)R etc.

Since the points are very close together you said, you expect the line joining them to be a geodesic, so take a by direct measurement. The angle θ is what you need.

Longitude is not needed in the calculations.
 
Last edited:
Rada Demorn said:
## Cosθ = \frac { Cos(a/R) - Cos(b/R).Cos(c/R)} { Sin(b/R).Sin(c/R)} ##

R is the radius of the Earth. You find b and c directly from Latitude expressed in Radians, viz. b = (π/2-Latitude)R etc.

Since the points are very close together you said, you expect the line joining them to be a geodesic, so take a by direct measurement. The angle θ is what you need.

Longitude is not needed in the calculations.

Hi, in which way the cosine formula you writed has to be used ?
 
Rada Demorn said:
take a by direct measurement.
Of what?
Rada Demorn said:
Longitude is not needed in the calculations.
It is needed to calculate a, if using your formula. Personally I think transforming to Cartesian coordinates is more intuitive, you just need to use the Mercator transformation to get the right y coordinate. Google will help here.
 

Similar threads

  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
1
Views
2K
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K