From: drowe67 Date: Wed, 13 Aug 2014 09:27:09 +0000 (+0000) Subject: part way through changes to make fdmdv_mod use less stack, tfdmdv works X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=8dbe1fbe2cf8949307278a9e5a60602cb244a3f7;p=freetel-svn-tracking.git part way through changes to make fdmdv_mod use less stack, tfdmdv works git-svn-id: https://svn.code.sf.net/p/freetel/code@1796 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/codec2-dev/octave/fdmdv.m b/codec2-dev/octave/fdmdv.m index bbe01cf7..0f650eec 100644 --- a/codec2-dev/octave/fdmdv.m +++ b/codec2-dev/octave/fdmdv.m @@ -209,30 +209,12 @@ function tx_fdm = fdm_upconvert(tx_filt) % Nc/2 tones below zero - for c=1:Nc/2 - for i=1:M - phase_tx(c) = phase_tx(c) * freq(c); - tx_fdm(i) = tx_fdm(i) + tx_filt(c,i)*phase_tx(c); - end - end - - % Nc/2 tones above zero - - for c=Nc/2+1:Nc + for c=1:Nc+1 for i=1:M phase_tx(c) = phase_tx(c) * freq(c); tx_fdm(i) = tx_fdm(i) + tx_filt(c,i)*phase_tx(c); end end - - % add centre pilot tone - - c = Nc+1; - for i=1:M - phase_tx(c) = phase_tx(c) * freq(c); - pilot(i) = 2*tx_filt(c,i)*phase_tx(c); - tx_fdm(i) = tx_fdm(i) + pilot(i); - end % shift up to carrier freq diff --git a/codec2-dev/octave/fdmdv_mod.m b/codec2-dev/octave/fdmdv_mod.m index eed85a2b..8d132264 100644 --- a/codec2-dev/octave/fdmdv_mod.m +++ b/codec2-dev/octave/fdmdv_mod.m @@ -15,7 +15,7 @@ function tx_fdm = fdmdv_mod(rawfilename, nbits) frames = floor(nbits/(Nc*Nb)) tx_fdm = []; gain = 1000; % Scale up to 16 bit shorts - prev_tx_symbols = ones(Nc+1,1); + prev_tx_symbols = ones(Nc+1,1); prev_tx_symbols(Nc+1) = 2; for i=1:frames tx_bits = get_test_bits(Nc*Nb); diff --git a/codec2-dev/octave/fdmdv_ut.m b/codec2-dev/octave/fdmdv_ut.m index 4bd8c018..0df37aed 100644 --- a/codec2-dev/octave/fdmdv_ut.m +++ b/codec2-dev/octave/fdmdv_ut.m @@ -12,7 +12,7 @@ fdmdv; % load modem code % Simulation Parameters -------------------------------------- -frames = 200; +frames = 100; EbNo_dB = 6.3; Foff_hz = -100; modulation = 'dqpsk'; @@ -30,7 +30,7 @@ noise_pwr = 0; rx_fdm_log = []; rx_baseband_log = []; rx_bits_offset = zeros(Nc*Nb*2); -prev_tx_symbols = ones(Nc+1,1); +prev_tx_symbols = ones(Nc+1,1); prev_tx_symbols(Nc+1) = 2; prev_rx_symbols = ones(Nc+1,1); ferr = 0; foff = 0; diff --git a/codec2-dev/octave/tfdmdv.m b/codec2-dev/octave/tfdmdv.m index 1bdac804..ac7186a8 100644 --- a/codec2-dev/octave/tfdmdv.m +++ b/codec2-dev/octave/tfdmdv.m @@ -19,7 +19,7 @@ global passes; global fails; passes = fails = 0; frames = 35; -prev_tx_symbols = ones(Nc+1,1); +prev_tx_symbols = ones(Nc+1,1); prev_tx_symbols(Nc+1) = 2; prev_rx_symbols = ones(Nc+1,1); foff_phase_rect = 1; channel = []; diff --git a/codec2-dev/src/fdmdv.c b/codec2-dev/src/fdmdv.c index 2841f74d..c6ea6990 100644 --- a/codec2-dev/src/fdmdv.c +++ b/codec2-dev/src/fdmdv.c @@ -181,7 +181,8 @@ struct FDMDV * fdmdv_create(int Nc) f->rx_filter_mem_timing[c][k].imag = 0.0; } } - + f->prev_tx_symbols[Nc].real = 2.0; + fdmdv_set_fsep(f, FSEP); f->freq[Nc].real = cosf(2.0*PI*0.0/FS); f->freq[Nc].imag = sinf(2.0*PI*0.0/FS); @@ -468,7 +469,6 @@ void fdm_upconvert(COMP tx_fdm[], int Nc, COMP tx_baseband[NC+1][M], COMP phase_ { int i,c; COMP two = {2.0, 0.0}; - COMP pilot; float mag; for(i=0; i