pub struct CostasLoop { /* private fields */ }Expand description
Costas Loop for BPSK / QPSK carrier phase and frequency tracking.
Implementations§
Source§impl CostasLoop
impl CostasLoop
Sourcepub fn new(
center_freq_hz: f32,
sample_rate_hz: f32,
loop_bandwidth_hz: f32,
damping: f32,
) -> Self
pub fn new( center_freq_hz: f32, sample_rate_hz: f32, loop_bandwidth_hz: f32, damping: f32, ) -> Self
Create a new Costas Loop.
Sourcepub fn process_sample(&mut self, sample: f32) -> (f32, f32)
pub fn process_sample(&mut self, sample: f32) -> (f32, f32)
Process a modulated carrier sample and return the demodulated baseband in-phase (I) sample.
Sourcepub fn frequency_hz(&self) -> f32
pub fn frequency_hz(&self) -> f32
Current tracked carrier frequency in Hz.
Sourcepub fn center_frequency_hz(&self) -> f32
pub fn center_frequency_hz(&self) -> f32
Nominal center frequency in Hz.
Trait Implementations§
Source§impl Clone for CostasLoop
impl Clone for CostasLoop
Source§fn clone(&self) -> CostasLoop
fn clone(&self) -> CostasLoop
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy 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