From a13179fecf048b7fade6f096da858c1ff4e67a8b Mon Sep 17 00:00:00 2001 From: drowe67 Date: Wed, 18 Jan 2017 00:57:26 +0000 Subject: [PATCH] added mode for demodulating 800XA waveform git-svn-id: https://svn.code.sf.net/p/freetel/code@2982 01035d8c-6547-0410-b346-abe4f91aad63 --- codec2-dev/octave/fsk_horus.m | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/codec2-dev/octave/fsk_horus.m b/codec2-dev/octave/fsk_horus.m index 196ab530..08db1b3a 100644 --- a/codec2-dev/octave/fsk_horus.m +++ b/codec2-dev/octave/fsk_horus.m @@ -806,6 +806,7 @@ function run_sim(test_frame_mode, frames = 10, EbNodB = 100) if test_frame_mode < 4 % horus rtty config --------------------- states = fsk_horus_init(8000, 50, 4); + %states = fsk_horus_init_hbr(8000, 10, 400, 4); % EME end if test_frame_mode == 4 @@ -831,7 +832,8 @@ function run_sim(test_frame_mode, frames = 10, EbNodB = 100) if states.M == 2 states.ftx = 1200 + [ 0 states.Rs ]; else - states.ftx = 1200 + 2*states.Rs*(1:4); + states.ftx = 1200 + 2*states.Rs*(1:4) + %states.ftx = 200 + states.Rs*(1:4); % EME end % ---------------------------------------------------------------------- @@ -1089,6 +1091,16 @@ function rx_bits_log = demod_file(filename, test_frame_mode, noplot=0, EbNodB=10 printf("length test frame: %d\n", states.ntestframebits); end + if test_frame_mode == 7 + % 800XA 4FSK modem -------------- + states = fsk_horus_init_hbr(8000, 10, 400, 4, 256); + states.tx_bits_file = "horus_high_speed.bin"; + states.verbose += 0x4; + ftmp = fopen(states.tx_bits_file, "rb"); test_frame = fread(ftmp,Inf,"char")'; fclose(ftmp); + states.ntestframebits = length(test_frame); + printf("length test frame: %d\n", states.ntestframebits); + end + N = states.N; P = states.P; Rs = states.Rs; @@ -1241,7 +1253,7 @@ endfunction % run test functions from here during development if exist("fsk_horus_as_a_lib") == 0 - run_sim(6, 10, 9); + %run_sim(1, 100, 6); %rx_bits = demod_file("~/Desktop/115.wav",6,0,90); %rx_bits = demod_file("fsk_horus.raw",5); %rx_bits = demod_file("~/Desktop/4FSK_Binary_NoLock.wav",4); @@ -1258,4 +1270,5 @@ if exist("fsk_horus_as_a_lib") == 0 %rx_bits = demod_file("fsk_horus_rx_1200_96k.raw",1); %rx_bits = demod_file("mp.raw",4); %rx_bits = demod_file("~/Desktop/launchbox_v2_landing_8KHz_final.wav",4); + rx_bits = demod_file("~/Desktop/bench_test_002.wav",7); end -- 2.25.1