From 93f7198f9c2864ef9630cc0cc9e46d6cc1933aa9 Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Sat, 27 Apr 2024 12:26:26 +0100 Subject: New upstream version 2.7.0~rc4+repack --- qmap/getfile.cpp | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) (limited to 'qmap/getfile.cpp') diff --git a/qmap/getfile.cpp b/qmap/getfile.cpp index 95dd0791..715d7249 100755 --- a/qmap/getfile.cpp +++ b/qmap/getfile.cpp @@ -6,10 +6,10 @@ extern qint16 id[2*60*96000]; -void getfile(QString fname, bool xpol, int dbDgrd) +void getfile(QString fname, int dbDgrd) { - int npts=2*56*96000; - if(xpol) npts=2*npts; +// int npts=2*56*96000; + int npts=2*60*96000; // Degrade S/N by dbDgrd dB -- for tests only!! float dgrd=0.0; @@ -23,31 +23,32 @@ void getfile(QString fname, bool xpol, int dbDgrd) if(fp != NULL) { auto n = fread(&datcom_.fcenter,sizeof(datcom_.fcenter),1,fp); -// qDebug() << "aa0" << sizeof(datcom_.fcenter) << n << datcom_.fcenter; - n = fread(id,2,npts,fp); - Q_UNUSED (n); + n=fread(id,2,npts,fp); + n=fread(&datcom_.ntx30a,4,1,fp); + n=fread(&datcom_.ntx30b,4,1,fp); + if(n==0) { + datcom_.ntx30a=0; + datcom_.ntx30b=0; + } int j=0; if(dbDgrd<0) { for(int i=0; i0) { datcom_.nutc=100*fname.mid(i0-4,2).toInt() + fname.mid(i0-2,2).toInt(); @@ -55,11 +56,9 @@ void getfile(QString fname, bool xpol, int dbDgrd) } } -void savetf2(QString fname, bool xpol) +void save_iq(QString fname) { - int npts=2*56*96000; - if(xpol) npts=2*npts; - + int npts=2*60*96000; qint16* buf=(qint16*)malloc(2*npts); char name[80]; strcpy(name,fname.toLocal8Bit()); @@ -69,11 +68,11 @@ void savetf2(QString fname, bool xpol) fwrite(&datcom_.fcenter,sizeof(datcom_.fcenter),1,fp); int j=0; for(int i=0; i