/*--------------------------------------------------------------------------------------------------- * IMU message structure. Information sent by ISC control computer 8 times per second. * Periodic Interval Timer (PIT) is ultimately is derived from the 32.768 KHz CPU oscillator. * this oscillator produces a 16,777,000 CPU clock divided by 16 = 1,048,562 Hz. * * 1 PIT interrupt = 1/1024 sec = .9765625 msec (PIT_count) * 16 PIT interrupts = 1/64 sec = 15.625 msec * 128 PIT interrupts = 1/8th sec = 125 msec (exactly!) This is the IMUMSG reporting interval. *---------------------------------------------------------------------------------------------------*/ /* ISC to NAV 8 times per second */ struct IMUMSG { /* 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 body_roll_rate; /* Word 4, Current instantaneous sample. Integer Units = .01 degrees/sec */ short body_pitch_rate; /* Word 5, Current instantaneous sample. Integer Units = .01 degrees/sec */ short body_yaw_rate; /* Word 6, Current instantaneous sample. Integer Units = .01 degrees/sec */ short body_lift_accel; /* Word 7, Current instantaneous sample. Integer Units = .01 meters/sec/sec */ short body_thrust_accel; /* Word 8, Current instantaneous sample. Integer Units = .01 meters/sec/sec */ short body_side_accel; /* Word 9, Current instantaneous sample. Integer Units = .01 meters/sec/sec */ short tilt; /* Word 10, Local horizontal to Body frame side. Integer Units = .01 degrees */ short ascension; /* Word 11, Local horizontal to Body frame nose. Integer Units = .01 degrees */ short heading; /* Word 12, Body frame nose to North. Integer Units = .01 degrees North = 0, East = , West = -90, South = 180 */ ULONG PIT_count; /* Periodic Interval Timer interrupt count at sample time. 1/8th second sample seperation time. (128 PIT interrupts) */ USHORT checksum; // Word 14. 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 IMUMSG IMUMSGst;