mirror of https://github.com/drowe67/codec2.git
ofdm_mod/ofdm_demod working with datac14
parent
3c76146765
commit
2ee2989c9c
|
@ -662,6 +662,13 @@ endif()
|
|||
cd ${CMAKE_CURRENT_BINARY_DIR}/src;
|
||||
cat test.raw | ./ofdm_demod --mode datac13 --out /dev/null --testframes --ldpc --verbose 2 --packetsperburst 1")
|
||||
|
||||
# DATAC14 Octave Tx, C Rx, burst mode
|
||||
add_test(NAME test_OFDM_modem_datac14_octave
|
||||
COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/octave;
|
||||
DISPLAY=\"\" octave-cli -qf --eval 'ofdm_ldpc_tx(\"${CMAKE_CURRENT_BINARY_DIR}/src/test.raw\",\"datac14\",1,3,\"awgn\",\"bursts\",5)';
|
||||
cd ${CMAKE_CURRENT_BINARY_DIR}/src;
|
||||
cat test.raw | ./ofdm_demod --mode datac14 --out /dev/null --testframes --ldpc --verbose 2 --packetsperburst 1")
|
||||
|
||||
# DATAC4 C Tx, C Rx, burst mode
|
||||
add_test(NAME test_OFDM_modem_datac4_ldpc_burst
|
||||
COMMAND sh -c "cd ${CMAKE_CURRENT_BINARY_DIR}/src;
|
||||
|
@ -676,7 +683,14 @@ endif()
|
|||
./ch - - --No -17 |
|
||||
./ofdm_demod --mode datac13 --out /dev/null --testframes --ldpc --verbose 2 --packetsperburst 1")
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# DATAC14 C Tx, C Rx, burst mode
|
||||
add_test(NAME test_OFDM_modem_datac14_ldpc_burst
|
||||
COMMAND sh -c "cd ${CMAKE_CURRENT_BINARY_DIR}/src;
|
||||
./ofdm_mod --mode datac14 --in /dev/zero --testframes 1 --verbose 1 --ldpc --bursts 10 |
|
||||
./ch - - --No -17 |
|
||||
./ofdm_demod --mode datac14 --out /dev/null --testframes --ldpc --verbose 2 --packetsperburst 1")
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# LDPC
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
|
@ -1392,6 +1406,7 @@ endif(NOT APPLE)
|
|||
test_OFDM_modem_datac3_octave
|
||||
test_OFDM_modem_datac4_octave
|
||||
test_OFDM_modem_datac13_octave
|
||||
test_OFDM_modem_datac14_octave
|
||||
test_fsk_lib_4fsk_ldpc
|
||||
test_OFDM_modem_datac0_compression
|
||||
PROPERTIES
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
*/
|
||||
|
||||
static const int b_table[] = {
|
||||
48, 31, /* datac14: HRA_56_56, 40 data bits used */
|
||||
56, 37, /* 700E: HRA_56_56 */
|
||||
106, 67, /* 2020B: (112,56) partial protection */
|
||||
112, 71, /* 700D: HRA_112_112 */
|
||||
|
|
|
@ -78,6 +78,7 @@ void ldpc_mode_specific_setup(struct OFDM *ofdm, struct LDPC *ldpc) {
|
|||
}
|
||||
if (!strcmp(ofdm->mode, "datac4")) set_data_bits_per_frame(ldpc, 448);
|
||||
if (!strcmp(ofdm->mode, "datac13")) set_data_bits_per_frame(ldpc, 128);
|
||||
if (!strcmp(ofdm->mode, "datac14")) set_data_bits_per_frame(ldpc, 40);
|
||||
}
|
||||
|
||||
/* LDPC encode frame - generate parity bits and a codeword, applying the
|
||||
|
|
|
@ -559,7 +559,8 @@ static void allocate_tx_bpf(struct OFDM *ofdm) {
|
|||
quisk_filt_cfInit(ofdm->tx_bpf, filtP400S600,
|
||||
sizeof(filtP400S600) / sizeof(float));
|
||||
quisk_cfTune(ofdm->tx_bpf, ofdm->tx_centre / ofdm->fs);
|
||||
} else if (!strcmp(ofdm->mode, "datac4") || !strcmp(ofdm->mode, "datac13")) {
|
||||
} else if (!strcmp(ofdm->mode, "datac4") || !strcmp(ofdm->mode, "datac13") ||
|
||||
!strcmp(ofdm->mode, "datac14")) {
|
||||
quisk_filt_cfInit(ofdm->tx_bpf, filtP200S400,
|
||||
sizeof(filtP200S400) / sizeof(float));
|
||||
// centre the filter on the mean carrier freq, allows a narrower filter to
|
||||
|
@ -590,7 +591,8 @@ static void allocate_rx_bpf(struct OFDM *ofdm) {
|
|||
|
||||
/* Receive bandpass filter; complex coefficients, center frequency */
|
||||
|
||||
if (!strcmp(ofdm->mode, "datac4") || !strcmp(ofdm->mode, "datac13")) {
|
||||
if (!strcmp(ofdm->mode, "datac4") || !strcmp(ofdm->mode, "datac13") ||
|
||||
!strcmp(ofdm->mode, "datac14")) {
|
||||
quisk_filt_cfInit(ofdm->rx_bpf, filtP200S400,
|
||||
sizeof(filtP200S400) / sizeof(float));
|
||||
// centre the filter on the mean carrier freq, allows a narrower filter to
|
||||
|
|
|
@ -226,6 +226,31 @@ void ofdm_init_mode(char mode[], struct OFDM_CONFIG *config) {
|
|||
config->clip_gain1 = 1.2;
|
||||
config->clip_gain2 = 1.0;
|
||||
config->rx_bpf_en = true;
|
||||
} else if (strcmp(mode, "datac14") == 0) {
|
||||
config->ns = 5;
|
||||
config->np = 4;
|
||||
config->tcp = 0.005;
|
||||
config->ts = 0.018;
|
||||
config->nc = 4;
|
||||
config->edge_pilots = 0;
|
||||
config->txtbits = 0;
|
||||
config->state_machine = "data";
|
||||
config->ftwindowwidth = 80;
|
||||
config->timing_mx_thresh = 0.45;
|
||||
config->codename = "HRA_56_56";
|
||||
config->amp_est_mode = 1;
|
||||
config->nuwbits = 32;
|
||||
config->bad_uw_errors = 12;
|
||||
uint8_t uw[] = {1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1,
|
||||
0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0};
|
||||
assert(sizeof(uw) <= MAX_UW_BITS);
|
||||
memcpy(config->tx_uw, uw, sizeof(uw));
|
||||
memcpy(&config->tx_uw[config->nuwbits - sizeof(uw)], uw, sizeof(uw));
|
||||
config->data_mode = "streaming";
|
||||
config->amp_scale = 2.5 * 300E3;
|
||||
config->clip_gain1 = 1.2;
|
||||
config->clip_gain2 = 1.0;
|
||||
config->rx_bpf_en = true;
|
||||
} else {
|
||||
assert(0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue