Send MyCall, HisCall, and state of Sh checkbox to mskrtd, to enable MSK144 Sh messages with the realtime decoder.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7150 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2016-10-04 14:01:02 +00:00
parent c69c1be97c
commit bda40d5c5d
4 changed files with 24 additions and 19 deletions

View File

@ -1,5 +1,5 @@
subroutine hspec(id2,k,nutc0,ntrpdepth,nrxfreq,ntol,bmsk144,ingain, &
green,s,jh,line1)
mycall,hiscall,bshmsg,green,s,jh,line1)
! Input:
! k pointer to the most recent new data
@ -17,8 +17,9 @@ subroutine hspec(id2,k,nutc0,ntrpdepth,nrxfreq,ntol,bmsk144,ingain, &
parameter (JZ=703)
character*80 line1
character*12 mycall,hiscall
integer*2 id2(0:120*12000-1)
logical*1 bmsk144
logical*1 bmsk144,bshmsg
real green(0:JZ-1)
real s(0:63,0:JZ-1)
real x(512)
@ -75,7 +76,8 @@ subroutine hspec(id2,k,nutc0,ntrpdepth,nrxfreq,ntol,bmsk144,ingain, &
if(bmsk144) then
if(k.ge.7168) then
tsec=(k-7168)/12000.0
call mskrtd(id2(k-7168+1:k),nutc0,tsec,ntol,nrxfreq,ndepth,line1)
call mskrtd(id2(k-7168+1:k),nutc0,tsec,ntol,nrxfreq,ndepth, &
mycall,hiscall,bshmsg,line1)
endif
endif

View File

@ -37,7 +37,6 @@ subroutine msk40spd(cbig,n,ntol,mycall,hiscall,nsuccess,msgreceived,fc,fret,tret
0,1,1, &
1,1,1/
data tpat/1.5,0.5,2.5,1.0,2.0,1.5/
save df,first,fs,pi,twopi,dt,tframe,rcw
if(first) then

View File

@ -1,4 +1,5 @@
subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,line)
subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,mycall,hiscall, &
bshmsg,line)
! Real-time decoder for MSK144.
! Analysis block size = NZ = 7168 samples, t_block = 0.597333 s
@ -13,8 +14,7 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,line)
character*22 msgreceived !Decoded message
character*22 msglast !!! temporary - used for dupechecking
character*80 line !Formatted line with UTC dB T Freq Msg
!##### TEMPORARY
character*6 mycall,hiscall
character*12 mycall,hiscall
complex cdat(NFFT1) !Analytic signal
complex c(NSPM) !Coherently averaged complex data
@ -28,6 +28,8 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,line)
real d(NFFT1)
real pow(8)
real xmc(NPATTERNS)
logical*1 bshmsg
logical first
data first/.true./
data iavpatterns/ &
@ -35,11 +37,7 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,line)
0,0,1,1,1,1,0,0, &
1,1,1,1,1,0,0,0, &
1,1,1,1,1,1,1,0/
data xmc/2.0,4.5,2.5,3.5/ !Used to label decode with time at center of averaging mask
!###### TEMPORARY
data mycall/'K9AN'/
data hiscall/'K1JT'/
data xmc/2.0,4.5,2.5,3.5/ !Used to set time at center of averaging mask
save first,tsec0,nutc00,pnoise,nsnrlast,msglast,cdat
if(first) then
@ -93,8 +91,9 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,line)
!############################################################
!##### hardwired for testing - need to bring in Sh box status
if( nsuccess .eq. 0 .and. .false. ) then
call msk40spd(cdat,np,ntol,mycall,hiscall,nsuccess,msgreceived,fc,fest,tdec,navg)
if(nsuccess.eq.0 .and. bshmsg) then
call msk40spd(cdat,np,ntol,mycall(1:6),hiscall(1:6),nsuccess, &
msgreceived,fc,fest,tdec,navg)
endif
if( nsuccess .eq. 1 ) then

View File

@ -64,12 +64,12 @@
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);
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);
void hspec_(short int d2[], int* k, int* nutc0, int* ntrperiod, int* nrxfreq, int* ntol,
bool* bmsk144, int* ingain, float green[], float s[], int* jh,
char line[], int len1);
bool* bmsk144, int* ingain, char mycall[], char hiscall[], bool* bshmsg,
float green[], float s[], int* jh, char line[], int len1, int len2, int len3);
void gen4_(char* msg, int* ichk, char* msgsent, int itone[],
int* itext, int len1, int len2);
@ -1282,8 +1282,13 @@ void MainWindow::fastSink(qint64 frames)
m_RxFreq=ui->RxFreqSpinBox->value ();
int nTRpDepth=m_TRperiod + 1000*(m_ndepth & 3);
qint64 ms0 = QDateTime::currentMSecsSinceEpoch();
strncpy(dec_data.params.mycall, (m_config.my_callsign()+" ").toLatin1(),12);
QString hisCall {ui->dxCallEntry->text ()};
bool bshmsg=ui->cbShMsgs->isChecked();
strncpy(dec_data.params.hiscall,(hisCall + " ").toLatin1 ().constData (), 12);
hspec_(dec_data.d2,&k,&nutc0,&nTRpDepth,&m_RxFreq,&m_Ftol,&bmsk144,&m_inGain,
fast_green,fast_s,&fast_jh, &line[0],80);
&dec_data.params.mycall[0],&dec_data.params.hiscall[0],&bshmsg,
fast_green,fast_s,&fast_jh,&line[0],12,12,80);
float px = fast_green[fast_jh];
QString t;
t.sprintf(" Rx noise: %5.1f ",px);