mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
Tweaks to simulators.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8398 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
128b8a70d2
commit
4f0e73f68f
@ -33,10 +33,17 @@ subroutine wspr_wav(baud,xdt,h,f0,itone,snrdb,iwave)
|
||||
if(k.gt.0 .and. k.le.NMAX) dat(k)=dat(k) + sig*sin(phi)
|
||||
enddo
|
||||
enddo
|
||||
fac=32767.0
|
||||
|
||||
rms=100.0
|
||||
if(snrdb.ge.90.0) iwave=nint(fac*dat)
|
||||
if(snrdb.lt.90.0) iwave=nint(rms*dat)
|
||||
if(snrdb.lt.90.0) then
|
||||
dat=rms*dat;
|
||||
if(maxval(abs(dat)).gt.32767.0) print*,"Warning - data will be clipped."
|
||||
else
|
||||
datpk=maxval(abs(dat))
|
||||
fac=32767.9/datpk
|
||||
dat=fac*dat
|
||||
endif
|
||||
iwave=nint(dat)
|
||||
|
||||
return
|
||||
end subroutine wspr_wav
|
||||
|
@ -20,8 +20,8 @@ program wsprsim
|
||||
! Get command-line argument(s)
|
||||
nargs=iargc()
|
||||
if(nargs.ne.8) then
|
||||
print*,'Usage: wsprmsksim "message" f0 DT fsp del nwav nfiles snr'
|
||||
print*,'Example: wsprmsksim "K1ABC FN42 30" 50 0.0 0.1 1.0 1 10 -33'
|
||||
print*,'Usage: wsprsim "message" f0 DT fsp del nwav nfiles snr'
|
||||
print*,'Example: wsprsim "K1ABC FN42 30" 50 0.0 0.1 1.0 1 10 -33'
|
||||
go to 999
|
||||
endif
|
||||
call getarg(1,msg) !Message to be transmitted
|
||||
@ -57,8 +57,8 @@ program wsprsim
|
||||
write(*,1000) f0,xdt,txt,snrdb,fspread,delay,nfiles,msgsent
|
||||
1000 format('f0:',f9.3,' DT:',f6.2,' txt:',f6.1,' SNR:',f6.1, &
|
||||
' fspread:',f6.1,' delay:',f6.1,' nfiles:',i3,2x,a22)
|
||||
write(*,*) "Channel symbols: "
|
||||
write(*,'(162i2)') itone
|
||||
! write(*,*) "Channel symbols: "
|
||||
! write(*,'(162i2)') itone
|
||||
|
||||
h=1.0
|
||||
phi=0.0
|
||||
|
@ -286,12 +286,12 @@ program jt65sim
|
||||
if(snrdb.lt.90.0) then
|
||||
dat=rms*dat(1:npts)
|
||||
else
|
||||
datpk=maxval(abs(dat))
|
||||
datpk=maxval(abs(dat(1:npts)))
|
||||
fac=32766.9/datpk
|
||||
dat=fac*dat(1:npts)
|
||||
dat(1:npts)=fac*dat(1:npts)
|
||||
endif
|
||||
if(any(dat.gt.32767.0)) print*,"Warning - data will be clipped."
|
||||
iwave(1:npts)=real(dat(1:npts))
|
||||
if(any(abs(dat(1:npts)).gt.32767.0)) print*,"Warning - data will be clipped."
|
||||
iwave(1:npts)=nint(dat(1:npts))
|
||||
write(10) h,iwave(1:npts) !Save the .wav file
|
||||
close(10)
|
||||
enddo
|
||||
|
@ -327,9 +327,6 @@ void sync_and_demodulate(float *id, float *qd, long np,
|
||||
if( fsymb[i] < -128 ) fsymb[i]=-128.0;
|
||||
symbols[i]=fsymb[i] + 128;
|
||||
}
|
||||
printf("a: %f %f %f\n",fsymb[0],fsymb[1],fsymb[2]);
|
||||
printf("a: %f %f %f\n",fsymb[3],fsymb[4],fsymb[5]);
|
||||
printf("a: %f %f %f\n",fsymb[6],fsymb[7],fsymb[8]);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
@ -1182,7 +1179,6 @@ int main(int argc, char *argv[])
|
||||
shift1=shift0[j];
|
||||
sync1=sync0[j];
|
||||
|
||||
|
||||
// coarse-grid lag and freq search, then if sync>minsync1 continue
|
||||
fstep=0.0; ifmin=0; ifmax=0;
|
||||
lagmin=shift1-128;
|
||||
|
@ -302,7 +302,7 @@ int get_wspr_channel_symbols(char* rawmessage, char* hashtab, unsigned char* sym
|
||||
encode(channelbits,data,nbytes);
|
||||
|
||||
interleave(channelbits);
|
||||
|
||||
|
||||
for (i=0; i<162; i++) {
|
||||
symbols[i]=2*channelbits[i]+pr3[i];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user