Compass heading from cartesian vectors?

Click For Summary
SUMMARY

This discussion focuses on calculating the compass heading from Cartesian vectors for an airplane flying over a spherical planet. The method involves projecting the velocity vector onto the position vector to isolate the horizontal velocity component. By determining a vector that points due east and computing the angle between this vector and the horizontal velocity, one can ascertain the compass heading. The process also includes using the vector product to establish the eastward direction, ultimately yielding a full 360-degree heading.

PREREQUISITES
  • Understanding of Cartesian coordinates and vector mathematics
  • Familiarity with vector projection techniques
  • Knowledge of spherical geometry, particularly relating to planetary models
  • Basic trigonometry for angle calculations
NEXT STEPS
  • Study vector projection methods in detail, particularly in three-dimensional space
  • Learn about spherical coordinate systems and their applications in navigation
  • Explore the concept of vector cross products and their use in determining orthogonal directions
  • Research algorithms for calculating compass headings in aviation and robotics
USEFUL FOR

Aerospace engineers, mathematicians, computer scientists, and anyone involved in navigation systems or simulations requiring accurate heading calculations.

Artlav
Messages
161
Reaction score
1
Hello,

How can i calculate compass heading from cartesian vectors?

Specifically, a planet of radius R is located at (0,0,0), with north pole being at (0,R,0). An airplane is located at POS, and is flying in DIR direction.
How can i determine the (true north) compass heading of the plane?
DIR might not be parallel to the surface of the planet.
 
Mathematics news on Phys.org
you know how to project one vector on another?

The projection of v onto u, where u and v are both vectors in the same dimension euclidean vector space is:

[tex]\frac {u \cdot v}{ {|u|}^2}} u[/tex]


You can use this to project the velocity vector (vx, vy, vz) on the position vector (x,y,z)

(x,y,z) points straight up (away from the center of the planet), so the projection of the velocity
vector on this vector gives the upward component of the velocity. Subtract this from the velocity
vector to get the horizontal velocity (along the surface). [itex]v_{hor}[/itex]

what you then need to do is find a vector that points due east from the point (x, y, z)

you can then compute the angle between this vector and [itex]v_{hor}[/itex] to get the angle away from due east, and use the sign of vy to see if the direction is in the northern half of the compass.
 
So, projecting direction vector on the position vector, then subtracting it from the direction vector effectively projects the direction onto the local surface plane. Do the same thing with a vector pointing to the north pole, and you get the north-south part of the heading. Then, vector product of these two will give the direction east, allowing to find the full 360* angle.

Interesting. Thank you for the idea, it works.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 30 ·
2
Replies
30
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
8K
  • · Replies 47 ·
2
Replies
47
Views
7K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 14 ·
Replies
14
Views
3K