mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-11-03 13:30:52 -05:00 
			
		
		
		
	Implement signal reports in the range -31 to -50 dB.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2688 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
		
							parent
							
								
									460e45a0e3
								
							
						
					
					
						commit
						212b8cc528
					
				
							
								
								
									
										10
									
								
								lib/grid2n.f90
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								lib/grid2n.f90
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,10 @@
 | 
			
		||||
subroutine grid2n(grid,n)
 | 
			
		||||
  character*4 grid
 | 
			
		||||
 | 
			
		||||
  i1=ichar(grid(1:1))-ichar('A')
 | 
			
		||||
  i2=ichar(grid(3:3))-ichar('0')
 | 
			
		||||
  i=10*i1 + i2
 | 
			
		||||
  n=-i - 31
 | 
			
		||||
 | 
			
		||||
  return
 | 
			
		||||
end subroutine grid2n
 | 
			
		||||
							
								
								
									
										15
									
								
								lib/n2grid.f90
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								lib/n2grid.f90
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,15 @@
 | 
			
		||||
subroutine n2grid(n,grid)
 | 
			
		||||
  character*4 grid
 | 
			
		||||
  character*1 c1,c2
 | 
			
		||||
 | 
			
		||||
  if(n.gt.-31 .or. n.lt.-70) stop 'Error in n2grid'
 | 
			
		||||
  i=-(n+31)                           !NB: 0 <= i <= 39
 | 
			
		||||
  i1=i/10
 | 
			
		||||
  i2=mod(i,10)
 | 
			
		||||
  grid(1:1)=char(ichar('A')+i1)
 | 
			
		||||
  grid(2:2)='A'
 | 
			
		||||
  grid(3:3)=char(ichar('0')+i2)
 | 
			
		||||
  grid(4:4)='0'
 | 
			
		||||
 | 
			
		||||
  return
 | 
			
		||||
end subroutine n2grid
 | 
			
		||||
@ -1,47 +0,0 @@
 | 
			
		||||
      subroutine packgrid(grid,ng,text)
 | 
			
		||||
 | 
			
		||||
      parameter (NGBASE=180*180)
 | 
			
		||||
      character*4 grid
 | 
			
		||||
      logical text
 | 
			
		||||
 | 
			
		||||
      text=.false.
 | 
			
		||||
      if(grid.eq.'    ') go to 90                 !Blank grid is OK
 | 
			
		||||
 | 
			
		||||
C  Test for numerical signal report, etc.
 | 
			
		||||
      if(grid(1:1).eq.'-') then
 | 
			
		||||
         read(grid(2:3),*,err=1,end=1) n
 | 
			
		||||
 1       ng=NGBASE+1+n
 | 
			
		||||
         go to 100
 | 
			
		||||
      else if(grid(1:2).eq.'R-') then
 | 
			
		||||
         read(grid(3:4),*,err=2,end=2) n
 | 
			
		||||
 2       if(n.eq.0) go to 90
 | 
			
		||||
         ng=NGBASE+31+n
 | 
			
		||||
         go to 100
 | 
			
		||||
      else if(grid(1:2).eq.'RO') then
 | 
			
		||||
         ng=NGBASE+62
 | 
			
		||||
         go to 100
 | 
			
		||||
      else if(grid(1:3).eq.'RRR') then
 | 
			
		||||
         ng=NGBASE+63
 | 
			
		||||
         go to 100
 | 
			
		||||
      else if(grid(1:2).eq.'73') then
 | 
			
		||||
         ng=NGBASE+64
 | 
			
		||||
         go to 100
 | 
			
		||||
      endif
 | 
			
		||||
 | 
			
		||||
      if(grid(1:1).lt.'A' .or. grid(1:1).gt.'R') text=.true.
 | 
			
		||||
      if(grid(2:2).lt.'A' .or. grid(2:2).gt.'R') text=.true.
 | 
			
		||||
      if(grid(3:3).lt.'0' .or. grid(3:3).gt.'9') text=.true.
 | 
			
		||||
      if(grid(4:4).lt.'0' .or. grid(4:4).gt.'9') text=.true.
 | 
			
		||||
      if(text) go to 100
 | 
			
		||||
 | 
			
		||||
      call grid2deg(grid//'mm',dlong,dlat)
 | 
			
		||||
      long=dlong
 | 
			
		||||
      lat=dlat+ 90.0
 | 
			
		||||
      ng=((long+180)/2)*180 + lat
 | 
			
		||||
      go to 100
 | 
			
		||||
 | 
			
		||||
 90   ng=NGBASE + 1
 | 
			
		||||
 | 
			
		||||
 100  return
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										59
									
								
								lib/packgrid.f90
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								lib/packgrid.f90
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,59 @@
 | 
			
		||||
subroutine packgrid(grid,ng,text)
 | 
			
		||||
 | 
			
		||||
  parameter (NGBASE=180*180)
 | 
			
		||||
  character*4 grid
 | 
			
		||||
  logical text
 | 
			
		||||
 | 
			
		||||
  text=.false.
 | 
			
		||||
  if(grid.eq.'    ') go to 90               !Blank grid is OK
 | 
			
		||||
 | 
			
		||||
  if(grid(1:1).eq.'-') then                 !Test for numerical signal report
 | 
			
		||||
     read(grid(2:3),*,err=1,end=1) n        !NB: n is positive
 | 
			
		||||
     if(n.lt.1) n=1
 | 
			
		||||
     if(n.gt.50) n=50
 | 
			
		||||
     if(n.gt.30) then
 | 
			
		||||
        call n2grid(-n,grid)                !Very low S/N use locators near -90
 | 
			
		||||
        go to 10
 | 
			
		||||
     endif
 | 
			
		||||
1    ng=NGBASE+1+n
 | 
			
		||||
     go to 100
 | 
			
		||||
  else if(grid(1:2).eq.'R-') then
 | 
			
		||||
     read(grid(3:4),*,err=2,end=2) n
 | 
			
		||||
     if(n.lt.1) n=1
 | 
			
		||||
     if(n.gt.50) n=50
 | 
			
		||||
     if(n.gt.30) then
 | 
			
		||||
        call n2grid(-n-20,grid)           !Very low S/N use locators near -90
 | 
			
		||||
        go to 10
 | 
			
		||||
     endif
 | 
			
		||||
 | 
			
		||||
2    if(n.eq.0) go to 90
 | 
			
		||||
     ng=NGBASE+31+n
 | 
			
		||||
     go to 100
 | 
			
		||||
  else if(grid(1:2).eq.'RO') then
 | 
			
		||||
     ng=NGBASE+62
 | 
			
		||||
     go to 100
 | 
			
		||||
  else if(grid(1:3).eq.'RRR') then
 | 
			
		||||
     ng=NGBASE+63
 | 
			
		||||
     go to 100
 | 
			
		||||
  else if(grid(1:2).eq.'73') then
 | 
			
		||||
     ng=NGBASE+64
 | 
			
		||||
     go to 100
 | 
			
		||||
  endif
 | 
			
		||||
 | 
			
		||||
  if(grid(1:1).lt.'A' .or. grid(1:1).gt.'R') text=.true.
 | 
			
		||||
  if(grid(2:2).lt.'A' .or. grid(2:2).gt.'R') text=.true.
 | 
			
		||||
  if(grid(3:3).lt.'0' .or. grid(3:3).gt.'9') text=.true.
 | 
			
		||||
  if(grid(4:4).lt.'0' .or. grid(4:4).gt.'9') text=.true.
 | 
			
		||||
  if(text) go to 100
 | 
			
		||||
 | 
			
		||||
10 call grid2deg(grid//'mm',dlong,dlat)
 | 
			
		||||
  long=dlong
 | 
			
		||||
  lat=dlat+ 90.0
 | 
			
		||||
  ng=((long+180)/2)*180 + lat
 | 
			
		||||
  go to 100
 | 
			
		||||
 | 
			
		||||
90 ng=NGBASE + 1
 | 
			
		||||
 | 
			
		||||
100 return
 | 
			
		||||
end subroutine packgrid
 | 
			
		||||
 | 
			
		||||
@ -9,6 +9,14 @@
 | 
			
		||||
      dlong=(ng/180)*2 - 180 + 2
 | 
			
		||||
      call deg2grid(dlong,dlat,grid6)
 | 
			
		||||
      grid=grid6(:4)
 | 
			
		||||
      if(grid(2:2).eq.'A' .and. grid(4:4).eq.'0') then
 | 
			
		||||
         i=ichar(grid(1:1))
 | 
			
		||||
         if(i.ge.ichar('A') .and. i.le.ichar('D')) then
 | 
			
		||||
            call grid2n(grid,n)
 | 
			
		||||
            if(n.ge.-50) write(grid,1012) n
 | 
			
		||||
            if(n.lt.-50) write(grid,1022) n+20
 | 
			
		||||
         endif
 | 
			
		||||
      endif
 | 
			
		||||
      go to 100
 | 
			
		||||
 | 
			
		||||
 10   n=ng-NGBASE-1
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
//--------------------------------------------------------------- MainWindow
 | 
			
		||||
//---------------------------------------------------------------- MainWindow
 | 
			
		||||
#include "mainwindow.h"
 | 
			
		||||
#include "ui_mainwindow.h"
 | 
			
		||||
#include "devsetup.h"
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user