diff --git a/CMakeLists.txt b/CMakeLists.txt index 82e7f7a7..fefb1203 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -381,10 +381,10 @@ endif() add_test(NAME test_codec2_700c_octave_port COMMAND sh -c " cd ${CMAKE_CURRENT_BINARY_DIR}/src; - ./c2sim ${CMAKE_CURRENT_SOURCE_DIR}/raw/cq_ref.raw --phase0 --postfilter --dump cq_ref --lpc 10 --dump_pitch_e cq_ref_pitche.txt; - cd ${CMAKE_CURRENT_BINARY_DIR}/unittest; ./tnewamp1 ${CMAKE_CURRENT_SOURCE_DIR}/raw/cq_ref.raw; + ./c2sim ${CMAKE_CURRENT_SOURCE_DIR}/raw/hts1a.raw --phase0 --postfilter --dump hts1a --lpc 10 --dump_pitch_e hts1a_pitche.txt; + cd ${CMAKE_CURRENT_BINARY_DIR}/unittest; ./tnewamp1 ${CMAKE_CURRENT_SOURCE_DIR}/raw/hts1a.raw; cd ${CMAKE_CURRENT_SOURCE_DIR}/octave; - DISPLAY=\"\" octave-cli -qf --eval 'tnewamp1(\"${CMAKE_CURRENT_BINARY_DIR}/src/cq_ref\", \"${CMAKE_CURRENT_BINARY_DIR}/unittest\")'") + DISPLAY=\"\" octave-cli -qf --eval 'tnewamp1(\"${CMAKE_CURRENT_BINARY_DIR}/src/hts1a\", \"${CMAKE_CURRENT_BINARY_DIR}/unittest\")'") set_tests_properties(test_codec2_700c_octave_port PROPERTIES PASS_REGULAR_EXPRESSION "fails: 0") # ------------------------------------------------------------------------- diff --git a/octave/hf_sim.m b/octave/hf_sim.m deleted file mode 100644 index c9105c00..00000000 --- a/octave/hf_sim.m +++ /dev/null @@ -1,78 +0,0 @@ -% hf_sim.m -% David Rowe March 2014 -% -% Two path CCIR poor HF channel simulation, with apaologies to PathSim - -% Init HF channel model from stored sample files of spreading signal ---------------------------------- - -global spread; -global spread_2ms; -global hf_gain; - -% convert "spreading" samples from 1kHz carrier at Fs to complex -% baseband, generated by passing a 1kHz sine wave through PathSim with -% the ccir-poor model, enabling one path at a time. Because I'm too -% lazy to generate my own spreading signals - -Fc = 1000; Fs=8000; -fspread = fopen("../raw/sine1k_2Hz_spread.raw","rb"); -spread1k = fread(fspread, "int16")/10000; -fclose(fspread); -fspread = fopen("../raw/sine1k_2ms_delay_2Hz_spread.raw","rb"); -spread1k_2ms = fread(fspread, "int16")/10000; -fclose(fspread); - -% down convert to complex baseband - -spreadbb = spread1k.*exp(-j*(2*pi*Fc/Fs)*(1:length(spread1k))'); -spreadbb_2ms = spread1k_2ms.*exp(-j*(2*pi*Fc/Fs)*(1:length(spread1k_2ms))'); - -% remove -2000 Hz image - -b = fir1(50, 5/Fs); -spread = filter(b,1,spreadbb); -spread_2ms = filter(b,1,spreadbb_2ms); - -% discard first 1000 samples as these were near 0, probably as -% PathSim states were ramping up - -spread = spread(1000:length(spread)); -spread_2ms = spread_2ms(1000:length(spread_2ms)); - -hf_gain = 1.0/sqrt(var(spread)+var(spread_2ms)); - -% This function simulates the HF channel at 8kHz for real signals. A -% good use case is passing a vector of speech samples through it to -% simulate SSB over HF. There's a really good reason for the 300 - -% 3000 Hz filter that escapes me right now :-) - -function [sim_out snr3kHz_measured ] = hf_sim_real(sim_in, snr3kHz) - - % 300 - 3000 Hz filter - - b = fir1(100,[300/4000, 3000/4000], 'pass'); - - % det power of unit variance noise passed through this filter - - filter_var = var(filter(b,1,randn(1000,1))); - - % Start simulation - - s = hilbert(filter(b,1,sim_in)); - n1 = length(s); n2 = length(spread); - n = min(n1,n2); - path1 = s(1:n) .* spread(1:n); - path2 = s(1:n) .* spread_2ms(1:n); - delay = floor(0.002*Fs); - - combined = path1(delay+1:n) + path2(1:n-delay); - - snr = 10 .^ (snr3kHz/10); - variance = (combined'*combined)/(snr*n); - noise = sqrt(variance*0.5/filter_var)*(randn(n-delay,1) + j*randn(n-delay,1)); - filtered_noise = filter(b,1,noise); - - sim_out = real(combined+filtered_noise); - snr3kHz_measured = 10*log10(var(real(combined))/var(real(filtered_noise))); -endfunction - diff --git a/raw/700d_end_over.raw b/raw/700d_end_over.raw deleted file mode 100644 index 2fe5e770..00000000 Binary files a/raw/700d_end_over.raw and /dev/null differ diff --git a/raw/big_dog.raw b/raw/big_dog.raw deleted file mode 100644 index 17163645..00000000 Binary files a/raw/big_dog.raw and /dev/null differ diff --git a/raw/cq_ref.raw b/raw/cq_ref.raw deleted file mode 100644 index 485703d9..00000000 Binary files a/raw/cq_ref.raw and /dev/null differ diff --git a/raw/cross.raw b/raw/cross.raw deleted file mode 100644 index 1b2af6a9..00000000 Binary files a/raw/cross.raw and /dev/null differ diff --git a/raw/f2400.raw b/raw/f2400.raw deleted file mode 100644 index 5f4427f2..00000000 Binary files a/raw/f2400.raw and /dev/null differ diff --git a/raw/forig.raw b/raw/forig.raw deleted file mode 100644 index 4ba294d7..00000000 Binary files a/raw/forig.raw and /dev/null differ diff --git a/raw/g3plx.raw b/raw/g3plx.raw deleted file mode 100644 index 9970c3fb..00000000 Binary files a/raw/g3plx.raw and /dev/null differ diff --git a/raw/hts.raw b/raw/hts.raw deleted file mode 100644 index 79f869ad..00000000 Binary files a/raw/hts.raw and /dev/null differ diff --git a/raw/hts2.raw b/raw/hts2.raw deleted file mode 100644 index 0bb9df10..00000000 Binary files a/raw/hts2.raw and /dev/null differ diff --git a/raw/hts2a.raw b/raw/hts2a.raw deleted file mode 100644 index 6d9cf17b..00000000 Binary files a/raw/hts2a.raw and /dev/null differ diff --git a/raw/m2400.raw b/raw/m2400.raw deleted file mode 100644 index 1c0956da..00000000 Binary files a/raw/m2400.raw and /dev/null differ diff --git a/raw/mmt1.raw b/raw/mmt1.raw deleted file mode 100644 index 40638a5a..00000000 Binary files a/raw/mmt1.raw and /dev/null differ diff --git a/raw/morig.raw b/raw/morig.raw deleted file mode 100644 index 4af0e8f9..00000000 Binary files a/raw/morig.raw and /dev/null differ diff --git a/raw/sine1k_2Hz_spread.raw b/raw/sine1k_2Hz_spread.raw deleted file mode 100644 index 1b8ad9ca..00000000 Binary files a/raw/sine1k_2Hz_spread.raw and /dev/null differ diff --git a/raw/sine1k_2ms_delay_2Hz_spread.raw b/raw/sine1k_2ms_delay_2Hz_spread.raw deleted file mode 100644 index 4d3e09ec..00000000 Binary files a/raw/sine1k_2ms_delay_2Hz_spread.raw and /dev/null differ diff --git a/raw/speech_orig_16k.wav b/raw/speech_orig_16k.wav deleted file mode 100644 index 737d9a57..00000000 Binary files a/raw/speech_orig_16k.wav and /dev/null differ diff --git a/raw/vk5qi.raw b/raw/vk5qi.raw deleted file mode 100644 index fdfcd5d4..00000000 Binary files a/raw/vk5qi.raw and /dev/null differ diff --git a/wav/all.wav b/wav/all.wav deleted file mode 100644 index ba378380..00000000 Binary files a/wav/all.wav and /dev/null differ diff --git a/wav/big_dog.wav b/wav/big_dog.wav deleted file mode 100644 index 22100f42..00000000 Binary files a/wav/big_dog.wav and /dev/null differ diff --git a/wav/cross.wav b/wav/cross.wav deleted file mode 100644 index f9f2d046..00000000 Binary files a/wav/cross.wav and /dev/null differ diff --git a/wav/f2400.wav b/wav/f2400.wav deleted file mode 100644 index 35c41d9e..00000000 Binary files a/wav/f2400.wav and /dev/null differ diff --git a/wav/forig.wav b/wav/forig.wav deleted file mode 100644 index 81f3f9fc..00000000 Binary files a/wav/forig.wav and /dev/null differ diff --git a/wav/hts1a.wav b/wav/hts1a.wav deleted file mode 100644 index f6050891..00000000 Binary files a/wav/hts1a.wav and /dev/null differ diff --git a/wav/hts2a.wav b/wav/hts2a.wav deleted file mode 100644 index 644b5368..00000000 Binary files a/wav/hts2a.wav and /dev/null differ diff --git a/wav/m2400.wav b/wav/m2400.wav deleted file mode 100644 index a1fe1a5f..00000000 Binary files a/wav/m2400.wav and /dev/null differ diff --git a/wav/mmt1.wav b/wav/mmt1.wav deleted file mode 100644 index b0526cbd..00000000 Binary files a/wav/mmt1.wav and /dev/null differ diff --git a/wav/morig.wav b/wav/morig.wav deleted file mode 100644 index eaf52d18..00000000 Binary files a/wav/morig.wav and /dev/null differ diff --git a/wav/ve9qrp.wav b/wav/ve9qrp.wav deleted file mode 100644 index 38454a58..00000000 Binary files a/wav/ve9qrp.wav and /dev/null differ diff --git a/wav/vk5qi.wav b/wav/vk5qi.wav deleted file mode 100644 index b1aaed98..00000000 Binary files a/wav/vk5qi.wav and /dev/null differ