30 lines
554 B
Rust
30 lines
554 B
Rust
use crate::iq_reader::FileSource;
|
|
use crate::pipeline::DspPipelineExt;
|
|
use std::error::Error;
|
|
|
|
mod agc;
|
|
mod fir;
|
|
mod fm_demod;
|
|
mod iq_reader;
|
|
mod pipeline;
|
|
mod utils;
|
|
|
|
fn main() -> Result<(), Box<dyn Error>> {
|
|
let source = FileSource::new("test.iq", 32769)?;
|
|
|
|
// Fir coefs
|
|
let taps = [0.5; 64];
|
|
|
|
let pipeline = source
|
|
.agc(20_000_000.0, 1.0, 0.001, 100.0)
|
|
.fir::<64>(taps, 4)
|
|
.demodulate();
|
|
|
|
for phase_r in pipeline {
|
|
let phase = phase_r?;
|
|
// println!("phase : {}", phase);
|
|
}
|
|
|
|
Ok(())
|
|
}
|