mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 05:38:46 -05:00
Improve AFC action for JT65, especially submodes B and C.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8599 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
62eabce723
commit
6d70acef57
@ -1,4 +1,4 @@
|
|||||||
subroutine afc65b(cx,npts,fsample,nflip,a,ccfbest,dtbest)
|
subroutine afc65b(cx,npts,fsample,nflip,mode65,a,ccfbest,dtbest)
|
||||||
|
|
||||||
! Find delta f, f1, f2 ==> a(1:3)
|
! Find delta f, f1, f2 ==> a(1:3)
|
||||||
|
|
||||||
@ -9,15 +9,15 @@ subroutine afc65b(cx,npts,fsample,nflip,a,ccfbest,dtbest)
|
|||||||
a(2)=0.
|
a(2)=0.
|
||||||
a(3)=0.
|
a(3)=0.
|
||||||
a(4)=0.
|
a(4)=0.
|
||||||
deltaa(1)=2.0
|
deltaa(1)=2.0*mode65
|
||||||
deltaa(2)=2.0
|
deltaa(2)=2.0*mode65
|
||||||
deltaa(3)=1.0
|
deltaa(3)=1.0
|
||||||
nterms=2 !Maybe 2 is enough?
|
nterms=2 !Maybe 2 is enough?
|
||||||
|
|
||||||
! Start the iteration
|
! Start the iteration
|
||||||
chisqr=0.
|
chisqr=0.
|
||||||
chisqr0=1.e6
|
chisqr0=1.e6
|
||||||
do iter=1,3 !One iteration is enough?
|
do iter=1,100 !How many iters is enough?
|
||||||
do j=1,nterms
|
do j=1,nterms
|
||||||
chisq1=fchisq65(cx,npts,fsample,nflip,a,ccfmax,dtmax)
|
chisq1=fchisq65(cx,npts,fsample,nflip,a,ccfmax,dtmax)
|
||||||
fn=0.
|
fn=0.
|
||||||
@ -45,13 +45,16 @@ subroutine afc65b(cx,npts,fsample,nflip,a,ccfbest,dtbest)
|
|||||||
delta=delta*(1./(1.+(chisq1-chisq2)/(chisq3-chisq2))+0.5)
|
delta=delta*(1./(1.+(chisq1-chisq2)/(chisq3-chisq2))+0.5)
|
||||||
a(j)=a(j)-delta
|
a(j)=a(j)-delta
|
||||||
deltaa(j)=deltaa(j)*fn/3.
|
deltaa(j)=deltaa(j)*fn/3.
|
||||||
|
! write(*,4000) iter,j,a(1:2),-chisq2
|
||||||
|
!4000 format(2i2,4f9.4)
|
||||||
enddo
|
enddo
|
||||||
chisqr=fchisq65(cx,npts,fsample,nflip,a,ccfmax,dtmax)
|
chisqr=fchisq65(cx,npts,fsample,nflip,a,ccfmax,dtmax)
|
||||||
if(chisqr/chisqr0.gt.0.9999) go to 30
|
fdiff=chisqr/chisqr0-1.0
|
||||||
|
! write(*,4000) 0,0,a(1:2),-chisqr,fdiff
|
||||||
|
if(abs(fdiff).lt.0.0001) exit
|
||||||
chisqr0=chisqr
|
chisqr0=chisqr
|
||||||
enddo
|
enddo
|
||||||
|
ccfbest=ccfmax * (1378.125/fsample)**2
|
||||||
30 ccfbest=ccfmax * (1378.125/fsample)**2
|
|
||||||
dtbest=dtmax
|
dtbest=dtmax
|
||||||
|
|
||||||
return
|
return
|
||||||
|
@ -49,9 +49,9 @@ subroutine decode65a(dd,npts,newdat,nqd,f0,nflip,mode65,ntrials, &
|
|||||||
fsample=1378.125/4.
|
fsample=1378.125/4.
|
||||||
|
|
||||||
call timer('afc65b ',0)
|
call timer('afc65b ',0)
|
||||||
! Best fit for DF, drift, banana-coefficient, and dt. fsample = 344.53125 S/s
|
! Best fit for DF, drift, and dt. fsample = 344.53125 S/s
|
||||||
dtbest=dt
|
dtbest=dt
|
||||||
call afc65b(c5x,n6,fsample,nflip,a,ccfbest,dtbest)
|
call afc65b(c5x,n6,fsample,nflip,mode65,a,ccfbest,dtbest)
|
||||||
call timer('afc65b ',1)
|
call timer('afc65b ',1)
|
||||||
dtbest=dtbest+0.003628 !Remove decimation filter and coh. integrator delay
|
dtbest=dtbest+0.003628 !Remove decimation filter and coh. integrator delay
|
||||||
dt=dtbest !Return new, improved estimate of dt
|
dt=dtbest !Return new, improved estimate of dt
|
||||||
|
Loading…
Reference in New Issue
Block a user