From 147995f0cfe6347c4841700a79d9566232af2e81 Mon Sep 17 00:00:00 2001 From: drowe67 Date: Wed, 12 Jul 2017 05:28:00 +0000 Subject: [PATCH] testing ofdm modem freq offset git-svn-id: https://svn.code.sf.net/p/freetel/code@3297 01035d8c-6547-0410-b346-abe4f91aad63 --- codec2-dev/octave/tofdm.m | 3 ++- codec2-dev/unittest/tofdm.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/codec2-dev/octave/tofdm.m b/codec2-dev/octave/tofdm.m index 6a650c64..73b99fea 100644 --- a/codec2-dev/octave/tofdm.m +++ b/codec2-dev/octave/tofdm.m @@ -7,6 +7,7 @@ Nframes = 30; sample_clock_offset_ppm = 100; +foff_hz = 0.5; more off; format; ofdm_lib; @@ -34,7 +35,7 @@ end % Channel simulation ---------------------------------------------- rx_log = sample_clock_offset(tx_log, sample_clock_offset_ppm); -rx_log = freq_shift(rx_log, .01, Fs); +rx_log = freq_shift(rx_log, foff_hz, Fs); % Rx --------------------------------------------------------------- diff --git a/codec2-dev/unittest/tofdm.c b/codec2-dev/unittest/tofdm.c index 496552a0..115a86e3 100644 --- a/codec2-dev/unittest/tofdm.c +++ b/codec2-dev/unittest/tofdm.c @@ -1,6 +1,6 @@ /*---------------------------------------------------------------------------*\ - FILE........: tcohpsk.c + FILE........: tofdm.c AUTHORS.....: David Rowe & Steve Sampson DATE CREATED: June 2017 @@ -43,6 +43,7 @@ #define NFRAMES 30 #define SAMPLE_CLOCK_OFFSET_PPM 100 +#define FOFF_HZ 0.5f /*---------------------------------------------------------------------------*\ @@ -171,10 +172,9 @@ int main(int argc, char *argv[]) fs_offset(rx_log, tx_log, samples_per_frame*NFRAMES, SAMPLE_CLOCK_OFFSET_PPM); - float foff = 0.01f; COMP foff_phase_rect = {1.0f, 0.0f}; - freq_shift(rx_log, rx_log, foff, &foff_phase_rect, samples_per_frame * NFRAMES); + freq_shift(rx_log, rx_log, FOFF_HZ, &foff_phase_rect, samples_per_frame * NFRAMES); /* --------------------------------------------------------*\ Demod -- 2.25.1