I do something like this. See the commented-out python code. I paste the output in the rust coeffs: ```rust static mut FILTER_STATE_ACCEL_X: [f32; 4] = [0.; 4]; static mut FILTER_STATE_ACCEL_Y: [f32; 4] = [0.; 4]; static mut FILTER_STATE_ACCEL_Z: [f32; 4] = [0.; 4]; static mut FILTER_STATE_GYRO_PITCH: [f32; 4] = [0.; 4]; static mut FILTER_STATE_GYRO_ROLL: [f32; 4] = [0.; 4]; static mut FILTER_STATE_GYRO_YAW: [f32; 4] = [0.; 4]; // (Using critical freq of 100 for accel, 300 for gyro) // filter_ = signal.iirfilter(1, 300, btype="lowpass", ftype="bessel", output="sos", fs=1_000) // coeffs = [] // for row in filter_: // coeffs.extend([row[0] / row[3], row[1] / row[3], row[2] / row[3], -row[4] / row[3], -row[5] / row[3]]) #[allow(clippy::excessive_precision)] static COEFFS_LP_ACCEL: [f32; 5] = [ 0.2452372752527856, 0.2452372752527856, 0.0, 0.509525449494429, -0.0, ]; #[allow(clippy::excessive_precision)] static COEFFS_LP_GYRO: [f32; 5] = [ ```