Added symsync to the receiver chain

This commit is contained in:
Thomas Kolb 2022-01-29 22:36:41 +01:00
parent f983635c14
commit 09465591ed

View file

@ -21,10 +21,9 @@ int main(void)
float snr = 20.0f;
channel_cccf_add_awgn(channel, -snr, snr);
channel_cccf_add_carrier_offset(channel, 0.01f, 1.00f);
unsigned int k = fec_get_enc_msg_length(CHANNEL_CODE, sizeof(msg_org));
packet_mod_ctx_t pmod;
packet_mod_init(&pmod);
@ -70,17 +69,23 @@ int main(void)
dump_array_cf(whole_burst, burst_len, 1.0f, "/tmp/tx.cpx");
#if 0
// channel
float complex msg_received[nsyms];
float complex msg_received[burst_len];
nsyms = nsyms - 63 - 16;
//memcpy(msg_received, whole_burst, sizeof(whole_burst)); // no noise in channel
//memcpy(msg_received, msg_mod, sizeof(msg_received)); // no noise in channel
channel_cccf_execute_block(channel, whole_burst, burst_len, msg_received);
dump_array_cf(msg_received, burst_len, 1.0f, "/tmp/rx.cpx");
channel_cccf_execute_block(channel, msg_mod + 63 + 16, nsyms, msg_received);
dump_array_cf(msg_received, nsyms, 1.0f, "/tmp/rx.cpx");
// create symbol synchronizer
symsync_crcf symsync = symsync_crcf_create_rnyquist(LIQUID_FIRFILT_RRC, RRC_SPS, RRC_DELAY, RRC_BETA, 32);
float complex symsync_out[burst_len];
unsigned int symsync_out_len;
symsync_crcf_execute(symsync, msg_received, burst_len, symsync_out, &symsync_out_len);
dump_array_cf(symsync_out, symsync_out_len, 1.0f, "/tmp/rx.cpx");
#if 0
// demodulate
unsigned int bps = modem_get_bps(demod);