Lightweight PLL/Kalman-style tracker for residual frequency offset.
More...
#include <FrequencyTracker.h>
|
| void | reset (double initial_hz, double sample_rate_hz, double alpha=0.15, double max_step_hz=0.3, double max_error_hz=5.0) |
| | Reset the FrequencyTracker with initial parameters.
|
|
void | disable () |
| | Disable the FrequencyTracker.
|
| bool | enabled () const noexcept |
| | Check if the FrequencyTracker is enabled.
|
| double | currentHz () const noexcept |
| | Get the current frequency estimate in Hz.
|
| double | averageStepHz () const noexcept |
| | Get the average step size in Hz.
|
| void | apply (std::complex< float > *data, int count) const |
| | Apply frequency correction to the provided data.
|
| void | update (double residual_hz, double weight=1.0) |
| | Update the FrequencyTracker with a new residual frequency measurement.
|
Lightweight PLL/Kalman-style tracker for residual frequency offset.
Initialized with coarse estimates and sample rate; apply() rotates samples by the tracked offset, update() nudges the estimate using pilot residuals. Used inside the JS8 decode loop per candidate frame.
◆ apply()
| void js8::FrequencyTracker::apply |
( |
std::complex< float > * | data, |
|
|
int | count ) const |
Apply frequency correction to the provided data.
- Parameters
-
| data | Pointer to complex float data |
| count | Number of samples |
◆ averageStepHz()
| double js8::FrequencyTracker::averageStepHz |
( |
| ) |
const |
|
nodiscardnoexcept |
Get the average step size in Hz.
- Returns
- double
◆ currentHz()
| double js8::FrequencyTracker::currentHz |
( |
| ) |
const |
|
nodiscardnoexcept |
Get the current frequency estimate in Hz.
- Returns
- double
◆ enabled()
| bool js8::FrequencyTracker::enabled |
( |
| ) |
const |
|
nodiscardnoexcept |
◆ reset()
| void js8::FrequencyTracker::reset |
( |
double | initial_hz, |
|
|
double | sample_rate_hz, |
|
|
double | alpha = 0.15, |
|
|
double | max_step_hz = 0.3, |
|
|
double | max_error_hz = 5.0 ) |
Reset the FrequencyTracker with initial parameters.
- Parameters
-
| initial_hz | Initial frequency estimate in Hz |
| sample_rate_hz | Sample rate in Hz |
| alpha | Smoothing factor |
| max_step_hz | Maximum step size in Hz |
| max_error_hz | Maximum allowable error in Hz |
◆ update()
| void js8::FrequencyTracker::update |
( |
double | residual_hz, |
|
|
double | weight = 1.0 ) |
Update the FrequencyTracker with a new residual frequency measurement.
- Parameters
-
| residual_hz | Residual frequency in Hz |
| weight | Weighting factor |
The documentation for this class was generated from the following files: