mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 05:38:46 -05:00
Add fst280 files to CMakeLists.txt. Doesn't build yet.
This commit is contained in:
parent
a720e0ec21
commit
5dfb3c781b
@ -595,6 +595,21 @@ set (wsjt_FSRCS
|
||||
lib/wqencode.f90
|
||||
lib/wspr_downsample.f90
|
||||
lib/zplot9.f90
|
||||
lib/fst280/bpdecode280_101.f90
|
||||
lib/fst280/bpdecode280_74.f90
|
||||
lib/fst280/decode280_101.f90
|
||||
lib/fst280/decode280_74.f90
|
||||
lib/fst280/encode280_101.f90
|
||||
lib/fst280/encode280_74.f90
|
||||
lib/fst280/fst280d.f90
|
||||
lib/fst280/fst280sim.f90
|
||||
lib/fst280/genfst280_wave.f90
|
||||
lib/fst280/genfst280.f90
|
||||
lib/fst280/get_ft280_bitmetrics.f90
|
||||
lib/fst280/ldpcsim280_101.f90
|
||||
lib/fst280/ldpcsim280_74.f90
|
||||
lib/fst280/osd280_101.f90
|
||||
lib/fst280/osd280_74.f90
|
||||
)
|
||||
|
||||
# temporary workaround for a gfortran v7.3 ICE on Fedora 27 64-bit
|
||||
@ -1351,6 +1366,18 @@ target_link_libraries (ft4sim_mult wsjt_fort wsjt_cxx)
|
||||
add_executable (record_time_signal Audio/tools/record_time_signal.cpp)
|
||||
target_link_libraries (record_time_signal wsjt_cxx wsjt_qtmm wsjt_qt)
|
||||
|
||||
add_executable (fst280d lib/fst280/fst280d.f90 wsjtx.rc)
|
||||
target_link_libraries (fst280d wsjt_fort wsjt_cxx)
|
||||
|
||||
add_executable (fst280sim lib/fst280/fst280sim.f90 wsjtx.rc)
|
||||
target_link_libraries (fst280sim wsjt_fort wsjt_cxx)
|
||||
|
||||
add_executable (ldpcsim280_101 lib/fst280/ldpcsim280_101.f90 wsjtx.rc)
|
||||
target_link_libraries (ldpcsim280_101 wsjt_fort wsjt_cxx)
|
||||
|
||||
add_executable (ldpcsim280_74 lib/fst280/ldpcsim280_74.f90 wsjtx.rc)
|
||||
target_link_libraries (ldpcsim280_74 wsjt_fort wsjt_cxx)
|
||||
|
||||
endif(WSJT_BUILD_UTILS)
|
||||
|
||||
# build the main application
|
||||
|
72
lib/fst280/gen_fst280wave.f90
Normal file
72
lib/fst280/gen_fst280wave.f90
Normal file
@ -0,0 +1,72 @@
|
||||
subroutine gen_fst280wave(itone,nsym,nsps,nwave,fsample,hmod,f0,icmplx,cwave,wave)
|
||||
|
||||
real wave(nwave)
|
||||
complex cwave(nwave)
|
||||
real, allocatable, save :: pulse(:)
|
||||
real, allocatable :: dphi(:)
|
||||
integer itone(nsym)
|
||||
logical first
|
||||
data first/.true./
|
||||
save first,twopi,dt,tsym
|
||||
|
||||
if(first) then
|
||||
allocate( pulse(3*nsps*fsample) )
|
||||
twopi=8.0*atan(1.0)
|
||||
dt=1.0/fsample
|
||||
tsym=nsps/fsample
|
||||
! Compute the smoothed frequency-deviation pulse
|
||||
do i=1,3*nsps
|
||||
tt=(i-1.5*nsps)/real(nsps)
|
||||
pulse(i)=gfsk_pulse(2.0,tt)
|
||||
enddo
|
||||
first=.false.
|
||||
endif
|
||||
|
||||
! Compute the smoothed frequency waveform.
|
||||
! Length = (nsym+2)*nsps samples, zero-padded
|
||||
allocate( dphi(0:(nsym+2)*nsps-1) )
|
||||
dphi_peak=twopi*hmod/real(nsps)
|
||||
dphi=0.0
|
||||
do j=1,nsym
|
||||
ib=(j-1)*nsps
|
||||
ie=ib+3*nsps-1
|
||||
dphi(ib:ie) = dphi(ib:ie) + dphi_peak*pulse(1:3*nsps)*itone(j)
|
||||
enddo
|
||||
|
||||
! Calculate and insert the audio waveform
|
||||
phi=0.0
|
||||
dphi = dphi + twopi*(f0-1.5*hmod/tsym)*dt !Shift frequency up by f0
|
||||
wave=0.
|
||||
if(icmplx.eq.1) cwave=0.
|
||||
k=0
|
||||
do j=0,(nsym+2)*nsps-1
|
||||
k=k+1
|
||||
if(icmplx.eq.0) then
|
||||
wave(k)=sin(phi)
|
||||
else
|
||||
cwave(k)=cmplx(cos(phi),sin(phi))
|
||||
endif
|
||||
phi=mod(phi+dphi(j),twopi)
|
||||
enddo
|
||||
|
||||
! Compute the ramp-up and ramp-down symbols
|
||||
if(icmplx.eq.0) then
|
||||
wave(1:nsps/2)=0.0
|
||||
wave(nsps/2+1:nsps)=wave(nsps/2+1:nsps) * &
|
||||
(1.0-cos(twopi*(/(i,i=0,nsps/2-1)/)/real(nsps)))/2.0
|
||||
k1=(nsym+1)*nsps+1
|
||||
wave(k1+nsps/2:)=0.0
|
||||
wave(k1:k1+nsps/2-1)=wave(k1:k1+nsps/2-1) * &
|
||||
(1.0+cos(twopi*(/(i,i=0,nsps/2-1)/)/real(nsps)))/2.0
|
||||
else
|
||||
cwave(1:nsps/2)=0.0
|
||||
cwave(nsps/2+1:nsps)=cwave(nsps/2+1:nsps) * &
|
||||
(1.0-cos(twopi*(/(i,i=0,nsps/2-1)/)/real(nsps)))/2.0
|
||||
k1=(nsym+1)*nsps+1
|
||||
cwave(k1+nsps/2:)=0.0
|
||||
cwave(k1:k1+nsps/2-1)=cwave(k1:k1+nsps/2-1) * &
|
||||
(1.0+cos(twopi*(/(i,i=0,nsps/2-1)/)/real(nsps)))/2.0
|
||||
endif
|
||||
|
||||
return
|
||||
end subroutine gen_fst280wave
|
Loading…
Reference in New Issue
Block a user