From c98ef04bd9a9ccf6d1116cc1c348ce97cbad2b42 Mon Sep 17 00:00:00 2001 From: drowe67 Date: Mon, 19 Jan 2015 19:36:09 +0000 Subject: [PATCH] works for a range of sample clock offsets, +/- 500ppm git-svn-id: https://svn.code.sf.net/p/freetel/code@2015 01035d8c-6547-0410-b346-abe4f91aad63 --- codec2-dev/octave/gmsk.m | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/codec2-dev/octave/gmsk.m b/codec2-dev/octave/gmsk.m index c628af03..80733202 100644 --- a/codec2-dev/octave/gmsk.m +++ b/codec2-dev/octave/gmsk.m @@ -6,16 +6,16 @@ % [X] plot eye diagram % [X] BER curves with reas match to theoretical % [X] fine timing estimator -% [ ] test with sox based fine timing error +% [X] test with fine timing error by resampling % [X] phase/freq estimator % + need initial acquisition and tracking -% [ ] auto test with different freq offsets -% [ ] coarse timing estimator (sync up to known test frames) -% [ ] auto test with different coarse timing offsets +% [X] test with different freq offsets +% [X] coarse timing estimator (sync up to known test frames) +% [X] test with different coarse timing offsets % [ ] file read/write interface % [ ] modify for 1200 bit/s (or any) operation, ie GMSK filter coeff generation % or re-sampling - +% [ ] way to measure input SNR to demod % Filter coeffs From: % https://github.com/on1arf/gmsk/blob/master/gmskmodem_codec2/API/a_dspstuff.h, @@ -553,9 +553,10 @@ function run_test_freq_offset verbose = 1; aEbNodB = 6; phase_offset = 0; - freq_offset = -10.5; - timing_offset = 11128; - nsym = 4800*2; + freq_offset = 1025.3; + timing_offset = 1207; + sample_clock_offset_ppm = 500; + nsym = 4800*4; npreamble = 480; gmsk_states.coherent_demod = 1; @@ -581,6 +582,8 @@ function run_test_freq_offset end [tx tx_filt tx_symbols] = gmsk_mod(gmsk_states, tx_bits); + + tx = resample(tx, 1E6, 1E6-sample_clock_offset_ppm); tx = [zeros(1,timing_offset) tx]; nsam = length(tx); -- 2.25.1