Research Article

Design and Real-Time Implementation of a 3-Stage CnW Heading System on an Ubuntu Linux-Embedded Board

Code 9

Thread 1 - main thread for sensor fusion system;
Thread 2 - poll data, execute CnW-S1 and then FAz on GPS#1;
Thread 3 - poll data, execute CnW-S1 and then FAz on GPS#2;
Thread 4 - poll data, execute CnW-S1 and then FAz on GPS#3;
Thread 5 - poll data from EC;
Thread 6 - execute CnW-S2;
Thread 7 - poll data from IMU;
Thread 8 - execute EKF on data from GPS#1 and IMU;
Thread 9 - execute EKF on data from GPS#2 and IMU;
Thread 10 -   execute EKF on data from GPS#3 and IMU;
Thread 11 -   execute CnW-S3 on data from EKF#1, EKF#2, and EKF#3