mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-11-04 05:50:31 -05:00 
			
		
		
		
	Subroutine test9() now does effective solution for DT.
Next: expand this into an afc65b-like loop solution for DT f0 f1 f2 (phi0?) git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2773 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
		
							parent
							
								
									3ce1ead2f4
								
							
						
					
					
						commit
						a5066037b4
					
				@ -23,31 +23,34 @@ subroutine test9(c0,npts8,nsps8)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  nspsd=nsps8/ndown
 | 
					  nspsd=nsps8/ndown
 | 
				
			||||||
  nz=npts8/ndown
 | 
					  nz=npts8/ndown
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					! Start of afc loop here: solve for DT, f0, f1, f2, (phi0) ?
 | 
				
			||||||
  p=0.
 | 
					  p=0.
 | 
				
			||||||
  i0=5*nspsd
 | 
					  i0=5*nspsd
 | 
				
			||||||
  do i=0,nz-1
 | 
					  do i=0,nz-1
 | 
				
			||||||
     z=sum(c2(max(i-(nspsd-1),0):i))       !Integrate
 | 
					     z=sum(c2(max(i-(nspsd-1),0):i))       !Integrate
 | 
				
			||||||
     p(i0+i)=real(z)**2 + aimag(z)**2      !Symbol power at freq=0
 | 
					     p(i0+i)=real(z)**2 + aimag(z)**2      !Symbol power at freq=0
 | 
				
			||||||
!     write(51,3001) i,p(i)
 | 
					! Option here for coherent processing ?
 | 
				
			||||||
  enddo
 | 
					  enddo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  iz=85*nspsd
 | 
					  iz=85*nspsd
 | 
				
			||||||
  fac0=1.0/69.0
 | 
					 | 
				
			||||||
  fac1=1.0/16.0
 | 
					 | 
				
			||||||
  lagmax=13*nspsd
 | 
					  lagmax=13*nspsd
 | 
				
			||||||
  do lag=0,lagmax                          
 | 
					  do lag=0,lagmax                          
 | 
				
			||||||
     ss=0.
 | 
					     sum0=0.
 | 
				
			||||||
     do i=0,iz-1
 | 
					     sum1=0.
 | 
				
			||||||
        if(isync(1+i/nspsd).eq.1) then
 | 
					     j=-nspsd
 | 
				
			||||||
           ss=ss + fac1*p(i+lag)           !Add the sync powers
 | 
					     do i=1,85
 | 
				
			||||||
 | 
					        j=j+nspsd
 | 
				
			||||||
 | 
					        if(isync(i).eq.1) then
 | 
				
			||||||
 | 
					           sum1=sum1+p(j+lag)
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
           ss=ss - fac0*p(i+lag)           !Subtract the non-sync powers
 | 
					           sum0=sum0+p(j+lag)
 | 
				
			||||||
        endif
 | 
					        endif
 | 
				
			||||||
     enddo
 | 
					     enddo
 | 
				
			||||||
 | 
					     ss=(sum1/16.0)/(sum0/69.0) - 1.0
 | 
				
			||||||
     write(52,3001) lag,ss
 | 
					     write(52,3001) lag,ss
 | 
				
			||||||
3001 format(i5,f12.3)
 | 
					3001 format(i5,f12.3)
 | 
				
			||||||
  enddo
 | 
					  enddo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return
 | 
					  return
 | 
				
			||||||
end subroutine test9
 | 
					end subroutine test9
 | 
				
			||||||
  
 | 
					 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
//--------------------------------------------------------------- MainWindow
 | 
					//-------------------------------------------------------------- MainWindow
 | 
				
			||||||
#include "mainwindow.h"
 | 
					#include "mainwindow.h"
 | 
				
			||||||
#include "ui_mainwindow.h"
 | 
					#include "ui_mainwindow.h"
 | 
				
			||||||
#include "devsetup.h"
 | 
					#include "devsetup.h"
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user