pub fn encode_iq_packet( header: &IqHeader, iq_samples: &[(f64, f64)], valid: bool, out: &mut [u8], ) -> Result<usize, Error>