summaryrefslogtreecommitdiff
path: root/lib/decoder_callbacks.f90
diff options
context:
space:
mode:
Diffstat (limited to 'lib/decoder_callbacks.f90')
-rw-r--r--lib/decoder_callbacks.f90374
1 files changed, 294 insertions, 80 deletions
diff --git a/lib/decoder_callbacks.f90 b/lib/decoder_callbacks.f90
index 33c2ac85..3c5821de 100644
--- a/lib/decoder_callbacks.f90
+++ b/lib/decoder_callbacks.f90
@@ -2,25 +2,37 @@ module decoder_callbacks
use jt4_decode
use jt65_decode
- use jt9_decode
+ use jt9_decode, only: jt9_decoder
use ft8_decode
use ft8_decodevar
use ft4_decode
- use fst4_decode
+ use fst4_decode, only: fst4_decoder
use q65_decode
use streaming_emit, only: streaming_emit_enabled, streaming_emit_decode
+ use decoder_engine_types
+ use jt65_host_support, only: write_jt65_averages
+ use, intrinsic :: iso_c_binding, only: c_ptr,c_null_ptr,c_char,c_null_char
implicit none
type :: decoder_callback_context
! Callback state is stored on each decoder instead of captured by a nested procedure.
+ integer :: mode = 0
integer :: nutc = 0
integer :: nfqso = 0
integer :: ncontest = 0
+ integer :: submode = 0
integer :: ios13 = -1
+ integer :: ios14 = -1
logical :: bVHF = .false.
logical :: b_superfox = .false.
character(len=12) :: mycall = ' '
+ real :: waveform_input_offset_seconds = 0.0
+ procedure(engine_observation_sink), pointer, nopass :: sink => null()
+ procedure(engine_superfox_sink), pointer, nopass :: superfox_sink => null()
+ type(c_ptr) :: sink_user = c_null_ptr
+ logical :: render_legacy = .true.
+ logical :: utc_is_hhmmss = .false.
end type decoder_callback_context
type, extends(jt4_decoder) :: counting_jt4_decoder
@@ -41,12 +53,16 @@ module decoder_callbacks
type, extends(ft8_decoder) :: counting_ft8_decoder
type(decoder_callback_context) :: context
integer :: decoded = 0
+ logical :: first_result = .true.
+ integer :: day_wrap = 0
end type counting_ft8_decoder
type, extends(ft8_decodervar) :: counting_ft8_decodervar
type(decoder_callback_context) :: context
integer :: decodedvar = 0
real :: xdtt(200)
+ logical :: first_result = .true.
+ integer :: day_wrap = 0
end type counting_ft8_decodervar
type, extends(ft4_decoder) :: counting_ft4_decoder
@@ -57,6 +73,7 @@ module decoder_callbacks
type, extends(fst4_decoder) :: counting_fst4_decoder
type(decoder_callback_context) :: context
integer :: decoded = 0
+ logical :: print_hash22 = .false.
end type counting_fst4_decoder
type, extends(q65_decoder) :: counting_q65_decoder
@@ -82,69 +99,79 @@ contains
logical, intent(in) :: is_average
integer, intent(in) :: ave
- character*22 decoded
- character*3 cflags
- integer context_nutc
+ character(len=22) :: decoded
+ character(len=3) :: cflags
+ type(decoder_callback_context) :: context
+ type(engine_observation) :: observation
+ integer :: i,display_utc
select type (typed_this => this)
type is (counting_jt4_decoder)
- context_nutc = typed_this%context%nutc
+ context=typed_this%context
class default
return
end select
- if(ich.eq.-99) stop
- if (have_sync) then
- decoded=decoded0
- cflags=' '
- if(decoded.ne.' ') then
- cflags='f '
- if(is_deep) then
- cflags='d '
- write(cflags(2:2),'(i1)') min(int(qual),9)
- if(qual.ge.10.0) cflags(2:2)='*'
- if(qual.lt.3.0) decoded(22:22)='?'
+ observation=engine_observation()
+ observation%mode=engine_mode_jt4
+ observation%variant=context%submode
+ observation%snr_db=snr
+ observation%frequency_hz=real(freq)
+ observation%dt_seconds=dt
+ observation%sync=this%sync_strength
+ observation%quality=qual
+ if(have_sync) then
+ observation%jt4%kind=1
+ observation%jt4%sync_polarity=merge(-1,1,sync=='#')
+ if(len_trim(decoded0)>0) then
+ observation%jt4%kind=2
+ observation%jt4%method=merge(2,1,is_deep)
+ observation%jt4%width_profile=max(0,ich-1)
+ if(is_average) observation%jt4%average_count=ave
+ do i=1,len_trim(decoded0)
+ observation%message(i)=decoded0(i:i)
+ enddo
+ endif
+ endif
+ if(associated(context%sink)) call context%sink(context%sink_user,observation)
+
+ display_utc=context%nutc
+ if(context%utc_is_hhmmss) display_utc=display_utc/100
+ if(context%render_legacy) then
+ if(have_sync) then
+ decoded=decoded0
+ cflags=' '
+ if(len_trim(decoded)>0) then
+ cflags='f '
+ if(is_deep) then
+ cflags='d '
+ write(cflags(2:2),'(i1)') min(int(qual),9)
+ if(qual>=10.0) cflags(2:2)='*'
+ if(qual<3.0) decoded(22:22)='?'
+ endif
+ if(is_average) then
+ write(cflags(3:3),'(i1)') min(ave,9)
+ if(ave>=10) cflags(3:3)='*'
+ if(cflags(1:1)=='f') cflags=cflags(1:1)//cflags(3:3)//' '
+ endif
endif
- if(is_average) then
- write(cflags(3:3),'(i1)') min(ave,9)
- if(ave.ge.10) cflags(3:3)='*'
- if(cflags(1:1).eq.'f') cflags=cflags(1:1)//cflags(3:3)//' '
+ if(streaming_emit_enabled()) then
+ call streaming_emit_decode('JT4',context%nutc,snr,dt,freq,decoded,context%utc_is_hhmmss)
+ else
+ write(*,1000) display_utc,snr,dt,freq,sync,decoded,cflags
endif
- endif
- if (streaming_emit_enabled()) then
- call streaming_emit_decode("JT4", context_nutc, snr, dt, freq, decoded)
else
- write(*,1000) context_nutc,snr,dt,freq,sync,decoded,cflags
- end if
- else
- if (.not. streaming_emit_enabled()) write(*,1000) context_nutc,snr,dt,freq
- end if
-1000 format(i4.4,i4,f5.1,i5,1x,'$',a1,1x,a22,1x,a3)
+ if(.not.streaming_emit_enabled()) write(*,1000) display_utc,snr,dt,freq
+ endif
+1000 format(i4.4,i4,f5.1,i5,1x,'$',a1,1x,a22,1x,a3)
+ endif
select type (typed_this => this)
type is (counting_jt4_decoder)
- typed_this%decoded = typed_this%decoded + 1
+ if(observation%jt4%kind==2) typed_this%decoded=typed_this%decoded+1
end select
end subroutine jt4_decoded
- subroutine jt4_average (this, used, utc, sync, dt, freq, flip)
- implicit none
- class(jt4_decoder), intent(inout) :: this
- logical, intent(in) :: used
- integer, intent(in) :: utc
- real, intent(in) :: sync
- real, intent(in) :: dt
- integer, intent(in) :: freq
- logical, intent(in) :: flip
- character(len=1) :: cused, csync
-
- cused = '.'
- csync = '*'
- if (used) cused = '$'
- if (flip) csync = '$'
- write(14,1000) cused,utc,sync,dt,freq,csync
-1000 format(a1,i5.4,f6.1,f6.2,i6,1x,a1)
- end subroutine jt4_average
subroutine jt65_decoded(this,sync,snr,dt,freq,drift,nflip,width, &
decoded0,ft,qual,nsmo,nsum,minsync)
@@ -171,9 +198,12 @@ contains
logical context_bVHF
logical is_deep,is_average
character decoded*22,csync*2,cflags*3
+ type(decoder_callback_context) :: context
+ type(engine_observation) :: observation
select type (typed_this => this)
type is (counting_jt65_decoder)
+ context = typed_this%context
context_nutc = typed_this%context%nutc
context_ios13 = typed_this%context%ios13
context_bVHF = typed_this%context%bVHF
@@ -181,7 +211,32 @@ contains
return
end select
+ observation=engine_observation()
+ observation%mode=engine_mode_jt65
+ observation%variant=context%submode
+ observation%snr_db=snr
+ observation%frequency_hz=real(freq)
+ observation%dt_seconds=dt
+ observation%sync=sync
+ observation%quality=real(qual)
+ observation%ap_type=ishft(ft,-2)
+ observation%jt65%kind=merge(1,0,len_trim(decoded0)>0)
+ observation%jt65%method=iand(ft,3)
+ observation%jt65%average_count=nsum
+ observation%jt65%sync_polarity=nflip
+ observation%jt65%smoothing=nsmo
+ observation%jt65%has_width=merge(1,0,context%bVHF)
+ if(context%bVHF) observation%jt65%width_hz=width
+ observation%jt65%has_drift=merge(1,0,nflip/=0)
+ if(nflip/=0) observation%jt65%drift_hz=real(drift)
+ do i=1,len_trim(decoded0)
+ observation%message(i)=decoded0(i:i)
+ enddo
+ if(associated(context%sink)) call context%sink(context%sink_user,observation)
+
+ if(context%render_legacy) then
!$omp critical(decode_results)
+ if(context%ios14==0) call write_jt65_averages(this,14)
decoded=decoded0
cflags=' '
is_deep=ft.eq.2
@@ -243,9 +298,10 @@ contains
call flush(6)
!$omp end critical(decode_results)
+ endif
select type (typed_this => this)
type is (counting_jt65_decoder)
- typed_this%decoded = typed_this%decoded + 1
+ if(len_trim(decoded0)>0) typed_this%decoded = typed_this%decoded + 1
end select
end subroutine jt65_decoded
@@ -259,16 +315,36 @@ contains
real, intent(in) :: freq
integer, intent(in) :: drift
character(len=22), intent(in) :: decoded
- integer context_nutc, context_ios13
+ type(engine_observation) :: observation
+ type(decoder_callback_context) :: context
+ integer context_nutc, context_ios13,i
select type (typed_this => this)
type is (counting_jt9_decoder)
+ context = typed_this%context
context_nutc = typed_this%context%nutc
context_ios13 = typed_this%context%ios13
class default
return
end select
+ observation=engine_observation()
+ observation%mode=engine_mode_jt9
+ observation%variant=context%submode
+ observation%snr_db=snr
+ observation%frequency_hz=freq
+ observation%dt_seconds=dt
+ observation%sync=sync
+ if(context%submode==0) then
+ observation%jt9%has_drift=1
+ observation%jt9%drift_hz_per_minute=real(drift)*(12000.0/16384.0)*60.0/48.96
+ endif
+ do i=1,len_trim(decoded)
+ observation%message(i)=decoded(i:i)
+ enddo
+ if(associated(context%sink)) call context%sink(context%sink_user,observation)
+
+ if(context%render_legacy) then
!$omp critical(decode_results)
if (streaming_emit_enabled()) then
@@ -282,14 +358,19 @@ contains
1002 format(i4.4,i4,i5,f6.1,f8.0,i4,3x,a22,' JT9')
call flush(6)
!$omp end critical(decode_results)
+ endif
select type (typed_this => this)
type is (counting_jt9_decoder)
typed_this%decoded = typed_this%decoded + 1
end select
end subroutine jt9_decoded
- subroutine ft8_decodedvar (this,snr,dt,freq,decodedvar,nap,qual)
+ subroutine ft8_decodedvar (this,snr,dt,freq,decodedvar,nap,qual,evidence)
implicit none
+ type(ft8_signal_evidence), optional, intent(in) :: evidence
+ type(engine_observation) :: observation
+ type(decoder_callback_context) :: context
+ integer :: message_index
class(ft8_decodervar), intent(inout) :: this
integer, intent(in) :: snr
@@ -307,8 +388,6 @@ contains
integer context_nutc, context_nfqso, context_ncontest, context_ios13
logical context_b_superfox
character(len=12) context_mycall
- data first/.true./
- save :: first,nwrap
isgrid4(w)=(len_trim(w).eq.4 .and. &
ichar(w(1:1)).ge.ichar('A') .and. ichar(w(1:1)).le.ichar('R') .and. &
@@ -318,6 +397,9 @@ contains
select type (typed_this => this)
type is (counting_ft8_decodervar)
+ context=typed_this%context
+ first=typed_this%first_result
+ nwrap=typed_this%day_wrap
context_nutc = typed_this%context%nutc
context_nfqso = typed_this%context%nfqso
context_ncontest = typed_this%context%ncontest
@@ -354,6 +436,7 @@ contains
if(qual.lt.0.17) decoded0(37:37)='?'
endif
+ if(context%render_legacy) then
if (streaming_emit_enabled()) then
call streaming_emit_decode("FT8", context_nutc, snr, dt, nint(freq), decoded0)
else
@@ -361,6 +444,8 @@ contains
end if
1000 format(i6.6,i4,f5.1,i5,' ~ ',1x,a37,1x,a2)
+ endif
+
if(context_ncontest.eq.6) then
i1=index(decoded0,' ')
i2=i1 + index(decoded0(i1+1:),' ')
@@ -394,18 +479,42 @@ contains
endif
endif
endif
- call flush(6)
- if(context_ios13.eq.0) call flush(13)
+ if(context%render_legacy) then
+ call flush(6)
+ if(context_ios13.eq.0) call flush(13)
+ endif
+
+ observation%variant=1
+ observation%snr_db=snr
+ observation%frequency_hz=freq
+ observation%dt_seconds=dt
+ observation%ap_type=nap
+ observation%quality=qual
+ do message_index=1,min(len_trim(decodedvar),37)
+ observation%message(message_index)=decodedvar(message_index:message_index)
+ enddo
+ if(present(evidence)) then
+ observation%ft8=evidence
+ if(evidence%has_waveform_start/=0) observation%ft8%waveform_start_seconds= &
+ evidence%waveform_start_seconds+context%waveform_input_offset_seconds
+ endif
+ if(associated(context%sink)) call context%sink(context%sink_user,observation)
select type (typed_this => this)
type is (counting_ft8_decodervar)
+ typed_this%first_result=first
+ typed_this%day_wrap=nwrap
typed_this%decodedvar = typed_this%decodedvar + 1
- typed_this%xdtt(typed_this%decodedvar)=dt
+ if(typed_this%decodedvar.le.size(typed_this%xdtt)) typed_this%xdtt(typed_this%decodedvar)=dt
end select
end subroutine ft8_decodedvar
- subroutine ft8_decoded (this,sync,snr,dt,freq,decoded,nap,qual)
+ subroutine ft8_decoded (this,sync,snr,dt,freq,decoded,nap,qual,evidence)
implicit none
+ type(ft8_signal_evidence), optional, intent(in) :: evidence
+ type(engine_observation) :: observation
+ type(decoder_callback_context) :: context
+ integer :: message_index
class(ft8_decoder), intent(inout) :: this
real, intent(in) :: sync
@@ -424,8 +533,6 @@ contains
integer context_nutc, context_nfqso, context_ncontest, context_ios13
logical context_b_superfox
character(len=12) context_mycall
- data first/.true./
- save :: first,nwrap
isgrid4(w)=(len_trim(w).eq.4 .and. &
ichar(w(1:1)).ge.ichar('A') .and. ichar(w(1:1)).le.ichar('R') .and. &
@@ -435,6 +542,9 @@ contains
select type (typed_this => this)
type is (counting_ft8_decoder)
+ context=typed_this%context
+ first=typed_this%first_result
+ nwrap=typed_this%day_wrap
context_nutc = typed_this%context%nutc
context_nfqso = typed_this%context%nfqso
context_ncontest = typed_this%context%ncontest
@@ -467,6 +577,7 @@ contains
endif
i0=1
+ if(context%render_legacy) then
if (streaming_emit_enabled()) then
if (i0.le.0) call streaming_emit_decode("FT8", context_nutc, snr, dt, nint(freq), decoded0(1:22))
if (i0.gt.0) call streaming_emit_decode("FT8", context_nutc, snr, dt, nint(freq), decoded0)
@@ -479,6 +590,8 @@ contains
if(context_ios13.eq.0) write(13,1002) context_nutc,nint(sync),snr,dt,freq,0,decoded0
1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a37,' FT8')
+ endif
+
if(context_ncontest.eq.6) then
i1=index(decoded0,' ')
i2=i1 + index(decoded0(i1+1:),' ')
@@ -513,34 +626,74 @@ contains
endif
endif
- call flush(6)
- if(context_ios13.eq.0) call flush(13)
+ if(context%render_legacy) then
+ call flush(6)
+ if(context_ios13.eq.0) call flush(13)
+ endif
+
+ observation%variant=0
+ observation%snr_db=snr
+ observation%frequency_hz=freq
+ observation%dt_seconds=dt
+ observation%ap_type=nap
+ observation%quality=qual
+ observation%sync=sync
+ do message_index=1,min(len_trim(decoded),37)
+ observation%message(message_index)=decoded(message_index:message_index)
+ enddo
+ if(present(evidence)) then
+ observation%ft8=evidence
+ if(evidence%has_waveform_start/=0) observation%ft8%waveform_start_seconds= &
+ evidence%waveform_start_seconds+context%waveform_input_offset_seconds
+ endif
+ if(associated(context%sink)) call context%sink(context%sink_user,observation)
select type (typed_this => this)
type is (counting_ft8_decoder)
+ typed_this%first_result=first
+ typed_this%day_wrap=nwrap
typed_this%decoded = typed_this%decoded + 1
end select
end subroutine ft8_decoded
- subroutine ft4_decoded (this,sync,snr,dt,freq,decoded,nap,qual)
+ subroutine ft4_decoded (this,sync,snr,dt,freq,decoded,nap,qual,evidence)
implicit none
class(ft4_decoder), intent(inout) :: this
+ type(ft4_signal_evidence), intent(in) :: evidence
+ type(engine_observation) :: observation
+ type(decoder_callback_context) :: context
real, intent(in) :: sync,dt,freq,qual
integer, intent(in) :: snr,nap
character(len=37), intent(in) :: decoded
character*2 annot
character*37 decoded0
- integer context_nutc, context_ios13
+ integer context_nutc, context_ios13,i
select type (typed_this => this)
type is (counting_ft4_decoder)
+ context=typed_this%context
context_nutc = typed_this%context%nutc
context_ios13 = typed_this%context%ios13
class default
return
end select
+ observation=engine_observation()
+ observation%mode=engine_mode_ft4
+ observation%snr_db=snr
+ observation%ap_type=nap
+ observation%dt_seconds=dt
+ observation%frequency_hz=freq
+ observation%sync=sync
+ observation%quality=qual
+ observation%ft4=evidence
+ do i=1,len_trim(decoded)
+ observation%message(i)=decoded(i:i)
+ enddo
+ if(associated(context%sink)) call context%sink(context%sink_user,observation)
+ if(.not.context%render_legacy) go to 20
+
decoded0=decoded
annot=' '
@@ -564,6 +717,7 @@ contains
10 call flush(6)
+20 continue
select type (typed_this => this)
type is (counting_ft4_decoder)
typed_this%decoded = typed_this%decoded + 1
@@ -571,7 +725,7 @@ contains
end subroutine ft4_decoded
subroutine fst4_decoded (this,nutc,sync,nsnr,dt,freq,decoded,nap, &
- qual,ntrperiod,fmid,w50)
+ qual,ntrperiod,fmid,w50,result)
implicit none
@@ -587,19 +741,29 @@ contains
integer, intent(in) :: ntrperiod
real, intent(in) :: fmid
real, intent(in) :: w50
+ type(fst4_result), intent(in), optional :: result
+ type(engine_observation) :: observation
+ type(decoder_callback_context) :: context
+ integer :: display_utc,message_index,space
+ logical :: print_hash22
character*2 annot
character*37 decoded0
+ character*37 suffix
character*70 line
integer context_ios13
select type (typed_this => this)
type is (counting_fst4_decoder)
- context_ios13 = typed_this%context%ios13
+ context=typed_this%context
+ context_ios13 = context%ios13
+ print_hash22=typed_this%print_hash22
class default
return
end select
+ display_utc=nutc
+ if(context%utc_is_hhmmss.and.ntrperiod>=60) display_utc=nutc/100
decoded0=decoded
annot=' '
if(nap.ne.0) then
@@ -607,15 +771,24 @@ contains
if(qual.lt.0.17) decoded0(37:37)='?'
endif
+ if(context%render_legacy) then
+ if(present(result)) then
+ if(print_hash22.and.result%has_hash22/=0) then
+ space=index(decoded0,' ')
+ suffix=decoded0(space+1:)
+ write(decoded0,'(a1,i7.7,a1)') '<',result%hash22,'>'
+ decoded0=trim(decoded0)//' '//trim(suffix)
+ endif
+ endif
if(ntrperiod.lt.60) then
- write(line,1001) nutc,nsnr,dt,nint(freq),decoded0,annot
+ write(line,1001) display_utc,nsnr,dt,nint(freq),decoded0,annot
1001 format(i6.6,i4,f5.1,i5,' ` ',1x,a37,1x,a2)
- if(context_ios13.eq.0) write(13,1002) nutc,nint(sync),nsnr,dt,freq,0,decoded0
+ if(context_ios13.eq.0) write(13,1002) display_utc,nint(sync),nsnr,dt,freq,0,decoded0
1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a37,' FST4')
else
- write(line,1003) nutc,nsnr,dt,nint(freq),decoded0,annot
+ write(line,1003) display_utc,nsnr,dt,nint(freq),decoded0,annot
1003 format(i4.4,i4,f5.1,i5,' ` ',1x,a37,1x,a2,2f7.3)
- if(context_ios13.eq.0) write(13,1004) nutc,nint(sync),nsnr,dt,freq,0,decoded0
+ if(context_ios13.eq.0) write(13,1004) display_utc,nint(sync),nsnr,dt,freq,0,decoded0
1004 format(i4.4,i4,i5,f6.1,f8.0,i4,3x,a37,' FST4')
endif
@@ -625,7 +798,8 @@ contains
endif
if (streaming_emit_enabled()) then
- call streaming_emit_decode("FST4", nutc, nsnr, dt, nint(freq), decoded0)
+ call streaming_emit_decode(merge('FST4W','FST4 ',context%mode==engine_mode_fst4w), &
+ nutc, nsnr, dt, nint(freq), decoded0,context%utc_is_hhmmss)
else
write(*,1005) line
end if
@@ -633,6 +807,21 @@ contains
call flush(6)
if(context_ios13.eq.0) call flush(13)
+ endif
+
+ observation=engine_observation()
+ observation%mode=context%mode
+ observation%snr_db=nsnr
+ observation%ap_type=nap
+ observation%dt_seconds=dt
+ observation%frequency_hz=freq
+ observation%sync=sync
+ observation%quality=qual
+ if(present(result)) observation%fst4=result
+ do message_index=1,min(len_trim(decoded),37)
+ observation%message(message_index)=decoded(message_index:message_index)
+ enddo
+ if(associated(context%sink)) call context%sink(context%sink_user,observation)
select type (typed_this => this)
type is (counting_fst4_decoder)
@@ -657,16 +846,40 @@ contains
integer, intent(in) :: ntrperiod
integer, intent(in) :: iflagdec !Recovered spare 78th bit (see genq65/q65_ap)
character*4 cflags
- integer context_ios13
+ integer context_ios13,display_utc,i
+ type(engine_observation) :: observation
+ type(decoder_callback_context) :: context
select type (typed_this => this)
type is (counting_q65_decoder)
context_ios13 = typed_this%context%ios13
+ context=typed_this%context
class default
return
end select
+ observation=engine_observation()
+ observation%mode=engine_mode_q65
+ observation%variant=context%submode
+ observation%snr_db=nsnr
+ observation%frequency_hz=freq
+ observation%dt_seconds=dt
+ observation%sync=snr1
+ observation%ap_type=idec
+ observation%q65%period_seconds=ntrperiod
+ observation%q65%method=idec
+ observation%q65%average_count=nused
+ observation%q65%recovered_bit78=iflagdec
+ do i=1,len_trim(decoded)
+ observation%message(i)=decoded(i:i)
+ enddo
+ if(associated(context%sink)) call context%sink(context%sink_user,observation)
+ display_utc=nutc
+ if(context%utc_is_hhmmss.and.ntrperiod>=60) display_utc=nutc/100
+
+ if(context%render_legacy) then
cflags=' '
+
if(idec.ge.0) then
cflags='q '
write(cflags(2:2),'(i1)') idec
@@ -679,35 +892,36 @@ contains
if(ntrperiod.lt.60) then
if (streaming_emit_enabled()) then
- call streaming_emit_decode("Q65", nutc, nsnr, dt, nint(freq), decoded)
+ call streaming_emit_decode("Q65", nutc, nsnr, dt, nint(freq), decoded,context%utc_is_hhmmss)
else
if(len_trim(cflags).gt.3) then
- write(*,1005) nutc,nsnr,dt,nint(freq),decoded,cflags
+ write(*,1005) display_utc,nsnr,dt,nint(freq),decoded,cflags
else
- write(*,1001) nutc,nsnr,dt,nint(freq),decoded,cflags
+ write(*,1001) display_utc,nsnr,dt,nint(freq),decoded,cflags
endif
end if
1001 format(i6.6,i4,f5.1,i5,' : ',1x,a37,1x,a3)
1005 format(i6.6,i4,f5.1,i5,' : ',1x,a37,1x,a4)
- if(context_ios13.eq.0) write(13,1002) nutc,nint(snr1),nsnr,dt,freq,0,decoded
+ if(context_ios13.eq.0) write(13,1002) display_utc,nint(snr1),nsnr,dt,freq,0,decoded
1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a37,' Q65')
else
if (streaming_emit_enabled()) then
- call streaming_emit_decode("Q65", nutc, nsnr, dt, nint(freq), decoded)
+ call streaming_emit_decode("Q65", nutc, nsnr, dt, nint(freq), decoded,context%utc_is_hhmmss)
else
if(len_trim(cflags).gt.3) then
- write(*,1006) nutc,nsnr,dt,nint(freq),decoded,cflags
+ write(*,1006) display_utc,nsnr,dt,nint(freq),decoded,cflags
else
- write(*,1003) nutc,nsnr,dt,nint(freq),decoded,cflags
+ write(*,1003) display_utc,nsnr,dt,nint(freq),decoded,cflags
endif
end if
1003 format(i4.4,i4,f5.1,i5,' : ',1x,a37,1x,a3)
1006 format(i4.4,i4,f5.1,i5,' : ',1x,a37,1x,a4)
- if(context_ios13.eq.0) write(13,1004) nutc,nint(snr1),nsnr,dt,freq,0,decoded
+ if(context_ios13.eq.0) write(13,1004) display_utc,nint(snr1),nsnr,dt,freq,0,decoded
1004 format(i4.4,i4,i5,f6.1,f8.0,i4,3x,a37,' Q65')
endif
call flush(6)
if(context_ios13.eq.0) call flush(13)
+ endif
select type (typed_this => this)
type is (counting_q65_decoder)