% note for reasons unknown LdpcEncode() returns garbage if we use > 0.5 rather than round()
tx_data_bits = round(rand(1,Nbits*rate));
+ %test_bits_ofdm_file(tx_data_bits);
tx_bits = []; tx_symbols = [];
for f=1:Nframes
sim_in.Tcp = 0.002;
sim_in.Rs = 1/Ts; sim_in.bps = 2; sim_in.Nc = 16; sim_in.Ns = 8;
- %sim_in.Nsec = 2*(sim_in.Ns+1)/sim_in.Rs; % one frame
- sim_in.Nsec = 50;
+ sim_in.Nsec = (sim_in.Ns+1)/sim_in.Rs; % one frame, make sure sim_in.interleave_frames = 1
+ %sim_in.Nsec = 1;
sim_in.EbNodB = EbNodB;
- sim_in.verbose = 1;
- sim_in.hf_en = 1;
+ sim_in.verbose = 2;
+ sim_in.hf_en = 0;
sim_in.foff_hz = 0;
- sim_in.dfoff_hz_per_sec = 0.02;
+ sim_in.dfoff_hz_per_sec = 0.00;
sim_in.sample_clock_offset_ppm = 0;
sim_in.timing_en = 1;
sim_in.ldpc_code = HRA_112_112;
sim_in.ldpc_en = 1;
- sim_in.interleave_frames = 32;
+ sim_in.interleave_frames = 1;
%sim_in.diversity_en = 1;
init_cml('/home/david/Desktop/cml/');
-%run_single(6)
-run_curves
+run_single(6)
+%run_curves
%run_curves_estimators
%acquisition_histograms
%acquisition_test
#{
Library of functions that implement a BPSK/QPSK OFDM modem. Rate Fs
verison of ofdm_rs.m with OFDM based up and down conversion, and all
- those nasty real-world details like fine freq, timing.
-
-
+ those nasty real-world details like fine freq, timing.
#}
states.foff_est_hz = foff_est_hz;
endfunction
+
+% Save test bits frame to a text file in the form of a C array
+
+function test_bits_ofdm_file(test_bits_ofdm)
+
+ f=fopen("../src/test_bits_ofdm.h","wt");
+ fprintf(f,"/* Generated by test_bits_ofdm_file() Octave function */\n\n");
+ fprintf(f,"const int test_bits_ofdm[]={\n");
+ for m=1:length(test_bits_ofdm)-1
+ fprintf(f," %d,\n",test_bits_ofdm(m));
+ endfor
+ fprintf(f," %d\n};\n",test_bits_ofdm(length(test_bits_ofdm)));
+ fclose(f);
+
+endfunction
--- /dev/null
+/* Generated by test_bits_ofdm_file() Octave function */
+
+const int test_bits_ofdm[]={
+ 1,
+ 1,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 0,
+ 1,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 0,
+ 1,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 0,
+ 1,
+ 0,
+ 1,
+ 0,
+ 1,
+ 1,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ 1,
+ 0,
+ 1,
+ 0,
+ 1,
+ 1,
+ 1,
+ 0,
+ 1,
+ 0,
+ 1,
+ 0,
+ 1,
+ 1,
+ 0,
+ 1,
+ 1,
+ 0,
+ 1,
+ 0,
+ 0,
+ 1,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 0
+};