From 37f7ffe23e3d7fd78991f851eda70852036c6d0c Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 12 Nov 2012 21:30:00 +0000 Subject: [PATCH] Calibrate the S/N generated by putting "#-27", etc., into the Tx6 message. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2722 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 2 +- soundout.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 69a1f1599..9fa1ff6ba 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,4 +1,4 @@ -//--------------------------------------------------------------- MainWindow +//-------------------------------------------------------------- MainWindow #include "mainwindow.h" #include "ui_mainwindow.h" #include "devsetup.h" diff --git a/soundout.cpp b/soundout.cpp index 355c5b3ce..ad5646518 100644 --- a/soundout.cpp +++ b/soundout.cpp @@ -57,7 +57,7 @@ extern "C" int d2aCallback(const void *inputBuffer, void *outputBuffer, freq=udata->ntxfreq + itone[isym]*baud; dphi=twopi*freq/48000.0; if(udata->txsnrdb < 0.0) { - snr=pow(10.0,0.05*(udata->txsnrdb-1.0)); + snr=pow(10.0,0.05*(udata->txsnrdb-6.0)); fac=3000.0; if(snr>1.0) fac=3000.0/snr; } @@ -66,7 +66,6 @@ extern "C" int d2aCallback(const void *inputBuffer, void *outputBuffer, phi += dphi; if(phi>twopi) phi -= twopi; i2=32767.0*sin(phi); -// i2 = 500.0*(i2/32767.0 + 5.0*gran()); //Add noise (tests only!) if(udata->txsnrdb < 0.0) { int i4=fac*(gran() + i2*snr/32768.0); if(i4>32767) i4=32767;