Compass heading from cartesian vectors?

In summary, to calculate the compass heading from cartesian vectors, you can use the projection of the velocity vector on the position vector to determine the upward component of the velocity. Then, you can find a vector pointing due east and compute the angle between this vector and the horizontal velocity to get the angle away from due east. The sign of the y component of the velocity can indicate if the direction is in the northern half of the compass. Using the vector product, you can find the direction east and determine the full 360 degree angle.
  • #1
Artlav
162
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
  • #2
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.
 
  • #3
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.
 

Related to Compass heading from cartesian vectors?

What is a compass heading?

A compass heading is the direction in which an object or person is facing, as determined by a compass. It is typically described in terms of degrees, with 0 degrees representing north, 90 degrees representing east, 180 degrees representing south, and 270 degrees representing west.

What are cartesian vectors?

Cartesian vectors are mathematical quantities that have both magnitude (size) and direction, and are represented by a set of coordinates on a Cartesian plane. They are commonly used in physics and engineering to describe the movements and forces of objects in a three-dimensional space.

How do you calculate the compass heading from cartesian vectors?

To calculate the compass heading from cartesian vectors, you first need to determine the x and y components of the vector. Then, you can use the inverse tangent function (arctan) to find the angle between the vector and the x-axis. This angle represents the compass heading, with 0 degrees being north and 90 degrees being east.

What is the difference between true heading and magnetic heading?

True heading is the direction in which an object or person is facing relative to true north, while magnetic heading is the direction relative to magnetic north. Magnetic north is the direction that a compass needle points towards due to the Earth's magnetic field, which can vary depending on location and time. True north, on the other hand, is fixed and determined by the Earth's geographic axis.

Can compass heading be affected by external factors?

Yes, compass heading can be affected by external factors such as magnetic fields, metallic objects, and electrical devices. These external factors can cause the compass needle to deviate from true north, resulting in an inaccurate compass heading. It is important to take these factors into account when using a compass for navigation.

Similar threads

Replies
2
Views
1K
  • Introductory Physics Homework Help
Replies
30
Views
615
Replies
1
Views
2K
  • General Math
Replies
11
Views
2K
  • General Math
Replies
7
Views
1K
Replies
30
Views
5K
  • General Math
Replies
8
Views
331
  • Astronomy and Astrophysics
Replies
3
Views
2K
  • Quantum Physics
Replies
2
Views
981
Back
Top