예제 #1
0
        public void ProcessData(double[] iSamples, double[] qSamples, int spectPart, double baseAmp)
        {
            FpsBlocksReceived++;

            /* TODO: waterfall display sometimes holds "EnoughData" and doesnt reset */
            if (FFTDisplay.EnoughData && WaterfallDisplay.EnoughData)
            {
                return;
            }

            FpsBlocksProcessed++;

            lock (FFTLock)
            {
                int samplePairs = iSamples.Length;

                for (int samplePair = 0; samplePair < samplePairs; samplePair++)
                {
                    double I = iSamples[samplePair];
                    double Q = qSamples[samplePair];

                    FFT.AddSample(I, Q);

                    if (FFT.ResultAvailable)
                    {
                        FFT.GetResultSquared(FFTResult);

                        ReceiverCorrection.ApplyCorrectionTable(FFTResult);
                        FilterCorrection.ApplyCorrectionTable(FFTResult);

                        Remote.ProcessData(FFTResult);

                        if (FitSpectrumEnabled)
                        {
                            CenterCut((int)(FitSpectrumWidth * FFTSize));
                            FFTDisplay.ProcessFFTData(FFTResultPartial, spectPart, baseAmp);
                            WaterfallDisplay.ProcessFFTData(FFTResultPartial, spectPart, baseAmp);
                        }
                        else
                        {
                            FFTDisplay.ProcessFFTData(FFTResult, spectPart, baseAmp);
                            WaterfallDisplay.ProcessFFTData(FFTResult, spectPart, baseAmp);
                        }
                    }
                }
            }
        }
예제 #2
0
        public void ProcessSample(double I, double Q, int spectPart, int spectParts, double baseAmp)
        {
            lock (FFTLock)
            {
                FFT.AddSample(I, Q);

                if (FFT.ResultAvailable)
                {
                    FFT.GetResultSquared(FFTResult);

                    ReceiverCorrection.ApplyCorrectionTable(FFTResult);
                    FilterCorrection.ApplyCorrectionTable(FFTResult);

                    FFTDisplay.ProcessFFTData(FFTResult, spectPart, baseAmp);
                    WaterfallDisplay.ProcessFFTData(FFTResult, spectPart, baseAmp);
                }
            }
        }