/*--------------------------------------------------------------------------------------------------- Magnetic Compass message structure. Sent by ISC control computer 8 per second. Feb 28,2004 N.H. Note: Pitch and Roll are valid only when no acceleration other than gravity is present. For example, increasing speed or turning will invalidate pitch and roll. Readings are produced by the Honeywell HMR3300 electronic compass. ---------------------------------------------------------------------------------------------------*/ /* ISC to NAV, sent 8 PER second */ struct MAGMSG { /* Synchronization word */ USHORT unique_word; /* Word 1, 0xff80 - 0xff first, 0x81 second */ USHORT msgID; /* Word 2, */ USHORT msglength; /* Word 3, Number of words in the structure. Including unique_word and checksum */ short heading; /* Word 4, Integer Units = .1 degrees */ short pitch; /* Word 5, Integer Units = .1 degrees */ short roll; /* Word 6, Integer Units = .1 degrees */ USHORT checksum; // Word 7, The method is to sum the entire structure from the unique_word // up to, but excluding the checksum word. All math is performed using // signed 16 bit integers with carries, or overflows, ignored. The sum is // negated. }; typedef struct MAGMSG MAGMSGst;