37 m_deviceAPI(deviceAPI),
39 m_settingsMutex(QMutex::Recursive)
78 void ChannelAnalyzer::feed(
const SampleVector::const_iterator& begin,
const SampleVector::const_iterator& end,
bool positiveOnly)
86 for(SampleVector::const_iterator it = begin; it < end; ++it)
88 Complex c(it->real(), it->imag());
133 for (
int i = 0;
i < n_out;
i++)
147 std::complex<float> mix;
185 qDebug() <<
"ChannelAnalyzer::handleMessage: DownChannelizer::MsgChannelizerNotification:" 202 qDebug() <<
"ChannelAnalyzer::handleMessage: MsgConfigureChannelizer:" 214 qDebug(
"ChannelAnalyzer::handleMessage: MsgConfigureChannelAnalyzer");
238 qDebug() <<
"ChannelAnalyzer::applyChannelSettings:" 239 <<
" inputSampleRate: " << inputSampleRate
240 <<
" inputFrequencyOffset: " << inputFrequencyOffset;
272 qDebug(
"ChannelAnalyzer::setFilters: sampleRate: %d bandwidth: %f lowCutoff: %f",
273 sampleRate, bandwidth, lowCutoff);
277 bandwidth = -bandwidth;
278 lowCutoff = -lowCutoff;
286 if (bandwidth < 100.0f)
299 qDebug() <<
"ChannelAnalyzer::applySettings:" 302 <<
" m_rcc: " << settings.
m_rrc 307 <<
" m_ssb: " << settings.
m_ssb 308 <<
" m_pll: " << settings.
m_pll 309 <<
" m_fll: " << settings.
m_fll 368 if (settings.
m_fll) {
virtual void feed(const SampleVector::const_iterator &begin, const SampleVector::const_iterator &end, bool positiveOnly)
bool decimate(Real *distance, const Complex &next, Complex *result)
void configure(MessageQueue *messageQueue, int sampleRate, int centerFrequency)
void push(Message *message, bool emitSignal=true)
Push message onto queue.
DownChannelizer * m_channelizer
void removeChannelSinkAPI(ChannelAPI *channelAPI, int streamIndex=0)
void addChannelSinkAPI(ChannelAPI *channelAPI, int streamIndex=0)
void create(int phaseSteps, double sampleRate, double cutoff, double nbTapsPerPhase=4.5)
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
MovingAverageUtil< double, double, 480 > m_channelPowerAvg
Real m_interpolatorDistanceRemain
virtual bool handleMessage(const Message &cmd)
Processing of a message. Returns true if message has actually been processed.
int runFilt(const cmplx &in, cmplx **out)
int getSampleRate() const
unsigned int m_pllPskOrder
void applyChannelSettings(int inputSampleRate, int inputFrequencyOffset, bool force=false)
static MsgReportChannelSampleRateChanged * create()
virtual void feed(const SampleVector::const_iterator &begin, const SampleVector::const_iterator &end, bool positiveOnly)=0
std::complex< float > cmplx
Complex nextIQ()
Return next complex sample.
SampleVector m_sampleBuffer
virtual ~ChannelAnalyzer()
static const QString m_channelId
const std::complex< float > & getComplex() const
Real getPllFrequency() const
#define MESSAGE_CLASS_DEFINITION(Name, BaseClass)
void create_filter(float f1, float f2)
void applySettings(const ChannelAnalyzerSettings &settings, bool force=false)
quint32 m_rrcRolloff
in 100ths
int m_inputFrequencyOffset
void feedOneSample(const fftfilt::cmplx &s, const fftfilt::cmplx &pll)
static bool match(const Message *message)
Interpolator m_interpolator
void processOneSample(Complex &c, fftfilt::cmplx *sideband)
void removeChannelSink(ThreadedBasebandSampleSink *sink, int streamIndex=0)
Remove a channel sink (Rx)
MessageQueue * getMessageQueueToGUI()
const std::complex< float > & getComplex() const
BasebandSampleSink * m_sampleSink
void addChannelSink(ThreadedBasebandSampleSink *sink, int streamIndex=0)
Add a channel sink (Rx)
void create_rrc_filter(float fb, float a)
root raised cosine. fb is half the band pass
ThreadedBasebandSampleSink * m_threadedChannelizer
int runSSB(const cmplx &in, cmplx **out, bool usb, bool getDC=true)
void setFreq(Real freq, Real sampleRate)
void feed(float re, float im)
Real m_interpolatorDistance
ChannelAnalyzerSettings m_settings
void computeCoefficients(Real wn, Real zeta, Real K)
void setPskOrder(unsigned int order)
std::complex< Real > Complex
static const QString m_channelIdURI
qint64 getFrequencyOffset() const
int runDSB(const cmplx &in, cmplx **out, bool getDC=true)
void setSampleRate(unsigned int sampleRate)
void feed(float re, float im)
void create_dsb_filter(float f2)
void setSampleRate(unsigned int sampleRate)
void setFilters(int sampleRate, float bandwidth, float lowCutoff)
ChannelAnalyzer(DeviceAPI *deviceAPI)