Correct frequency scale for nes FFT length. (Still off by a bit??)

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2644 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2012-10-03 19:25:49 +00:00
parent 9375b9e9f2
commit 5c5a7770aa
5 changed files with 12 additions and 58 deletions

View File

@ -1,50 +0,0 @@
JTMS v3.0: Possible New Mode for Meteor Scatter
-----------------------------------------------
1. Transmitting
Messages are sent character-by character, 6 bits plus even parity.
Message length can be one of {5 7 9 11 13 17 19 23 29}; messages are
padded with blanks up to the next available length.
Modulation is BPSK at 2000 baud. The baseband waveform is built by
inserting a tapered sinc function for each bit, then multiplying by a
sine wave at frequency f0 = 10000.0/7 = 1428.57 Hz. At fsample=48000
Hz there are 24 samples per PSK symbol and 7*24=168 samples per
character. Carrier phase increment over one character is
f0*(168/48000) = 5 cycles, exactly.
2. Receiving
a. Pings are detected (or mouse-picked data is selected) as in
WSJT9. Pings can also be detected from the squared analytic
signal. Experience may tell which is better.
b. Compute real-to-complex FFT. Zap birdies, remove frequency
components outside the range 300 - 2700 Hz, and convert to analytic
time-domain signal. (analytic)
c. Square the complex signal, cx2=cx*cx, and compute FFT. Look for
carrier at frequency 3000 + 2*DF +/- 2*Tol. (msdf)
d. If carrier is found, measure frequency f and phase phi. Multiply
cx by exp(-twopi*i*f*t - phi) to recover the real baseband signal
x() to within a sign ambiguity. (tweak1)
e. Apply matched filter for the Tx pulse shape to x(). This is
essentially a rectangular BPF, -1000 to +1000 Hz ? (Or convolve
with the generated PSK pulse shape, the tapered sinc() function.)
f. Establish symbol and character sync by cross-correlating with
conjg(cwb), where cwb is the baseband PSK waveform for the
<space> character.
g. Find message length by computing ACF (of what? cdat? soft
symbol values?)
h. Decode the message by cross-correlating character-length segments
of cdat against complex waveforms for each possible character.
i. If msglen is established and long enough, try folding the data and
determining best-fit characters as above.

View File

@ -335,7 +335,7 @@ void MainWindow::dataSink(int k)
lab4->setText(t);
ui->xThermo->setValue((double)px); //Update the thermometer
if(m_monitoring || m_diskData) {
g_pWideGraph->dataSink2(s,ihsym,m_diskData,lstrong);
g_pWideGraph->dataSink2(s,df3,ihsym,m_diskData,lstrong);
}
//Average over specified number of spectra

View File

@ -152,8 +152,8 @@ void CPlotter::UTCstr()
{
int ihr,imin,isec;
if(jt9com_.ndiskdat != 0) {
ihr=jt9com_.nutc/10000;
imin=(jt9com_.nutc/100) % 100;
ihr=jt9com_.nutc/100;
imin=jt9com_.nutc % 100;
} else {
qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000;
imin=ms/60000;
@ -241,7 +241,6 @@ void CPlotter::DrawOverlay() //DrawOverlay()
painter0.setFont(Font);
painter0.setPen(Qt::black);
m_fftBinWidth=12000.0/m_nsps;
if(m_binsPerPixel < 1) m_binsPerPixel=1;
m_fSpan = w*df;
int n=m_fSpan/10;
@ -579,6 +578,11 @@ double CPlotter::fGreen()
void CPlotter::setNsps(int n) //setNSpan()
{
m_nsps=n;
m_fftBinWidth=1500.0/1024.0;
if(m_nsps==15360) m_fftBinWidth=1500.0/2048.0;
if(m_nsps==40960) m_fftBinWidth=1500.0/6144.0;
if(m_nsps==82944) m_fftBinWidth=1500.0/12288.0;
if(m_nsps==252000) m_fftBinWidth=1500.0/32768.0;
DrawOverlay(); //Redraw scales and ticks
update(); //trigger a new paintEvent}
}

View File

@ -65,19 +65,19 @@ void WideGraph::saveSettings()
settings.endGroup();
}
void WideGraph::dataSink2(float s[], int ihsym, int ndiskdata,
void WideGraph::dataSink2(float s[], float df3, int ihsym, int ndiskdata,
uchar lstrong[])
{
static float splot[NSMAX];
float swide[2048];
float smax;
double df;
// double df;
int nbpp = ui->widePlot->binsPerPixel();
static int n=0;
static int nkhz0=-999;
static int ntr0=0;
df = 12000.0/m_nsps;
// df = 12000.0/m_nsps;
//Average spectra over specified number, m_waterfallAvg
if (n==0) {

View File

@ -16,7 +16,7 @@ public:
double m_dialFreq;
void dataSink2(float s[], int ihsym, int ndiskdata,
void dataSink2(float s[], float df3, int ihsym, int ndiskdata,
uchar lstrong[]);
int QSOfreq();
int nSpan();