The present invention comprises a device for determining the roll
orientation of a body with respect to a local fixed coordinate system or
a predetermined reference vector. The device uses a measurement of an
external magnetic field, such as the Earth's magnetic field, to determine
a roll orientation reference with respect to the field or an
uncompensated roll orientation. The uncompensated roll orientation is
then adjusted according to a bias angle, such as an angular difference
between the external magnetic field and a local fixed coordinate system,
to determine the roll orientation of the device with respect to the local
fixed coordinate system or a compensated roll angle.