Started work on octave FSK modem
authorbaobrien <baobrien@01035d8c-6547-0410-b346-abe4f91aad63>
Fri, 11 Sep 2015 16:06:01 +0000 (16:06 +0000)
committerbaobrien <baobrien@01035d8c-6547-0410-b346-abe4f91aad63>
Fri, 11 Sep 2015 16:06:01 +0000 (16:06 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@2308 01035d8c-6547-0410-b346-abe4f91aad63

codec2-dev/octave/fm.m
codec2-dev/src/fm_demod.c

index 50c4099f8632f2efe9e5d7805be615050dde14e1..772f1e2d43b6f0c7c0c1bcc30f358e4270d501c1 100644 (file)
@@ -416,7 +416,8 @@ function test_fm_modulator
   fm_states.Fs = 48000;  
   fm_states.fm_max = 3E3;
   fm_states.fd = 5E3;
-  fm_states.fc = fm_states.Fs/4;
+  %fm_states.fc = fm_states.Fs/4;
+  fm_states.fc = 0;   
 
   fm_states.pre_emp = 0;
   fm_states.de_emp  = 0;
@@ -452,8 +453,8 @@ function test_fm_modulator
   size(test_mod)
   mod_diff = zeros(1,length(test_mod));
   mod_diff = test_mod .- comp_mod;
-  plot(real(mod_diff),test_t,imag(mod_diff),test_t);
-  
+  plot(test_t,real(test_mod .- comp_mod),test_t,imag(test_mod .- comp_mod));
+
 endfunction
 
 more off;
@@ -464,4 +465,4 @@ more off;
 %run_fm_single
 %make_coeff_file
 %fm_mod_file("fm_1000.raw");
-test_fm_modulator
+%test_fm_modulator
index 58a322a066ae7558beb0ac394dd099ec1c84bf3d..0141453b0c1f953dd64ff0a0f1d001411c836a5f 100644 (file)
@@ -74,7 +74,7 @@ int main(int argc, char *argv[])
     fm->Fs     = 48000.0;
     fm->fm_max = 3000.0;
     fm->fd     = 5000.0;
-    fm->fc     = fm->Fs/4;
+    fm->fc     = 0;
 
     while(fread(buf, sizeof(short), N, fin) == N) {
        for(i=0; i<N; i++) {