# Coordinates

## Coordinates

Many people have a hard time understanding **coordinate** systems and have an even harder time understanding headings and bearings. I'll start by explaining 3D coordinates:

The coordinates are stored as {x, y, z}. These three numbers combined form a set of coordinates which can indicate any point in space. Each letter stands for a distance from the origin (where all the axes touch {0, 0, 0}) along that axis. There are three axes (x, y, and z):

Now, an object with coordinates {-1, -2, 0} for instance, would be 1 unit away from the origin along the x-axis, 2 units away along the y-axis, and 0 units away on the z-axis. Here is abut what it would look like:

Notice the negative numbers and which side of the axes that puts them on. If the z had been negative, it would have been on the bottom half of the z-axis. Here's what coordinates {2,2,4} would look like on a 3D graph:

Hopefully, the above paragraphs and simple graphics will help you in understanding the concept behind 3D (cartesien) coordinates.

## Headings / Bearings in Relation to Coordinates

If you understand the coordinate system discussed above, you will have an easier time grasping the concepts discussed here. Headings and bearings are expressed in angles combined with distances. For instance, and object at coordinates {1,0,0}'s bearing to an object at coordinates {0,0,0} would be 0 mark 0 range 1. The first number before the 'mark', is the horizontal angle. The second number is the vertical angle. The third is the distance.

An object at coordinates {0,3,0}'s bearing to an object at {0,0,0} would be 90 mark 0 range 3. Instead of being directly along the x-axis as the first example, the object was directly along the y-axis. The angle between directly along the x-axis (which is 0 mark 0) is 90 degrees. This is the reason why the yaw (the first coordinate) is 90.

It should be noted that the pitch (the number in a bearing) will only be used if the object's z coordinate is different than the other object's.

Headings are an application of bearings. A heading is the direction in which an object is travelling (or at least facing). A heading consists only of the first two numbers of a bearing, the yaw (horizontal) and pitch (vertical). Here are few graphics to help explain headings: