Implement NB=-1%, NB=-2%. Fix a startup problem with WideGraps's fMax value.

This commit is contained in:
Joe Taylor 2020-09-18 11:30:23 -04:00
parent 375a869a51
commit 52bdd57e57
4 changed files with 310 additions and 302 deletions

View File

@ -226,22 +226,25 @@ contains
ndropmax=1
single_decode=iand(nexp_decode,32).ne.0
npct=0
nb=nexp_decode/256 - 2
if(nb.ge.0) npct=nb
inb0=0
inb1=0
if((single_decode .or. lagain) .and. (ntol.le.20 .or. iwspr.ne.0)) then
inb1=20
inb2=5
if(nb.eq.-1) then
inb2=5 !Try NB = 0, 5, 10, 15, 20%
else if(nb.eq.-2) then
inb2=2 !Try NB = 0, 2, 4,... 20%
else
ipct(0)=nexp_decode/256
inb1=0 !Fixed NB value, 0 to 25%
ipct(0)=npct
endif
ndecodes=0
decodes=' '
do inb=inb0,inb1,2
! npct=ipct(inb)
do inb=inb0,inb1,inb2
npct=inb
write(*,3001) inb,inb1,lagain,single_decode,npct,ntol
3001 format(2i4,2L3,2i5)
call blanker(iwave,nfft1,ndropmax,npct,c_bigfft)
! The big fft is done once and is used for calculating the smoothed spectrum
@ -277,6 +280,8 @@ contains
fc2=0.
do icand=1,ncand
fc0=candidates0(icand,1)
if(iwspr.eq.0 .and. nb.lt.0 .and. &
abs(fc0-(nfqso+1.5*baud)).gt.ntol) cycle
detmet=candidates0(icand,2)
! Downconvert and downsample a slice of the spectrum centered on the
@ -345,14 +350,12 @@ contains
endif
xsnr=0.
!write(*,*) 'ncand ',ncand
do icand=1,ncand
sync=candidates(icand,2)
fc_synced=candidates(icand,3)
isbest=nint(candidates(icand,4))
xdt=(isbest-nspsec)/fs2
if(ntrperiod.eq.15) xdt=(isbest-real(nspsec)/2.0)/fs2
! write(*,*) icand,sync,fc_synced,isbest,xdt
call timer('dwnsmpl ',0)
call fst4_downsample(c_bigfft,nfft1,ndown,fc_synced,sigbw,c2)
call timer('dwnsmpl ',1)

View File

@ -3127,7 +3127,7 @@ void MainWindow::decode() //decode()
dec_data.params.nexp_decode = static_cast<int> (m_config.special_op_id());
if(m_config.single_decode()) dec_data.params.nexp_decode += 32;
if(m_config.enable_VHF_features()) dec_data.params.nexp_decode += 64;
if(m_mode.startsWith("FST4")) dec_data.params.nexp_decode += 256*ui->sbNB->value();
if(m_mode.startsWith("FST4")) dec_data.params.nexp_decode += 256*(ui->sbNB->value()+2);
::memcpy(dec_data.params.datetime, m_dateTime.toLatin1()+" ", sizeof dec_data.params.datetime);
::memcpy(dec_data.params.mycall, (m_config.my_callsign()+" ").toLatin1(), sizeof dec_data.params.mycall);
@ -4241,7 +4241,7 @@ void MainWindow::guiUpdate()
//Once per second (onesec)
if(nsec != m_sec0) {
// qDebug() << "AAA" << nsec;
if(m_mode=="FST4") chk_FST4_freq_range();
if(m_mode=="FST4" and m_bOK_to_chk) chk_FST4_freq_range();
m_currentBand=m_config.bands()->find(m_freqNominal);
if( SpecOp::HOUND == m_config.special_op_id() ) {
qint32 tHound=QDateTime::currentMSecsSinceEpoch()/1000 - m_tAutoOn;
@ -5931,9 +5931,6 @@ void MainWindow::on_actionFST4_triggered()
ui->sbFtol->setValue(20);
}
setup_status_bar(false);
ui->sbTR->values ({15, 30, 60, 120, 300, 900, 1800});
on_sbTR_valueChanged (ui->sbTR->value());
chk_FST4_freq_range();
ui->cbAutoSeq->setChecked(true);
m_wideGraph->setMode(m_mode);
m_wideGraph->setModeTx(m_modeTx);
@ -5942,9 +5939,13 @@ void MainWindow::on_actionFST4_triggered()
m_wideGraph->setTol(ui->sbFtol->value());
m_wideGraph->setTxFreq(ui->TxFreqSpinBox->value());
m_wideGraph->setFST4_FreqRange(ui->sbF_Low->value(),ui->sbF_High->value());
chk_FST4_freq_range();
switch_mode (Modes::FST4);
m_wideGraph->setMode(m_mode);
ui->sbTR->values ({15, 30, 60, 120, 300, 900, 1800});
on_sbTR_valueChanged (ui->sbTR->value());
statusChanged();
m_bOK_to_chk=true;
}
void MainWindow::on_actionFST4W_triggered()
@ -7528,7 +7529,7 @@ void MainWindow::on_sbTR_valueChanged(int value)
m_wideGraph->setPeriod (value, m_nsps);
progressBar.setMaximum (value);
}
if(m_mode=="FST4") chk_FST4_freq_range();
if(m_mode=="FST4" and m_bOK_to_chk) chk_FST4_freq_range();
if(m_monitoring) {
on_stopButton_clicked();
on_monitorButton_clicked(true);

View File

@ -527,6 +527,7 @@ private:
bool m_bWarnedSplit=false;
bool m_bTUmsg;
bool m_bBestSPArmed=false;
bool m_bOK_to_chk=false;
enum
{

View File

@ -1018,28 +1018,6 @@ When not checked you can view the calibration results.</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="sbF_Low">
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="prefix">
<string>F Low </string>
</property>
<property name="minimum">
<number>100</number>
</property>
<property name="maximum">
<number>5000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>600</number>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="sbF_High">
<property name="alignment">
@ -1065,6 +1043,53 @@ When not checked you can view the calibration results.</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="sbF_Low">
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="prefix">
<string>F Low </string>
</property>
<property name="minimum">
<number>100</number>
</property>
<property name="maximum">
<number>5000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>600</number>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QSpinBox" name="RxFreqSpinBox">
<property name="toolTip">
<string>Audio Rx frequency</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="suffix">
<string> Hz</string>
</property>
<property name="prefix">
<string>Rx </string>
</property>
<property name="minimum">
<number>200</number>
</property>
<property name="maximum">
<number>5000</number>
</property>
<property name="value">
<number>1500</number>
</property>
</widget>
</item>
<item row="4" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
@ -1153,31 +1178,6 @@ When not checked you can view the calibration results.</string>
</item>
</layout>
</item>
<item row="5" column="0">
<widget class="QSpinBox" name="RxFreqSpinBox">
<property name="toolTip">
<string>Audio Rx frequency</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="suffix">
<string> Hz</string>
</property>
<property name="prefix">
<string>Rx </string>
</property>
<property name="minimum">
<number>200</number>
</property>
<property name="maximum">
<number>5000</number>
</property>
<property name="value">
<number>1500</number>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QSpinBox" name="rptSpinBox">
<property name="toolTip">
@ -2470,6 +2470,9 @@ Yellow when too low</string>
<property name="prefix">
<string>NB </string>
</property>
<property name="minimum">
<number>-2</number>
</property>
<property name="maximum">
<number>25</number>
</property>