Without an ever present magnetic field to rely on, as compass users have on Earth, those of us responsible for spacecraft navigation must utilize a three-dimensional Cartesian coordinate system, or frame, of our own devising.
One common frame currently used in deep space is called the Earth Mean Equator and Equinox of Epoch J2000, abbreviated as EME2000. Its name is so involved because it captures the many elements required to define a three-dimensional coordinate system: a reference body (Earth); a reference plane (the mean equator, an idealized equator that does not include the small nodding motion, or nutation, of Earth's axis); a reference direction (the vernal equinox, a line from Earth to the sun on the first day of spring); and a reference time (J2000, or January 1, 2000, at 12:00:00 Ephemeris Time, a uniform timescale used for planetary motion calculations). The reference body and reference plane define the x-y plane of the frame. The z-axis is perpendicular to the plane, generally along the body's axis of rotation. A reference time is required because the reference planes experience subtle motion caused by gravitational forces of the other bodies in the solar system.
Using the defined coordinate frame, a spacecraft must be able to both determine and control its orientation. Instead of a compass, spacecraft sensors use the sun and stars to determine the craft's orientation relative to the coordinate frame. Desired directions can be specified in several ways with respect to the defined frame, but two angular measurements are commonly used. In astronomy, right ascension and declination identify directions in the sky. Right ascension is an angular measurement in the reference plane, and declination measures the angle above or below the reference plane.
Although the specifics may vary, determining directions in spaceflight relies on the basic principles of defining a reference frame and using measurements to determine orientation relative to that frame. As for the system on Star Trek (such as heading 294, mark 37), I doubt this method finds any current use in deep-space navigation. But by specifying two measurements, at least there is enough information to properly aim the warp drive.
Editor's Note: This story was originally published in the March 2009 issue of Scientific American.