mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-21 13:15:40 -05:00
Included error correction on P25 TDULC.
Added a new "heuristics" module for P25 that improves the estimation of the symbol (dibit) that corresponds to a given analog signal value. Added a BER (bit error reate) estimation for P25.
This commit is contained in:
51
p25p1_ldu.h
51
p25p1_ldu.h
@@ -1,18 +1,49 @@
|
||||
|
||||
#ifndef __P25P1_LDU_H__
|
||||
#define __P25P1_LDU_H__
|
||||
#ifndef P25P1_LDU_H_a3c417fcb7804991b0e6d828066bd133
|
||||
#define P25P1_LDU_H_a3c417fcb7804991b0e6d828066bd133
|
||||
|
||||
#include "dsd.h"
|
||||
#include "p25p1_const.h"
|
||||
|
||||
// separate imbe frames and deinterleave
|
||||
void
|
||||
process_IMBE (dsd_opts* opts, dsd_state* state, int* status_count);
|
||||
#include "p25p1_hdu.h"
|
||||
#include "p25p1_const.h"
|
||||
#include "p25p1_heuristics.h"
|
||||
|
||||
/**
|
||||
* Read an hex word, its parity bits and attempts to error correct it using the Hamming algorithm.
|
||||
* Separate imbe frames and deinterleave.
|
||||
* This important methods read the IMBE data from the stream and passes it to the vocoder to produce audio.
|
||||
* \param opts The DSD options.
|
||||
* \param state The DSD state.
|
||||
* \status_count An index that allows us to skip the status words interleaved every 36 dibit in the data
|
||||
* stream.
|
||||
*/
|
||||
void
|
||||
read_and_correct_hex_word (dsd_opts* opts, dsd_state* state, char* hex, int* status_count);
|
||||
void process_IMBE (dsd_opts* opts, dsd_state* state, int* status_count);
|
||||
|
||||
#endif // __P25P1_LDU_H__
|
||||
/**
|
||||
* Reads an hex word, its parity bits and attempts to error correct it using the Hamming FEC.
|
||||
* \param opts The DSD options.
|
||||
* \param state The DSD state.
|
||||
* \param hex Pointer where to store the read hex word. Six bytes, one per bit.
|
||||
* \param status_count An index that allows us to skip the status words interleaved every 36 dibit in the data
|
||||
* stream.
|
||||
* \param analog_singal_array Pointer to a sequence of AnalogSignal elements.
|
||||
* \param analog_signal_index The current index in the analog_singal_array. This value is increased on each
|
||||
* dibit read.
|
||||
*/
|
||||
void read_and_correct_hex_word (dsd_opts* opts, dsd_state* state, char* hex, int* status_count,
|
||||
AnalogSignal* analog_signal_array, int* analog_signal_index);
|
||||
|
||||
/**
|
||||
* Correct the information in analog_signal_array according with the content of data, which has been
|
||||
* error corrected and should be valid.
|
||||
* \param Dibits that have already been error corrected and we trust are correct.
|
||||
* \count Number of dibits.
|
||||
* \param analog_signal_array Pointer to a sequence of AnalogSignal elements, as many as the value of count.
|
||||
*/
|
||||
void correct_hamming_dibits(char* hex_data, int hex_count, AnalogSignal* analog_signal_array);
|
||||
|
||||
/**
|
||||
* Logs some debug info.
|
||||
*/
|
||||
void debug_ldu_header(dsd_state* state);
|
||||
|
||||
#endif // P25P1_LDU_H_a3c417fcb7804991b0e6d828066bd133
|
||||
|
||||
Reference in New Issue
Block a user