17 #ifndef GNSS_SDR_BIT_SYNCHRONIZER_H 18 #define GNSS_SDR_BIT_SYNCHRONIZER_H 153 last_prompt_(0.0f, 0.0f),
157 stable_best_count_(0),
159 has_last_prompt_(false),
160 has_last_sign_(false),
161 has_last_best_bin_(false)
163 hist_.assign(
bins(), 0);
195 bool update(
const std::complex<float>& prompt,
bool tracking_quality_ok);
290 void best_bin_and_count(
int& best_bin,
int& best_count)
const;
293 std::vector<int> hist_;
295 std::int64_t total_events_;
296 std::int64_t epoch_count_;
298 std::complex<float> last_prompt_;
303 int stable_best_count_;
306 bool has_last_prompt_;
308 bool has_last_best_bin_;
313 #endif // GNSS_SDR_BIT_SYNCHRONIZER_H const std::vector< int > & get_histogram() const
Access the internal histogram (read-only).
int epoch_ms
Time interval between successive calls to update(), in milliseconds.
Histogram-based navigation data bit synchronizer.
bool update(const std::complex< float > &prompt, bool tracking_quality_ok)
Update the synchronizer once per epoch.
std::int64_t get_total_events() const
Total number of detected transition events accumulated into the histogram.
bool use_phase_dot_detector
Select the transition detection method.
bool is_edge_epoch(std::int64_t k) const
Predict whether a given epoch index corresponds to a bit edge.
int epochs_until_next_edge() const
Return the number of epochs until the next predicted navigation bit edge.
double dominance_ratio
Required dominance ratio of the winning histogram bin.
float min_prompt_mag
Minimum magnitude of the prompt correlator output.
void reset()
Reset the synchronizer state.
int edge_phase() const
Get the estimated bit edge phase bin.
std::int64_t get_epoch_count() const
Total number of epochs processed by update().
int stable_best_required
Required stability of the dominant histogram bin (consecutive evaluations).
int bit_period_ms
Navigation data bit period in milliseconds.
HistogramBitSynchronizer(const Config &cfg)
Construct a histogram bit synchronizer with the provided configuration.
int min_events_for_lock
Minimum number of detected transition events required before lock evaluation.
Configuration parameters for HistogramBitSynchronizer.
bool locked() const
Query whether the synchronizer has achieved lock.
int bins() const
Return the number of histogram bins.