mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-28 12:22:32 -04:00
Decode Q65 using the Lorentzian fast fading model.
This commit is contained in:
parent
4d739a31ca
commit
5d904927a0
@ -54,7 +54,6 @@ contains
|
|||||||
integer*2 iwave(NMAX) !Raw data
|
integer*2 iwave(NMAX) !Raw data
|
||||||
real, allocatable :: dd(:) !Raw data
|
real, allocatable :: dd(:) !Raw data
|
||||||
integer dat4(13) !Decoded message as 12 6-bit integers
|
integer dat4(13) !Decoded message as 12 6-bit integers
|
||||||
logical ltext
|
|
||||||
logical unpk77_success
|
logical unpk77_success
|
||||||
complex, allocatable :: c00(:) !Analytic signal, 6000 Sa/s
|
complex, allocatable :: c00(:) !Analytic signal, 6000 Sa/s
|
||||||
complex, allocatable :: c0(:) !Analytic signal, 6000 Sa/s
|
complex, allocatable :: c0(:) !Analytic signal, 6000 Sa/s
|
||||||
@ -86,11 +85,6 @@ contains
|
|||||||
df1=12000.0/nfft1
|
df1=12000.0/nfft1
|
||||||
this%callback => callback
|
this%callback => callback
|
||||||
if(nutc.eq.-999) print*,lapdx,nfa,nfb,nfqso !Silence warning
|
if(nutc.eq.-999) print*,lapdx,nfa,nfb,nfqso !Silence warning
|
||||||
|
|
||||||
! Prime the QRA decoder for possible use of AP
|
|
||||||
! call packcall(mycall(1:6),nc1,ltext)
|
|
||||||
! call packcall(hiscall(1:6),nc2,ltext)
|
|
||||||
! call packgrid(hisgrid(1:4),ng2,ltext)
|
|
||||||
b90=20.0 !8 to 25 is OK; not very critical
|
b90=20.0 !8 to 25 is OK; not very critical
|
||||||
nFadingModel=1
|
nFadingModel=1
|
||||||
|
|
||||||
@ -101,19 +95,6 @@ contains
|
|||||||
if(ndepth.ge.2) maxaptype=5 !###
|
if(ndepth.ge.2) maxaptype=5 !###
|
||||||
minsync=-2
|
minsync=-2
|
||||||
call qra_params(ndepth,maxaptype,idfmax,idtmax,ibwmin,ibwmax,maxdist)
|
call qra_params(ndepth,maxaptype,idfmax,idtmax,ibwmin,ibwmax,maxdist)
|
||||||
|
|
||||||
! if(nc1.ne.nc1z .or. nc2.ne.nc2z .or. ng2.ne.ng2z .or. &
|
|
||||||
! maxaptype.ne.maxaptypez) then
|
|
||||||
! do naptype=0,maxaptype
|
|
||||||
! if(naptype.eq.2 .and. maxaptype.eq.4) cycle
|
|
||||||
! call qra64_dec(s3dummy,nc1,nc2,ng2,naptype,1,nSubmode,b90, &
|
|
||||||
! nFadingModel,dat4,snr2,irc)
|
|
||||||
! enddo
|
|
||||||
! nc1z=nc1
|
|
||||||
! nc2z=nc2
|
|
||||||
! ng2z=ng2
|
|
||||||
! maxaptypez=maxaptype
|
|
||||||
! endif
|
|
||||||
naptype=maxaptype
|
naptype=maxaptype
|
||||||
|
|
||||||
call timer('sync_q65',0)
|
call timer('sync_q65',0)
|
||||||
@ -131,7 +112,7 @@ contains
|
|||||||
call ana64(dd,npts,c00)
|
call ana64(dd,npts,c00)
|
||||||
call timer('q65loops',0)
|
call timer('q65loops',0)
|
||||||
call q65_loops(c00,npts/2,nsps/2,nmode,mode65,nsubmode,nFadingModel, &
|
call q65_loops(c00,npts/2,nsps/2,nmode,mode65,nsubmode,nFadingModel, &
|
||||||
ndepth,nc1,nc2,ng2,naptype,jpk0,xdt,f0,width,snr2,irc,dat4)
|
ndepth,jpk0,xdt,f0,width,snr2,irc,dat4)
|
||||||
call timer('q65loops',1)
|
call timer('q65loops',1)
|
||||||
snr2=snr2 + db(6912.0/nsps)
|
snr2=snr2 + db(6912.0/nsps)
|
||||||
endif
|
endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
subroutine q65_loops(c00,npts2,nsps,mode,mode64,nsubmode,nFadingModel, &
|
subroutine q65_loops(c00,npts2,nsps,mode,mode64,nsubmode,nFadingModel, &
|
||||||
ndepth,nc1,nc2,ng2,naptype,jpk0,xdt,f0,width,snr2,irc,dat4)
|
ndepth,jpk0,xdt,f0,width,snr2,irc,dat4)
|
||||||
|
|
||||||
use packjt77
|
use packjt77
|
||||||
use timer_module, only: timer
|
use timer_module, only: timer
|
||||||
@ -68,14 +68,9 @@ subroutine q65_loops(c00,npts2,nsps,mode,mode64,nsubmode,nFadingModel, &
|
|||||||
! if(b90.lt.0.15*width) exit
|
! if(b90.lt.0.15*width) exit
|
||||||
ncall=ncall+1
|
ncall=ncall+1
|
||||||
call timer('qra64_de',0)
|
call timer('qra64_de',0)
|
||||||
!###
|
|
||||||
! call qra64_dec(s3,nc1,nc2,ng2,naptype,0,nSubmode,b90, &
|
|
||||||
! nFadingModel,dat4,snr2,irc)
|
|
||||||
APmask=0
|
APmask=0
|
||||||
APsymbols=0
|
APsymbols=0
|
||||||
call s3fix(s3,s3tmp)
|
call q65_dec(s3,APmask,APsymbols,nsubmode,b90,nFadingModel,s3prob,snr2,dat4,irc)
|
||||||
call q65_dec(s3tmp,APmask,APsymbols,s3prob,snr2,dat4,irc)
|
|
||||||
!###
|
|
||||||
call timer('qra64_de',1)
|
call timer('qra64_de',1)
|
||||||
if(irc.eq.0) go to 200
|
if(irc.eq.0) go to 200
|
||||||
! if(irc.gt.0) call badmsg(irc,dat4,nc1,nc2,ng2)
|
! if(irc.gt.0) call badmsg(irc,dat4,nc1,nc2,ng2)
|
||||||
@ -150,24 +145,3 @@ subroutine q65_loops(c00,npts2,nsps,mode,mode64,nsubmode,nFadingModel, &
|
|||||||
endif
|
endif
|
||||||
return
|
return
|
||||||
end subroutine q65_loops
|
end subroutine q65_loops
|
||||||
|
|
||||||
subroutine s3fix(s3,s3tmp)
|
|
||||||
real s3(0:191,63)
|
|
||||||
real s3tmp(0:63,63)
|
|
||||||
integer ipk1(1)
|
|
||||||
integer y(63)
|
|
||||||
|
|
||||||
do j=1,63
|
|
||||||
s3tmp(0:63,j)=s3(64:127,j)
|
|
||||||
! s3tmp(y(j),j)=1.0
|
|
||||||
ipk1=maxloc(s3(0:191,j))
|
|
||||||
m=ipk1(1)-65
|
|
||||||
ipk1=maxloc(s3tmp(0:63,j))
|
|
||||||
mtmp=ipk1(1)-1
|
|
||||||
write(72,3072) j,y(j),m,m-y(j),mtmp,mtmp-y(j)
|
|
||||||
3072 format(6i7)
|
|
||||||
enddo
|
|
||||||
write(70) s3tmp
|
|
||||||
|
|
||||||
return
|
|
||||||
end subroutine s3fix
|
|
||||||
|
@ -46,13 +46,17 @@ void q65_enc_(int x[], int y[])
|
|||||||
q65_encode(&codec,y,x);
|
q65_encode(&codec,y,x);
|
||||||
}
|
}
|
||||||
|
|
||||||
void q65_dec_(float s3[], int APmask[], int APsymbols[], float s3prob[],
|
void q65_dec_(float s3[], int APmask[], int APsymbols[], int* submode,
|
||||||
|
float* B90, int* fadingModel, float s3prob[],
|
||||||
float* snr2500, int xdec[], int* rc0)
|
float* snr2500, int xdec[], int* rc0)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Input: s3[LL,NN] Received energies
|
/* Input: s3[LL,NN] Received energies
|
||||||
* APmask[13] AP information to be used in decoding
|
* APmask[13] AP information to be used in decoding
|
||||||
* APsymbols[13] Available AP informtion
|
* APsymbols[13] Available AP informtion
|
||||||
|
* submode 0=A, 4=E
|
||||||
|
* B90 Spread bandwidth, 90% fractional energy
|
||||||
|
* fadingModel 0=Gaussian, 1=Lorentzian
|
||||||
* Output: s3prob[LL,NN] Symbol-value intrinsic probabilities
|
* Output: s3prob[LL,NN] Symbol-value intrinsic probabilities
|
||||||
* snr2500 SNR_2500 of decoded signal, or lower limit
|
* snr2500 SNR_2500 of decoded signal, or lower limit
|
||||||
* xdec[13] Decoded 78-bit message as 13 six-bit integers
|
* xdec[13] Decoded 78-bit message as 13 six-bit integers
|
||||||
@ -73,8 +77,8 @@ void q65_dec_(float s3[], int APmask[], int APsymbols[], float s3prob[],
|
|||||||
}
|
}
|
||||||
first=0;
|
first=0;
|
||||||
}
|
}
|
||||||
// rc = q65_intrinsics_fastfding(&codec,s3prob,s3,submode,B90,fadingModel);
|
rc = q65_intrinsics_fastfading(&codec,s3prob,s3,*submode,*B90,*fadingModel);
|
||||||
rc = q65_intrinsics(&codec,s3prob,s3);
|
// rc = q65_intrinsics(&codec,s3prob,s3);
|
||||||
if(rc<0) {
|
if(rc<0) {
|
||||||
printf("error in q65_intrinsics()\n");
|
printf("error in q65_intrinsics()\n");
|
||||||
exit(0);
|
exit(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user