normalised 700 and 1600 power
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 23 Jun 2015 07:29:36 +0000 (07:29 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 23 Jun 2015 07:29:36 +0000 (07:29 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@2212 01035d8c-6547-0410-b346-abe4f91aad63

codec2-dev/octave/tcohpsk.m
codec2-dev/src/freedv_api.c

index 03eecacea16f1f68d5bee1d72cfd7fd9455c7d96..dd64c9de2f93761a7b5540116ac8b6d9bfc3b375 100644 (file)
@@ -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
index 1accad2692a3552797d9c7ee6931913a89315aca..9c90b53eacb815c72ed09e8fb70596e75fbaf04b 100644 (file)
@@ -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; i<f->n_nom_modem_samples; i++)
-            mod_out[i] = fcmult(FDMDV_SCALE, tx_fdm[i]);
+            mod_out[i] = fcmult(FDMDV_SCALE*NORM_PWR, tx_fdm[i]);
     }
 }