|
JS8Call-Improved master
|
Lightweight PLL/Kalman-style tracker for residual frequency offset. More...
#include <FrequencyTracker.h>
Public Member Functions | |
| 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) |
| Initialize or reconfigure the tracker. | |
| void | disable () |
| Disable the tracker (subsequent apply() calls become no-ops). | |
| bool | enabled () const noexcept |
| Whether the tracker is enabled. | |
| double | currentHz () const noexcept |
| Current estimated residual frequency. | |
| double | averageStepHz () const noexcept |
| Average step size applied by the tracker (Hz). | |
| void | apply (std::complex< float > *data, int count) const |
| Rotate an array of complex samples by the tracked frequency. | |
| void | update (double residual_hz, double weight=1.0) |
| Update the tracker estimate using a measured residual. | |
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.
| void js8::FrequencyTracker::apply | ( | std::complex< float > * | data, |
| int | count ) const |
Rotate an array of complex samples by the tracked frequency.
Apply frequency correction to the provided data.
| data | Pointer to complex input/output samples to be rotated in-place. |
| count | Number of complex samples. |
| data | Pointer to complex float data |
| count | Number of samples |
|
nodiscardnoexcept |
Average step size applied by the tracker (Hz).
Get the average step size in Hz.
|
nodiscardnoexcept |
Current estimated residual frequency.
Get the current frequency estimate in Hz.
| void js8::FrequencyTracker::disable | ( | ) |
Disable the tracker (subsequent apply() calls become no-ops).
Disable the FrequencyTracker.
|
nodiscardnoexcept |
Whether the tracker is enabled.
Check if the FrequencyTracker is enabled.
| 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 ) |
Initialize or reconfigure the tracker.
Reset the FrequencyTracker with initial parameters.
| initial_hz | Initial frequency estimate in Hz. |
| sample_rate_hz | Sample rate in Hz for the input data. |
| alpha | Smoothing coefficient for the estimator (default 0.15). |
| max_step_hz | Maximum allowed step change per update (Hz). |
| max_error_hz | Maximum tolerated error before aggressive limiting. |
| 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 |
| void js8::FrequencyTracker::update | ( | double | residual_hz, |
| double | weight = 1.0 ) |
Update the tracker estimate using a measured residual.
Update the FrequencyTracker with a new residual frequency measurement.
| residual_hz | Measured residual frequency (Hz) to incorporate. |
| weight | Weighting applied to this update (default 1.0). |
| residual_hz | Residual frequency in Hz |
| weight | Weighting factor |