#define START_TASK 1 #define STOP_TASK 2 struct my_msg_struct { int command; int order; double sampling_period; }; #define BUF_LEN 5 // #define RECORDING_SAMPLES 50000 // samples to be recorded #define NOCONT_SAMPLES 25000 // samples without control #define WAITING_SAMPLES 25000 // samples without recording #define ORDER_MAX 40 // maximum order of controller #define AMP 3.0 // amplitude for disturbance //#define AMP 0.0 // amplitude for disturbance #define REFMIC_OFFSET 6.0 // offset voltage of reference output #define ERRMIC_OFFSET 6.0 // offset voltage of error output //#define U_MAX 3.00 #define U_MAX 4.00 // HPF(1 rad/s) to cut DC in z and y #define AF 9.9980001999866674e-01 #define BF 1.9998000133326669e-04 #define CF -1.0000000000000000e+00 #define DF 1.0000000000000000e+00 #define DIST_INTERVAL 5 // interval step for updating w //#define DIST_INTERVAL 1 // interval step for updating w //#define NO_CONTROL // without control case