mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-03-22 20:18:35 -04:00
Cut the size of arrays d4() d8() dd() in half, because no xpol.
This commit is contained in:
parent
63bc2a6495
commit
516c83d4f9
@ -6,7 +6,7 @@
|
||||
extern "C" {
|
||||
|
||||
extern struct { //This is "common/datcom/..." in Fortran
|
||||
float d4[4*5760000]; //Raw I/Q data from Linrad
|
||||
float d4[2*5760000]; //Raw I/Q data from Linrad
|
||||
float ss[322*NFFT]; //Half-symbol spectra at 0,45,90,135 deg pol
|
||||
float savg[NFFT]; //Avg spectra at 0,45,90,135 deg pol
|
||||
double fcenter; //Center freq from Linrad (MHz)
|
||||
@ -45,7 +45,7 @@ extern struct { //This is "common/datcom/..." in Fortran
|
||||
} datcom_;
|
||||
|
||||
extern struct { //This is "common/datcom/..." in Fortran
|
||||
float d4[4*5760000]; //Raw I/Q data from Linrad
|
||||
float d4[2*5760000]; //Raw I/Q data from Linrad
|
||||
float ss[322*NFFT]; //Half-symbol spectra at 0,45,90,135 deg pol
|
||||
float savg[NFFT]; //Avg spectra at 0,45,90,135 deg pol
|
||||
double fcenter; //Center freq from Linrad (MHz)
|
||||
|
@ -31,13 +31,13 @@ void getfile(QString fname, bool xpol, int dbDgrd)
|
||||
for(int i=0; i<npts; i+=2) {
|
||||
datcom_.d4[j++]=fac*((float)id[i] + dgrd*gran());
|
||||
datcom_.d4[j++]=fac*((float)id[i+1] + dgrd*gran());
|
||||
if(!xpol) j+=2; //Skip over d4(3,x) and d4(4,x)
|
||||
// if(!xpol) j+=2; //Skip over d4(3,x) and d4(4,x)
|
||||
}
|
||||
} else {
|
||||
for(int i=0; i<npts; i+=2) {
|
||||
datcom_.d4[j++]=(float)id[i];
|
||||
datcom_.d4[j++]=(float)id[i+1];
|
||||
if(!xpol) j+=2; //Skip over d4(3,x) and d4(4,x)
|
||||
// if(!xpol) j+=2; //Skip over d4(3,x) and d4(4,x)
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
@ -70,7 +70,7 @@ void savetf2(QString fname, bool xpol)
|
||||
for(int i=0; i<npts; i+=2) {
|
||||
buf[i]=(qint16)datcom_.d4[j++];
|
||||
buf[i+1]=(qint16)datcom_.d4[j++];
|
||||
if(!xpol) j+=2; //Skip over d4(3,x) and d4(4,x)
|
||||
// if(!xpol) j+=2; //Skip over d4(3,x) and d4(4,x)
|
||||
}
|
||||
fwrite(buf,2,npts,fp);
|
||||
fclose(fp);
|
||||
|
@ -3,7 +3,7 @@ subroutine decode0(dd,ss,savg)
|
||||
use timer_module, only: timer
|
||||
parameter (NSMAX=60*96000)
|
||||
|
||||
real*4 dd(4,NSMAX),ss(322,NFFT),savg(NFFT)
|
||||
real*4 dd(2,NSMAX),ss(322,NFFT),savg(NFFT)
|
||||
real*8 fcenter
|
||||
integer hist(0:32768)
|
||||
logical ldecoded
|
||||
@ -28,10 +28,10 @@ subroutine decode0(dd,ss,savg)
|
||||
hist(j1)=hist(j1)+1
|
||||
j2=min(abs(dd(2,i)),32768.0)
|
||||
hist(j2)=hist(j2)+1
|
||||
j3=min(abs(dd(3,i)),32768.0)
|
||||
hist(j3)=hist(j3)+1
|
||||
j4=min(abs(dd(4,i)),32768.0)
|
||||
hist(j4)=hist(j4)+1
|
||||
! j3=min(abs(dd(3,i)),32768.0)
|
||||
! hist(j3)=hist(j3)+1
|
||||
! j4=min(abs(dd(4,i)),32768.0)
|
||||
! hist(j4)=hist(j4)+1
|
||||
enddo
|
||||
m=0
|
||||
do i=0,32768
|
||||
|
@ -1,11 +1,11 @@
|
||||
subroutine filbig(dd,nmax,f0,newdat,nfsample,c4a,n4)
|
||||
|
||||
! Filter and downsample complex data stored in array dd(4,nmax).
|
||||
! Filter and downsample complex data stored in array dd(2,nmax).
|
||||
! Output is downsampled from 96000 Hz to 1375.125 Hz.
|
||||
|
||||
use timer_module, only: timer
|
||||
parameter (MAXFFT1=5376000,MAXFFT2=77175)
|
||||
real*4 dd(4,nmax) !Input data
|
||||
real*4 dd(2,nmax) !Input data
|
||||
complex ca(MAXFFT1) !FFT of input
|
||||
complex c4a(MAXFFT2) !Output data
|
||||
real*8 df
|
||||
|
@ -16,7 +16,7 @@ subroutine q65c(itimer)
|
||||
character*6 mygrid,hisgrid
|
||||
character*20 datetime
|
||||
|
||||
common/datcom2/dd(4,5760000),ss(322,NFFT),savg(NFFT),nparams0
|
||||
common/datcom2/dd(2,5760000),ss(322,NFFT),savg(NFFT),nparams0
|
||||
|
||||
!### REMEMBER that /npar/ is not updated until nparams=nparams0 is executed. ###
|
||||
common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, &
|
||||
|
@ -11,7 +11,7 @@ subroutine q65wa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb, &
|
||||
parameter (MAXMSG=1000) !Size of decoded message list
|
||||
parameter (NSMAX=60*96000)
|
||||
complex cx(NSMAX/64) !Data at 1378.125 samples/s
|
||||
real dd(4,NSMAX)
|
||||
real dd(2,NSMAX)
|
||||
real*4 ss(322,NFFT),savg(NFFT)
|
||||
real*8 fcenter
|
||||
character*3 shmsg0(4)
|
||||
|
@ -12,7 +12,7 @@ subroutine recvpkt(nsam,nblock2,userx_no,k,buf4,buf8,buf16)
|
||||
integer*2 jd(4),kd(2),nblock2
|
||||
real*4 xd(4),yd(2)
|
||||
real*8 fcenter
|
||||
common/datcom/dd(4,5760000),ss(322,NFFT),savg(NFFT),fcenter,nutc, &
|
||||
common/datcom/dd(2,5760000),ss(322,NFFT),savg(NFFT),fcenter,nutc, &
|
||||
junk(NJUNK)
|
||||
equivalence (kd,d4)
|
||||
equivalence (jd,d8,yd)
|
||||
@ -35,24 +35,6 @@ subroutine recvpkt(nsam,nblock2,userx_no,k,buf4,buf8,buf16)
|
||||
dd(1,k)=kd(1)
|
||||
dd(2,k)=kd(2)
|
||||
enddo
|
||||
else if(userx_no.eq.-2) then
|
||||
do i=1,87 !Two RF channels, r*4 data
|
||||
k=k+1
|
||||
c16=buf16(i)
|
||||
dd(1,k)=xd(1)
|
||||
dd(2,k)=xd(2)
|
||||
dd(3,k)=xd(3)
|
||||
dd(4,k)=xd(4)
|
||||
enddo
|
||||
else if(userx_no.eq.2) then
|
||||
do i=1,174 !Two RF channels, i*2 data
|
||||
k=k+1
|
||||
d8=buf8(i)
|
||||
dd(1,k)=jd(1)
|
||||
dd(2,k)=jd(2)
|
||||
dd(3,k)=jd(3)
|
||||
dd(4,k)=jd(4)
|
||||
enddo
|
||||
endif
|
||||
else
|
||||
if(userx_no.eq.1) then
|
||||
|
@ -16,7 +16,7 @@ subroutine symspec(k,ndiskdat,nb,nbslider,nfsample, &
|
||||
parameter (NFFT=32768) !Length of FFTs
|
||||
real*8 ts,hsym
|
||||
real*8 fcenter
|
||||
common/datcom/dd(4,5760000),ss(322,NFFT),savg(NFFT),fcenter,nutc, &
|
||||
common/datcom/dd(2,5760000),ss(322,NFFT),savg(NFFT),fcenter,nutc, &
|
||||
junk(NJUNK)
|
||||
real*4 ssz5a(NFFT),w(NFFT),w2a(NFFT),w2b(NFFT)
|
||||
complex cx(NFFT)
|
||||
@ -54,7 +54,7 @@ subroutine symspec(k,ndiskdat,nb,nbslider,nfsample, &
|
||||
savg=0.
|
||||
ihsym=0
|
||||
k1=0
|
||||
if(ndiskdat.eq.0) dd(1:4,k+1:5760000)=0. !### Should not be needed ??? ###
|
||||
if(ndiskdat.eq.0) dd(1:2,k+1:5760000)=0. !### Should not be needed ??? ###
|
||||
endif
|
||||
k0=k
|
||||
|
||||
|
@ -14,7 +14,7 @@ extern "C"
|
||||
{
|
||||
struct
|
||||
{
|
||||
double d8[2*60*96000]; //This is "common/datcom/..." in fortran
|
||||
double d8[60*96000]; //This is "common/datcom/..." in fortran
|
||||
float ss[322*NFFT];
|
||||
float savg[NFFT];
|
||||
double fcenter;
|
||||
@ -210,6 +210,7 @@ void SoundInThread::inputUDP()
|
||||
if ((k+iz) <= 60*96000) {
|
||||
int nsam=-1;
|
||||
recvpkt_(&nsam, &b.iblk, &b.nrx, &k, b.d8, b.d8, b.d8);
|
||||
// if(nsam==-99) recvpkt_(&nsam, &b.iblk, &b.nrx, &k, b.d8, b.d8, b.d8);
|
||||
datcom_.fcenter=b.cfreq + m_fAdd;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user