mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-21 19:55:20 -05:00
Option to select "Low sidelobes" or "Most sensitive" for waterfall spectra.
This commit is contained in:
parent
ec2d5b6233
commit
fdfb655b06
@ -630,6 +630,7 @@ private:
|
||||
bool udpWindowToFront_;
|
||||
bool udpWindowRestore_;
|
||||
DataMode data_mode_;
|
||||
bool bLowSidelobes_;
|
||||
bool pwrBandTxMemory_;
|
||||
bool pwrBandTuneMemory_;
|
||||
|
||||
@ -720,6 +721,7 @@ bool Configuration::accept_udp_requests () const {return m_->accept_udp_requests
|
||||
QString Configuration::n1mm_server_name () const {return m_->n1mm_server_name_;}
|
||||
auto Configuration::n1mm_server_port () const -> port_type {return m_->n1mm_server_port_;}
|
||||
bool Configuration::broadcast_to_n1mm () const {return m_->broadcast_to_n1mm_;}
|
||||
bool Configuration::lowSidelobes() const {return m_->bLowSidelobes_;}
|
||||
bool Configuration::udpWindowToFront () const {return m_->udpWindowToFront_;}
|
||||
bool Configuration::udpWindowRestore () const {return m_->udpWindowRestore_;}
|
||||
Bands * Configuration::bands () {return &m_->bands_;}
|
||||
@ -1285,6 +1287,8 @@ void Configuration::impl::initialize_models ()
|
||||
ui_->udpWindowRestore->setChecked(udpWindowRestore_);
|
||||
ui_->calibration_intercept_spin_box->setValue (calibration_.intercept);
|
||||
ui_->calibration_slope_ppm_spin_box->setValue (calibration_.slope_ppm);
|
||||
ui_->rbLowSidelobes->setChecked(bLowSidelobes_);
|
||||
if(!bLowSidelobes_) ui_->rbMaxSensitivity->setChecked(true);
|
||||
|
||||
if (rig_params_.ptt_port.isEmpty ())
|
||||
{
|
||||
@ -1476,6 +1480,7 @@ void Configuration::impl::read_settings ()
|
||||
rig_params_.audio_source = settings_->value ("TXAudioSource", QVariant::fromValue (TransceiverFactory::TX_audio_source_front)).value<TransceiverFactory::TXAudioSource> ();
|
||||
rig_params_.ptt_port = settings_->value ("PTTport").toString ();
|
||||
data_mode_ = settings_->value ("DataMode", QVariant::fromValue (data_mode_none)).value<Configuration::DataMode> ();
|
||||
bLowSidelobes_ = settings_->value("LowSidelobes",true).toBool();
|
||||
prompt_to_log_ = settings_->value ("PromptToLog", false).toBool ();
|
||||
autoLog_ = settings_->value ("AutoLog", false).toBool ();
|
||||
decodes_from_top_ = settings_->value ("DecodesFromTop", false).toBool ();
|
||||
@ -1577,6 +1582,7 @@ void Configuration::impl::write_settings ()
|
||||
settings_->setValue ("CATStopBits", QVariant::fromValue (rig_params_.stop_bits));
|
||||
settings_->setValue ("CATHandshake", QVariant::fromValue (rig_params_.handshake));
|
||||
settings_->setValue ("DataMode", QVariant::fromValue (data_mode_));
|
||||
settings_->setValue ("LowSidelobes",bLowSidelobes_);
|
||||
settings_->setValue ("PromptToLog", prompt_to_log_);
|
||||
settings_->setValue ("AutoLog", autoLog_);
|
||||
settings_->setValue ("DecodesFromTop", decodes_from_top_);
|
||||
@ -2035,6 +2041,7 @@ void Configuration::impl::accept ()
|
||||
watchdog_ = ui_->tx_watchdog_spin_box->value ();
|
||||
TX_messages_ = ui_->TX_messages_check_box->isChecked ();
|
||||
data_mode_ = static_cast<DataMode> (ui_->TX_mode_button_group->checkedId ());
|
||||
bLowSidelobes_ = ui_->rbLowSidelobes->isChecked();
|
||||
save_directory_ = ui_->save_path_display_label->text ();
|
||||
azel_directory_ = ui_->azel_path_display_label->text ();
|
||||
enable_VHF_features_ = ui_->enable_VHF_features_check_box->isChecked ();
|
||||
|
@ -137,6 +137,7 @@ public:
|
||||
bool twoPass() const;
|
||||
bool bFox() const;
|
||||
bool bHound() const;
|
||||
bool bLowSidelobes() const;
|
||||
bool x2ToneSpacing() const;
|
||||
bool x4ToneSpacing() const;
|
||||
bool MyDx() const;
|
||||
@ -152,6 +153,7 @@ public:
|
||||
port_type n1mm_server_port () const;
|
||||
bool valid_n1mm_info () const;
|
||||
bool broadcast_to_n1mm() const;
|
||||
bool lowSidelobes() const;
|
||||
bool accept_udp_requests () const;
|
||||
bool udpWindowToFront () const;
|
||||
bool udpWindowRestore () const;
|
||||
|
@ -17,7 +17,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="configuration_tabs">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>7</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="general_tab">
|
||||
<attribute name="title">
|
||||
@ -2821,6 +2821,48 @@ Right click for insert and delete options.</string>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_7">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Waterfall spectra</string>
|
||||
</property>
|
||||
<widget class="QRadioButton" name="rbLowSidelobes">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>20</y>
|
||||
<width>91</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Low sidelobes</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QRadioButton" name="rbMaxSensitivity">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>20</y>
|
||||
<width>92</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Most sensitive</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -3036,13 +3078,13 @@ Right click for insert and delete options.</string>
|
||||
</connection>
|
||||
</connections>
|
||||
<buttongroups>
|
||||
<buttongroup name="CAT_data_bits_button_group"/>
|
||||
<buttongroup name="special_op_activity_button_group"/>
|
||||
<buttongroup name="PTT_method_button_group"/>
|
||||
<buttongroup name="TX_audio_source_button_group"/>
|
||||
<buttongroup name="TX_mode_button_group"/>
|
||||
<buttongroup name="split_mode_button_group"/>
|
||||
<buttongroup name="CAT_stop_bits_button_group"/>
|
||||
<buttongroup name="special_op_activity_button_group"/>
|
||||
<buttongroup name="TX_mode_button_group"/>
|
||||
<buttongroup name="CAT_data_bits_button_group"/>
|
||||
<buttongroup name="TX_audio_source_button_group"/>
|
||||
<buttongroup name="CAT_handshake_button_group"/>
|
||||
<buttongroup name="PTT_method_button_group"/>
|
||||
<buttongroup name="split_mode_button_group"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
@ -1,13 +1,14 @@
|
||||
subroutine symspec(shared_data,k,ntrperiod,nsps,ingain,nminw,pxdb,s, &
|
||||
df3,ihsym,npts8,pxdbmax)
|
||||
subroutine symspec(shared_data,k,ntrperiod,nsps,ingain,bLowSidelobes, &
|
||||
nminw,pxdb,s,df3,ihsym,npts8,pxdbmax)
|
||||
|
||||
! Input:
|
||||
! k pointer to the most recent new data
|
||||
! ntrperiod T/R sequence length, minutes
|
||||
! nsps samples per symbol, at 12000 Hz
|
||||
! ndiskdat 0/1 to indicate if data from disk
|
||||
! nb 0/1 status of noise blanker (off/on)
|
||||
! nbslider NB setting, 0-100
|
||||
! k pointer to the most recent new data
|
||||
! ntrperiod T/R sequence length, minutes
|
||||
! nsps samples per symbol, at 12000 Hz
|
||||
! bLowSidelobes true to use windowed FFTs
|
||||
! ndiskdat 0/1 to indicate if data from disk
|
||||
! nb 0/1 status of noise blanker (off/on)
|
||||
! nbslider NB setting, 0-100
|
||||
|
||||
! Output:
|
||||
! pxdb raw power (0-90 dB)
|
||||
@ -29,6 +30,7 @@ subroutine symspec(shared_data,k,ntrperiod,nsps,ingain,nminw,pxdb,s, &
|
||||
real*4 tmp(NSMAX)
|
||||
complex cx(0:MAXFFT3/2)
|
||||
integer nch(7)
|
||||
logical*1 bLowSidelobes
|
||||
|
||||
common/spectra/syellow(NSMAX),ref(0:3456),filter(0:3456)
|
||||
data k0/99999999/,nfft3z/0/
|
||||
@ -48,23 +50,17 @@ subroutine symspec(shared_data,k,ntrperiod,nsps,ingain,nminw,pxdb,s, &
|
||||
if(nfft3.ne.nfft3z) then
|
||||
! Compute new window
|
||||
pi=4.0*atan(1.0)
|
||||
! width=0.25*nsps
|
||||
! do i=1,nfft3
|
||||
! z=(i-nfft3/2)/width
|
||||
! w3(i)=exp(-z*z)
|
||||
! enddo
|
||||
! Coefficients taken from equation 37 of NUSC report:
|
||||
! "Some windows with very good sidelobe behavior: application to
|
||||
! discrete Hilbert Transform, by Albert Nuttall"
|
||||
!
|
||||
a0=0.3635819
|
||||
a1=-0.4891775;
|
||||
a2=0.1365995;
|
||||
a3=-0.0106411;
|
||||
do i=1,nfft3
|
||||
w3(i)=a0+a1*cos(2*pi*(i-1)/(nfft3))+ &
|
||||
a2*cos(4*pi*(i-1)/(nfft3))+ &
|
||||
a3*cos(6*pi*(i-1)/(nfft3))
|
||||
w3(i)=a0+a1*cos(2*pi*(i-1)/(nfft3))+ &
|
||||
a2*cos(4*pi*(i-1)/(nfft3))+ &
|
||||
a3*cos(6*pi*(i-1)/(nfft3))
|
||||
enddo
|
||||
nfft3z=nfft3
|
||||
endif
|
||||
@ -99,10 +95,10 @@ subroutine symspec(shared_data,k,ntrperiod,nsps,ingain,nminw,pxdb,s, &
|
||||
enddo
|
||||
ihsym=ihsym+1
|
||||
|
||||
xc(0:nfft3-1)=w3(1:nfft3)*xc(0:nfft3-1) !Apply window w3
|
||||
call four2a(xc,nfft3,1,-1,0) !Real-to-complex FFT
|
||||
if(bLowSidelobes) xc(0:nfft3-1)=w3(1:nfft3)*xc(0:nfft3-1) !Apply window
|
||||
call four2a(xc,nfft3,1,-1,0) !Real-to-complex FFT
|
||||
|
||||
df3=12000.0/nfft3 !JT9-1: 0.732 Hz = 0.42 * tone spacing
|
||||
df3=12000.0/nfft3 !JT9: 0.732 Hz = 0.42 * tone spacing
|
||||
iz=min(NSMAX,nint(5000.0/df3))
|
||||
fac=(1.0/nfft3)**2
|
||||
do i=1,iz
|
||||
|
@ -86,8 +86,8 @@
|
||||
extern "C" {
|
||||
//----------------------------------------------------- C and Fortran routines
|
||||
void symspec_(struct dec_data *, int* k, int* ntrperiod, int* nsps, int* ingain,
|
||||
int* minw, float* px, float s[], float* df3, int* nhsym, int* npts8,
|
||||
float *m_pxmax);
|
||||
bool* bLowSidelobes, int* minw, float* px, float s[], float* df3,
|
||||
int* nhsym, int* npts8, float *m_pxmax);
|
||||
|
||||
void hspec_(short int d2[], int* k, int* nutc0, int* ntrperiod, int* nrxfreq, int* ntol,
|
||||
int* nContest, bool* bmsk144, bool* btrain, double const pcoeffs[], int* ingain,
|
||||
@ -1364,7 +1364,9 @@ void MainWindow::dataSink(qint64 frames)
|
||||
int nsps=m_nsps;
|
||||
if(m_bFastMode) nsps=6912;
|
||||
int nsmo=m_wideGraph->smoothYellow()-1;
|
||||
symspec_(&dec_data,&k,&trmin,&nsps,&m_inGain,&nsmo,&m_px,s,&m_df3,&m_ihsym,&m_npts8,&m_pxmax);
|
||||
bool bLowSidelobes=m_config.lowSidelobes();
|
||||
symspec_(&dec_data,&k,&trmin,&nsps,&m_inGain,&bLowSidelobes,&nsmo,&m_px,s,
|
||||
&m_df3,&m_ihsym,&m_npts8,&m_pxmax);
|
||||
if(m_mode=="WSPR") wspr_downsample_(dec_data.d2,&k);
|
||||
if(m_ihsym <=0) return;
|
||||
if(ui) ui->signal_meter_widget->setValue(m_px,m_pxmax); // Update thermometer
|
||||
|
Loading…
Reference in New Issue
Block a user