EsNo supplied to LDPC dec now a config param

dr-qam16-cport
drowe67 2024-04-04 06:36:56 +10:30 committed by David Rowe
parent 1de1b46b12
commit e02ef2c0a5
4 changed files with 7 additions and 3 deletions

View File

@ -229,8 +229,7 @@ int freedv_comprx_2020(struct freedv *f, COMP demod_in[]) {
f->sync = 0;
// TODO: should be higher for 2020?
float EsNo = 3.0;
float EsNo = pow(10.0, ofdm->EsNodB / 10);
/* looking for modem sync */

View File

@ -447,7 +447,7 @@ int freedv_comp_short_rx_ofdm(struct freedv *f, void *demod_in_8kHz,
assert((demod_in_is_short == 0) || (demod_in_is_short == 1));
int rx_status = 0;
float EsNo = 3.0; /* further work: estimate this properly from signal */
float EsNo = pow(10.0, ofdm->EsNodB / 10);
f->sync = 0;
/* looking for OFDM modem sync */

View File

@ -190,6 +190,7 @@ struct OFDM *ofdm_create(const struct OFDM_CONFIG *config) {
ofdm->state_machine = "voice1";
ofdm->edge_pilots = 1;
ofdm->codename = "HRA_112_112";
ofdm->EsNodB = 3.0;
ofdm->amp_est_mode = 0;
ofdm->tx_bpf_en = true;
ofdm->rx_bpf_en = false;
@ -224,6 +225,7 @@ struct OFDM *ofdm_create(const struct OFDM_CONFIG *config) {
ofdm->state_machine = config->state_machine;
ofdm->edge_pilots = config->edge_pilots;
ofdm->codename = config->codename;
ofdm->EsNodB = config->EsNodB;
ofdm->amp_est_mode = config->amp_est_mode;
ofdm->tx_bpf_en = config->tx_bpf_en;
ofdm->rx_bpf_en = config->rx_bpf_en;
@ -273,6 +275,7 @@ struct OFDM *ofdm_create(const struct OFDM_CONFIG *config) {
ofdm->config.state_machine = ofdm->state_machine;
ofdm->config.edge_pilots = ofdm->edge_pilots;
ofdm->config.codename = ofdm->codename;
ofdm->config.EsNodB = ofdm->EsNodB;
ofdm->config.amp_est_mode = ofdm->amp_est_mode;
ofdm->config.tx_bpf_en = ofdm->tx_bpf_en;
ofdm->config.rx_bpf_en = ofdm->rx_bpf_en;

View File

@ -108,6 +108,7 @@ struct OFDM_CONFIG {
char *data_mode;
float fmin;
float fmax;
float EsNodB; /* EsNo est used for LDPC decoder */
};
struct OFDM {
@ -248,6 +249,7 @@ struct OFDM {
detector */
char *codename;
float EsNodB; /* EsNo est used for LDPC decoder */
char *state_machine;
};