Join/Login

Business Software

Open Source Software

For Vendors

Blog

About

More

Articles

Create

SourceForge Podcast

Site Documentation

Subscribe to our Newsletter

Support Request

For Vendors Help Create Join Login

Business Software

Open Source Software

SourceForge Podcast

Resources

Articles

Case Studies

Blog

Menu

Help

Create

Join

Login

Home

Browse

WSJT

WSPR

WSJT WSPR

Weak signal ham radio communication

Brought to you by: bsomervi, chetfenn, dg2ycb, k1jt

Summary

Files

Reviews

Support

Mailing Lists

Git ▾

WSJT-X

WSPR

WSPR-X

WSJT

Echo

FMT

MAP65

MAP65IQ

WSJT-X Superbuild

More...

Old SVN

Menu ▾ ▴

Browse Commits

Fork

Merge Requests 0

Forks 1

Branches

master

Tags

wspr212

[40a5ff]: / mept162.f  Maximize  Restore  History

Download this file

110 lines (96 with data), 3.4 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109

      subroutine mept162(outfile,appdir,nappdir,f0,ncmdline,id,npts,

     +  nbfo,ierr)

C  Orchestrates the process of finding, synchronizing, and decoding

C  WSPR signals.

      integer*2 id(npts)

      character*22 message

      character*80 outfile,appdir,alltxt

      character*11 datetime

      character cdate*8,ctime*10

      real*8 f0,freq,tsec

      real ps(-256:256)

      real sstf(5,275)

      real a(5)

      complex c2(65536)

      complex c3(45000),c4(45000)

C  Mix from "nbfo" +/- 100 Hz to baseband, and downsample by 1/32

      call mix162(id,npts,nbfo,c2,jz,ps)

      if(ncmdline.eq.0) then

C  Compute pixmap.dat

         call spec162(c2,jz,appdir,nappdir)

      endif

C  Look for sync patterns, get DF and DT

      call sync162(c2,jz,ps,sstf,kz)

      ierr = 0

      if(kz.eq.0) go to 900

      if (kz.gt.275 .or. kz.lt.0) then

        call getutc(cdate,ctime,tsec)

        call cs_lock('mept162')

        write(*,1000) ctime,kz

 1000   format('Time ',a8,'. Error from sync162: kz is',i10)

        call cs_unlock

        ierr = 1

        return

      endif

      do k=1,kz

         snrsync=sstf(1,k)

         snrx=sstf(2,k)

         dtx=sstf(3,k)

         dfx=sstf(4,k)

         drift=sstf(5,k)

         a(1)=-dfx

         a(2)=-0.5*drift

         a(3)=0.

         call twkfreq(c2,c3,jz,a)                    !Remove drift

         minsync=1                                   !####

         nsync=nint(snrsync)

         nsnrx=nint(snrx)

         if(nsnrx.lt.-33) nsnrx=-33

         if(nsync.lt.0) nsync=0

         freq=f0 + 1.d-6*(dfx+nbfo)

         message='                      '

         if(nsync.ge.minsync .and. nsnrx.ge.-33) then      !### -31 dB limit?

            dt=1.0/375

            do idt=0,128

               ii=(idt+1)/2

               if(mod(idt,2).eq.1) ii=-ii

               i1=nint((dtx+2.0)/dt) + ii !Start index for synced symbols

               if(i1.ge.1) then

!  Fix this earlier!

                  c4(1:jz-i1+1)=c3(i1:)

                  c4(jz-i1+2:)=0.

               else

                  c4(:-i1+1)=0.

                  c4(-i1+2:jz)=c3(:i1+jz-1)

                  if(jz.lt.45000) c4(jz:)=0.

               endif

               call decode162(c4,45000,message,ncycles,metric,nerr)

               if(message(1:6).ne.'      ' .and.

     +            message(1:6).ne.'000AAA' .and.

     +            index(message,'A000AA').le.0) go to 23

            enddo

            go to 24

 23         i2=index(outfile,'.wav')-1

            if(i2.le.0) i2=index(outfile,'.WAV')-1

            datetime=outfile(max(1,i2-10):i2)

            datetime(7:7)=' '

            nf1=nint(-a(2))

            alltxt=appdir(:nappdir)//'/ALL_WSPR.TXT'

            call cs_lock('mept162a')

            if(ncmdline.eq.0) open(13,file=alltxt,status='unknown',

     +           position='append')

            write(13,1010) datetime,nsync,nsnrx,dtx,freq,message,nf1,

     +           ncycles/81,ii

            if(ncmdline.eq.0) close(13)

            if(ncmdline.eq.1) write(*,1010) datetime,nsync,nsnrx,dtx,

     +           freq,message,nf1,ncycles/81,ii

            write(14,1010) datetime,nsync,nsnrx,dtx,freq,message,nf1,

     +           ncycles/81,ii

 1010       format(a11,i4,i4,f5.1,f11.6,2x,a22,i3,i6,i5)

            i1=index(message,' ')

            call cs_unlock

         endif

 24      continue

      enddo

 900  return

      end

SourceForge

Create a Project

Open Source Software

Business Software

Top Downloaded Projects

Company

About

Team

SourceForge Headquarters
225 Broadway Suite 1600
San Diego, CA 92101
+1 (858) 422-6466

Resources

Support

Site Documentation

Site Status

SourceForge Reviews

© 2025 Slashdot Media. All Rights Reserved.

Terms Privacy Opt Out Advertise

×
Want the latest updates on software, tech news, and AI?

Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.

Submit