pub struct CostasLoop { /* private fields */ }Expand description
A decision-directed Costas loop. Symbols (one complex sample per symbol, timing already
recovered) are derotated by the NCO, and the data-stripping phase detector, applied to the
unit-magnitude derotated sample (so the detector gain is one near lock), drives the same
second-order loop filter as super::phase_locked_loop::PhaseLockedLoop.
Implementations§
Source§impl CostasLoop
impl CostasLoop
pub fn new( modulation: CostasModulation, normalized_bandwidth: f64, damping: f64, ) -> Result<Self, ErrorsJSL>
Sourcepub fn step(&mut self, x: Complex<f64>) -> (Complex<f64>, f64)
pub fn step(&mut self, x: Complex<f64>) -> (Complex<f64>, f64)
Processes one symbol: returns the derotated symbol and the detector error.
pub fn process(&mut self, x: &[Complex<f64>]) -> Vec<Complex<f64>>
pub fn phase(&self) -> f64
pub fn frequency(&self) -> f64
Trait Implementations§
Source§impl Clone for CostasLoop
impl Clone for CostasLoop
Auto Trait Implementations§
impl Freeze for CostasLoop
impl RefUnwindSafe for CostasLoop
impl Send for CostasLoop
impl Sync for CostasLoop
impl Unpin for CostasLoop
impl UnsafeUnpin for CostasLoop
impl UnwindSafe for CostasLoop
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more