From df0e6e27061631cf7a6f920a118c3156d20b6ba4 Mon Sep 17 00:00:00 2001 From: drowe67 Date: Tue, 23 Jun 2015 07:29:36 +0000 Subject: [PATCH] normalised 700 and 1600 power git-svn-id: https://svn.code.sf.net/p/freetel/code@2212 01035d8c-6547-0410-b346-abe4f91aad63 --- codec2-dev/octave/tcohpsk.m | 4 ++-- codec2-dev/src/freedv_api.c | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/codec2-dev/octave/tcohpsk.m b/codec2-dev/octave/tcohpsk.m index 03eecace..dd64c9de 100644 --- a/codec2-dev/octave/tcohpsk.m +++ b/codec2-dev/octave/tcohpsk.m @@ -64,8 +64,8 @@ randn('state',1); % select which test ---------------------------------------------------------- -test = 'compare to c'; -%test = 'awgn'; +%test = 'compare to c'; +test = 'awgn'; %test = 'fading'; % some parameters that can be over ridden, e.g. to disable parts of modem diff --git a/codec2-dev/src/freedv_api.c b/codec2-dev/src/freedv_api.c index 1accad26..9c90b53e 100644 --- a/codec2-dev/src/freedv_api.c +++ b/codec2-dev/src/freedv_api.c @@ -10,7 +10,7 @@ TODO: [X] speex tx/rx works [X] txt messages - [ ] optional test tx framemode + [X] optional test tx framemode \*---------------------------------------------------------------------------*/ @@ -45,6 +45,9 @@ #include "freedv_api.h" #include "comp_prim.h" +#define NORM_PWR 1.74 /* experimentally derived fudge factor so 1600 and + 700 mode have the same tx power */ + /*---------------------------------------------------------------------------*\ FUNCTION....: freedv_open @@ -369,7 +372,7 @@ void freedv_comptx(struct freedv *f, COMP mod_out[], short speech_in[]) { if (f->clip) cohpsk_clip(tx_fdm); for(i=0; in_nom_modem_samples; i++) - mod_out[i] = fcmult(FDMDV_SCALE, tx_fdm[i]); + mod_out[i] = fcmult(FDMDV_SCALE*NORM_PWR, tx_fdm[i]); } } -- 2.25.1