GNU Radio's DSD Package
p25p1_heuristics.h File Reference

Go to the source code of this file.

Classes

struct  SymbolHeuristics
struct  P25Heuristics
struct  AnalogSignal

Macros

#define HEURISTICS_SIZE   200

Functions

void initialize_p25_heuristics (P25Heuristics *heuristics)
int estimate_symbol (int rf_mod, P25Heuristics *heuristics, int previous_dibit, int analog_value, int *dibit)
void contribute_to_heuristics (int rf_mod, P25Heuristics *heuristics, AnalogSignal *analog_signal_array, int count)
void update_error_stats (P25Heuristics *heuristics, int bits, int errors)
float get_P25_BER_estimate (P25Heuristics *heuristics)

Macro Definition Documentation

◆ HEURISTICS_SIZE

#define HEURISTICS_SIZE   200

Function Documentation

◆ contribute_to_heuristics()

void contribute_to_heuristics ( int rf_mod,
P25Heuristics * heuristics,
AnalogSignal * analog_signal_array,
int count )

This method contributes valuable information from dibits whose value we are confident is correct. We take the dibits and corresponding analog signal values to model the Gaussians for each dibit (and previous dibit if enabled).

Parameters
rf_modIndicates the modulation used. The previous dibit is only used on C4FM.
heuristicsPointer to the P25Heuristics module with all the needed state information.
analog_signal_arraySequence of AnalogSignal which contain the cleared dibits and analog values.
countnumber of cleared dibits passed (= number of elements to use from analog_signal_array).

◆ estimate_symbol()

int estimate_symbol ( int rf_mod,
P25Heuristics * heuristics,
int previous_dibit,
int analog_value,
int * dibit )

Important method that estimates the most likely symbol for a given analog signal value and previous dibit. This is called by the digitizer.

Parameters
rf_modIndicates the modulation used. The previous dibit is only used on C4FM.
heuristicsPointer to the P25Heuristics module with all the needed state information.
previous_dibitThe previous dibit.
analog_valueThe signal's analog value we want to interpret as a dibit.
dibitAddress were to store the estimated dibit.
Returns
A boolean set to true if we are able to estimate a dibit. The reason why we might not be able to estimate it is because we don't have enough information to model the Gaussians (not enough data has been passed to contribute_to_heuristics).

◆ get_P25_BER_estimate()

float get_P25_BER_estimate ( P25Heuristics * heuristics)

Returns the estimate for the BER (bit error rate).

Returns
The estimated BER. This is just the percentage of errors over the processed bits.

◆ initialize_p25_heuristics()

void initialize_p25_heuristics ( P25Heuristics * heuristics)

Initializes the heuristics state.

Parameters
heuristicsThe P25Heuristics structure to initialize.

◆ update_error_stats()

void update_error_stats ( P25Heuristics * heuristics,
int bits,
int errors )

Updates the estimate for the BER (bit error rate). Mind this is method is not called for every single bit in the data stream but only for those bits over which we have an estimate of its error rate, specifically the bits that are protected by Reed-Solomon codes.

Parameters
heuristicsThe heuristics state.
bitsThe number of bits we have read.
errorsThe number of errors we estimate in those bits.