From 5ef2d197577f6bf590be5a43feaf156fe264e627 Mon Sep 17 00:00:00 2001 From: baobrien Date: Fri, 11 Sep 2015 16:06:01 +0000 Subject: [PATCH] Started work on octave FSK modem git-svn-id: https://svn.code.sf.net/p/freetel/code@2308 01035d8c-6547-0410-b346-abe4f91aad63 --- codec2-dev/octave/fm.m | 9 +++++---- codec2-dev/src/fm_demod.c | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/codec2-dev/octave/fm.m b/codec2-dev/octave/fm.m index 50c4099f..772f1e2d 100644 --- a/codec2-dev/octave/fm.m +++ b/codec2-dev/octave/fm.m @@ -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 diff --git a/codec2-dev/src/fm_demod.c b/codec2-dev/src/fm_demod.c index 58a322a0..0141453b 100644 --- a/codec2-dev/src/fm_demod.c +++ b/codec2-dev/src/fm_demod.c @@ -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