Struct idsp::RPLL [−][src]
pub struct RPLL { /* fields omitted */ }
Expand description
Reciprocal PLL.
Consumes noisy, quantized timestamps of a reference signal and reconstructs
the phase and frequency of the update() invocations with respect to (and in units of
1 << 32 of) that reference.
In other words, update()
rate ralative to reference frequency,
u32::MAX
corresponding to both being equal.
Implementations
Create a new RPLL instance.
Args:
- dt2: inverse update() rate. 1 << dt2 is the counter rate to update() rate ratio.
Returns: Initialized RPLL instance.
Advance the RPLL and optionally supply a new timestamp.
Args:
- input: Optional new timestamp (wrapping around at the i32 boundary).
There can be at most one timestamp per
update()
cycle (1 << dt2 counter cycles). - shift_frequency: Frequency lock settling time. 1 << shift_frequency is frequency lock settling time in counter periods. The settling time must be larger than the signal period to lock to.
- shift_phase: Phase lock settling time. Usually one less than
shift_frequency
(see there).
Returns: A tuple containing the current phase (wrapping at the i32 boundary, pi) and frequency.