mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-16 09:01:59 -05:00
Q65: compute snr from esnodb, using actual symbol rate.
This commit is contained in:
parent
306c0c8633
commit
b3f0aec407
@ -69,7 +69,7 @@ subroutine q65_loops(c00,npts2,nsps,mode,mode64,nsubmode,nFadingModel, &
|
||||
ncall=ncall+1
|
||||
call timer('qra64_de',0)
|
||||
call q65_intrinsics_ff(s3,nsubmode,b90,nFadingModel,s3prob)
|
||||
call q65_dec(s3,s3prob,APmask,APsymbols,snr2,dat4,irc)
|
||||
call q65_dec(s3,s3prob,APmask,APsymbols,esnodb,dat4,irc)
|
||||
! irc > 0 ==> number of iterations required to decode
|
||||
! -1 = invalid params
|
||||
! -2 = decode failed
|
||||
@ -84,8 +84,7 @@ subroutine q65_loops(c00,npts2,nsps,mode,mode64,nsubmode,nFadingModel, &
|
||||
a(1)=-f0
|
||||
call twkfreq(c00,c0,npts2,6000.0,a)
|
||||
jpk=3000 !### These definitions need work ###
|
||||
! if(nsps.ge.3600) jpk=4080 !###
|
||||
if(nsps.ge.3600) jpk=6000 !###
|
||||
if(nsps.ge.3600) jpk=6000 !### TR >= 60 s
|
||||
call spec64(c0,nsps,mode,mode64,jpk,s3,LL,NN)
|
||||
call pctile(s3,LL*NN,40,base)
|
||||
s3=s3/base
|
||||
@ -100,6 +99,8 @@ subroutine q65_loops(c00,npts2,nsps,mode,mode64,nsubmode,nFadingModel, &
|
||||
|
||||
if(irc.ge.0) then
|
||||
navg=nsave
|
||||
baud=6000.0/nsps
|
||||
snr2=esnodb - db(2500.0/baud)
|
||||
if(iavg.eq.0) navg=0
|
||||
!### For tests only:
|
||||
open(53,file='fort.53',status='unknown',position='append')
|
||||
|
@ -77,14 +77,14 @@ void q65_intrinsics_ff_(float s3[], int* submode, float* B90,
|
||||
}
|
||||
|
||||
void q65_dec_(float s3[], float s3prob[], int APmask[], int APsymbols[],
|
||||
float* snr2500, int xdec[], int* rc0)
|
||||
float* esnodb0, int xdec[], int* rc0)
|
||||
{
|
||||
|
||||
/* Input: s3prob[LL,NN] Symbol-value intrinsic probabilities
|
||||
* APmask[13] AP information to be used in decoding
|
||||
* APsymbols[13] Available AP informtion
|
||||
* Output:
|
||||
* snr2500 SNR_2500 of decoded signal, or lower limit
|
||||
* esnodb0 Estimated Es/No in dB
|
||||
* xdec[13] Decoded 78-bit message as 13 six-bit integers
|
||||
* rc0 Return code from q65_decode()
|
||||
*/
|
||||
@ -98,7 +98,7 @@ void q65_dec_(float s3[], float s3prob[], int APmask[], int APsymbols[],
|
||||
// rc = -1: Invalid params
|
||||
// rc = -2: Decode failed
|
||||
// rc = -3: CRC mismatch
|
||||
*snr2500 = -31.0;
|
||||
*esnodb0 = 0.0; //Default Es/No for a failed decode
|
||||
if(rc<0) return;
|
||||
|
||||
rc = q65_esnodb_fastfading(&codec,&esnodb,ydec,s3);
|
||||
@ -106,5 +106,5 @@ void q65_dec_(float s3[], float s3prob[], int APmask[], int APsymbols[],
|
||||
printf("error in q65_esnodb_fastfading()\n");
|
||||
exit(0);
|
||||
}
|
||||
*snr2500 = esnodb - 31.0;
|
||||
*esnodb0 = esnodb;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user