This commit is contained in:
2026-06-11 12:31:56 +02:00
parent e44db49bb4
commit f402885ab8
2 changed files with 21 additions and 12 deletions

View File

@ -1,9 +1,9 @@
use crate::agc::Agc;
use crate::iq_reader::FileSource;
use std::error::Error;
mod agc;
mod iq_reader;
mod plot;
fn main() -> Result<(), Box<dyn Error>> {
let source = FileSource::new("test.iq", 32769)?;
@ -12,5 +12,14 @@ fn main() -> Result<(), Box<dyn Error>> {
// println!("{chunk :?}");
// }
// 20 MSps
let mut agc = Agc::new(20_000_000.0, 0.1, 0.001, 100.0);
// Apply Auto Gain Control
for chunk_r in source {
let mut chunk = chunk_r?;
agc.process_chunk(&mut chunk);
}
Ok(())
}