Added makepings.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/jtms3@2506 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2012-07-12 19:46:02 +00:00
parent 75ecfee36a
commit f1da3b1232
4 changed files with 39 additions and 8 deletions

View File

@ -129,14 +129,14 @@ subroutine genjtms3(msg28,iwave,nwave)
fac=32767.0/wmax
iwave(1:nsam)=fac*wave(1:nsam)
nwave=nsam
! nwave=nsam
! nblk=30*48000/nsam
! do n=2,nblk
! i0=(n-1)*nsam
! iwave(i0+1:i0+nsam)=iwave(1:nsam)
! enddo
! nwave=i0+nsam
nblk=30*48000/nsam
do n=2,nblk
i0=(n-1)*nsam
iwave(i0+1:i0+nsam)=iwave(1:nsam)
enddo
nwave=i0+nsam
! Compute the spectrum
! nfft=nsam

29
libm65/makepings.f90 Normal file
View File

@ -0,0 +1,29 @@
subroutine makepings(iwave,nwave)
parameter (NFSAMPLE=48000)
integer*2 iwave(nwave)
real*8 t
iping0=-999
dt=1.0/NFSAMPLE
do i=1,nwave
iping=i/(3*NFSAMPLE)
if(iping.ne.iping0) then
ip=mod(iping,3)
w=0.015*(4-ip)
ig=(iping-1)/3
amp=sqrt((3.0-ig)/3.0)
t0=dt*(iping+0.5)*(3*NFSAMPLE)
iping0=iping
endif
t=(i*dt-t0)/w
if(t.lt.0.d0 .and. t.lt.10.0) then
fac=0.
else
fac=2.718*t*dexp(-t)
endif
iwave(i)=nint(fac*amp*iwave(i))
enddo
return
end subroutine makepings

View File

@ -1168,7 +1168,7 @@ void MainWindow::guiUpdate()
ba2msg(ba,msgsent);
int len1=28;
genjtms3_(message,iwave,&nwave,len1);
// makepings_(iwave,&nwave);
if(m_restart) {
QFile f("jtms3_tx.log");
f.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append);

View File

@ -239,6 +239,8 @@ extern "C" {
void genjtms3_(char* message, short iwave[], int* nwave, int len1);
void makepings_(short iwave[], int* nwave);
void gen65_(char* msg, int* mode65, double* samfac, int* nsendingsh,
char* msgsent, short iwave[], int* nwave, int len1, int len2);