From 1f7d8545f3f24854fd0d6e9d631f486fab8730c6 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sun, 21 Jun 2020 13:49:37 -0400 Subject: [PATCH 1/2] Tx line to ALL.TXT should be trimmed(). --- widgets/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index b3cc32127..750e40520 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -8983,7 +8983,7 @@ void MainWindow::write_all(QString txRx, QString message) QFile f{m_config.writeable_data_dir().absoluteFilePath(file_name)}; if (f.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append)) { QTextStream out(&f); - out << line + out << line.trimmed() #if QT_VERSION >= QT_VERSION_CHECK (5, 15, 0) << Qt::endl #else From 501cb449230add9c64e5f562775ec420888c7824 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sun, 21 Jun 2020 14:38:40 -0400 Subject: [PATCH 2/2] Clean up git workspace. --- .gitignore | 5 ++++ Decoder/decodedtext.pri | 3 ++ Detector/Detector.pri | 3 ++ Modulator/Modulator.pri | 3 ++ lib/77bit/call_to_c28.f90 | 21 ++++++++++++++ lib/77bit/free_text.f90 | 58 +++++++++++++++++++++++++++++++++++++ lib/77bit/nonstd_to_c58.f90 | 13 +++++++++ lib/t6.f90 | 56 ----------------------------------- 8 files changed, 106 insertions(+), 56 deletions(-) create mode 100644 Decoder/decodedtext.pri create mode 100644 Detector/Detector.pri create mode 100644 Modulator/Modulator.pri create mode 100644 lib/77bit/call_to_c28.f90 create mode 100644 lib/77bit/free_text.f90 create mode 100644 lib/77bit/nonstd_to_c58.f90 delete mode 100644 lib/t6.f90 diff --git a/.gitignore b/.gitignore index 3ffc4aed5..2bd99ec81 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,8 @@ jnq* *.txt cmake-build-debug cmake-build-release +CMakeFiles +fnd +lib/77bit/tmp +lib/tmp +lib/ftrsd diff --git a/Decoder/decodedtext.pri b/Decoder/decodedtext.pri new file mode 100644 index 000000000..6aa33dc36 --- /dev/null +++ b/Decoder/decodedtext.pri @@ -0,0 +1,3 @@ +SOURCES += Decoder/decodedtext.cpp + +HEADERS += Decoder/decodedtext.h diff --git a/Detector/Detector.pri b/Detector/Detector.pri new file mode 100644 index 000000000..a98051194 --- /dev/null +++ b/Detector/Detector.pri @@ -0,0 +1,3 @@ +SOURCES += Detector/Detector.cpp + +HEADERS += Detector/Detector.hpp diff --git a/Modulator/Modulator.pri b/Modulator/Modulator.pri new file mode 100644 index 000000000..a90a55f7a --- /dev/null +++ b/Modulator/Modulator.pri @@ -0,0 +1,3 @@ +SOURCES += Modulator/Modulator.cpp + +HEADERS += Modulator/Mpdulator.hpp diff --git a/lib/77bit/call_to_c28.f90 b/lib/77bit/call_to_c28.f90 new file mode 100644 index 000000000..96930c575 --- /dev/null +++ b/lib/77bit/call_to_c28.f90 @@ -0,0 +1,21 @@ +program call_to_c28 + parameter (NTOKENS=2063592,MAX22=4194304) + character*6 call_std + character a1*37,a2*36,a3*10,a4*27 + data a1/' 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'/ + data a2/'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'/ + data a3/'0123456789'/ + data a4/' ABCDEFGHIJKLMNOPQRSTUVWXYZ'/ + ! call_std must be right adjusted, length 6 + call_std=' K1ABC' !Redefine as needed + i1=index(a1,call_std(1:1))-1 + i2=index(a2,call_std(2:2))-1 + i3=index(a3,call_std(3:3))-1 + i4=index(a4,call_std(4:4))-1 + i5=index(a4,call_std(5:5))-1 + i6=index(a4,call_std(6:6))-1 + n28=NTOKENS + MAX22 + 36*10*27*27*27*i1 + 10*27*27*27*i2 + & + 27*27*27*i3 + 27*27*i4 + 27*i5 + i6 + write(*,1000) call_std,n28 +1000 format('Callsign: ',a6,2x,'c28 as decimal integer:',i10) +end program call_to_c28 diff --git a/lib/77bit/free_text.f90 b/lib/77bit/free_text.f90 new file mode 100644 index 000000000..c7e668234 --- /dev/null +++ b/lib/77bit/free_text.f90 @@ -0,0 +1,58 @@ +program free_text + character*13 c13,w + character*71 f71 + character*42 c + character*1 qa(10),qb(10) + data c/' 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ+-./?'/ + c13='TNX BOB 73 GL' !Redefine as needed + call mp_short_init + qa=char(0) + w=adjustr(c13) + do i=1,13 + j=index(c,w(i:i))-1 + if(j.lt.0) j=0 + call mp_short_mult(qb,qa(2:10),9,42) !qb(1:9)=42*qa(2:9) + call mp_short_add(qa,qb(2:10),9,j) !qa(1:9)=qb(2:9)+j + enddo + write(f71,1000) qa(2:10) +1000 format(b7.7,8b8.8) + write(*,1010) c13,f71 +1010 format('Free text: ',a13/'f71: ',a71) +end program free_text + +subroutine mp_short_ops(w,u) +! Multi-precision arithmetic with storage in character arrays. + character*1 w(*),u(*) + integer i,ireg,j,n,ir,iv,ii1,ii2 + character*1 creg(4) + save ii1,ii2 + equivalence (ireg,creg) + + entry mp_short_init + ireg=256*ichar('2')+ichar('1') + do j=1,4 + if (creg(j).eq.'1') ii1=j + if (creg(j).eq.'2') ii2=j + enddo + return + + entry mp_short_add(w,u,n,iv) + ireg=256*iv + do j=n,1,-1 + ireg=ichar(u(j))+ichar(creg(ii2)) + w(j+1)=creg(ii1) + enddo + w(1)=creg(ii2) + return + + entry mp_short_mult(w,u,n,iv) + ireg=0 + do j=n,1,-1 + ireg=ichar(u(j))*iv+ichar(creg(ii2)) + w(j+1)=creg(ii1) + enddo + w(1)=creg(ii2) + return + + return +end subroutine mp_short_ops diff --git a/lib/77bit/nonstd_to_c58.f90 b/lib/77bit/nonstd_to_c58.f90 new file mode 100644 index 000000000..09190423e --- /dev/null +++ b/lib/77bit/nonstd_to_c58.f90 @@ -0,0 +1,13 @@ +program nonstd_to_c58 + integer*8 n58 + character*11 call_nonstd + character*38 c + data c/' 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ/'/ + call_nonstd='PJ4/K1ABC' !Redifine as needed + n58=0 + do i=1,11 + n58=n58*38 + index(c,call_nonstd(i:i)) - 1 + enddo + write(*,1000) call_nonstd,n58 +1000 format('Callsign: ',a11,2x,'c58 as decimal integer:',i20) +end program nonstd_to_c58 diff --git a/lib/t6.f90 b/lib/t6.f90 deleted file mode 100644 index fd08f01f4..000000000 --- a/lib/t6.f90 +++ /dev/null @@ -1,56 +0,0 @@ -program t6 - - parameter (MAXFFT=1404) - complex c(0:MAXFFT-1) - real s(0:MAXFFT-1) - - m1=45 - m2=67 - m3=89 - nsym=3*11 + m1 + m2 + m3 - nfft=6*nsym - nh=nfft/2 - - best=9999. -! do m1=22,67 -! do m2=37,97 - do m1=30,67 - do m2=26,100 - m3=201-m2-m1 - if(m3.lt.13) cycle - c=0. - n1=6*(11+m1) - n2=n1+6*(11+m2) - c(1:66)=1. - c(1+n1:66+n1)=1. - c(1+n2:66+n2)=1. - - call four2a(c,nfft,1,-1,1) !c2c FFT - - df=12000.0/nfft - smax=0. - do i=0,nfft-1 - s(i)=real(c(i))**2 + aimag(c(i))**2 - if(i.ne.0) smax=max(s(i),smax) - enddo - sidelobe=db(smax/s(0)) - - if(sidelobe.lt.best) then - write(*,1000) m1,m2,m3,sidelobe -1000 format(3i5,f8.2) - best=sidelobe - s=s/s(0) - rewind 13 - do j=0,nfft-1 - i=mod(j+nh,nfft) - f=i*df - if(i.gt.nh) f=f-12000.0 - write(13,1020) f,s(i) -1020 format(2f12.4) - enddo - endif - enddo - enddo - -end program t6 -