mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-24 02:12:37 -04:00
WIP on rst8.
This commit is contained in:
parent
3e27ce83e6
commit
290b34c99c
@ -15,7 +15,7 @@ CFLAGS= -O9 -Wall
|
|||||||
%.o: %.F90
|
%.o: %.F90
|
||||||
${FC} ${FFLAGS} -c $<
|
${FC} ${FFLAGS} -c $<
|
||||||
|
|
||||||
all: rs_sf.a rstest rs_125_49
|
all: rs_sf.a rstest rs_125_49 rst8
|
||||||
|
|
||||||
OBJS1 = rstest.o ran1.o rs_sf.a
|
OBJS1 = rstest.o ran1.o rs_sf.a
|
||||||
rstest: $(OBJS1)
|
rstest: $(OBJS1)
|
||||||
@ -25,7 +25,11 @@ OBJS2 = rs_125_49.o ran1.o get_crc14.o rs_sf.a
|
|||||||
rs_125_49: $(OBJS2)
|
rs_125_49: $(OBJS2)
|
||||||
$(FC) -o rs_125_49 $(OBJS2) rs_sf.a
|
$(FC) -o rs_125_49 $(OBJS2) rs_sf.a
|
||||||
|
|
||||||
rs_sf.a: init_rs_sf.o encode_rs_sf.o decode_rs_sf.o rs_sf.o
|
#OBJS3 = rst8.o encode_rs_8.o decode_rs_8.o wrap_rs_8.o
|
||||||
|
rst8: rst8.o wrap_rs_8.o
|
||||||
|
$(FC) -o rst8 rst8.o wrap_rs_8.o librs.a
|
||||||
|
|
||||||
|
rs_sf.a: init_rs_sf.o encode_rs_sf.o decode_rs_sf.o rs_sf.o
|
||||||
ar -crs rs_sf.a init_rs_sf.o encode_rs_sf.o decode_rs_sf.o rs_sf.o
|
ar -crs rs_sf.a init_rs_sf.o encode_rs_sf.o decode_rs_sf.o rs_sf.o
|
||||||
|
|
||||||
init_rs_sf.o: init_rs.c
|
init_rs_sf.o: init_rs.c
|
||||||
@ -35,6 +39,11 @@ encode_rs_sf.o: encode_rs.c
|
|||||||
decode_rs_sf.o: decode_rs.c
|
decode_rs_sf.o: decode_rs.c
|
||||||
gcc -DBIGSYM=1 $(CFLAGS) -c -o $@ $^
|
gcc -DBIGSYM=1 $(CFLAGS) -c -o $@ $^
|
||||||
|
|
||||||
|
encode_rs_8.o: encode_rs.c
|
||||||
|
gcc -DFIXED=1 $(CFLAGS) -c -o $@ $^
|
||||||
|
decode_rs_8.o: decode_rs.c
|
||||||
|
gcc -DFIXED=1 $(CFLAGS) -c -o $@ $^
|
||||||
|
|
||||||
.PHONY : clean
|
.PHONY : clean
|
||||||
clean:
|
clean:
|
||||||
-rm -f *.o *.a *.exe
|
-rm -f *.o *.a *.exe
|
||||||
|
@ -77,6 +77,7 @@ program sfoxtest
|
|||||||
ngoodsync=0
|
ngoodsync=0
|
||||||
ngood=0
|
ngood=0
|
||||||
ntot=0
|
ntot=0
|
||||||
|
nworst=0
|
||||||
|
|
||||||
do ifile=1,nfiles
|
do ifile=1,nfiles
|
||||||
xnoise=0.
|
xnoise=0.
|
||||||
@ -123,6 +124,7 @@ program sfoxtest
|
|||||||
|
|
||||||
nharderr=count(jdat.ne.idat) !Count hard errors
|
nharderr=count(jdat.ne.idat) !Count hard errors
|
||||||
ntot=ntot+nharderr
|
ntot=ntot+nharderr
|
||||||
|
nworst=max(nworst,nharderr)
|
||||||
|
|
||||||
if(snrdb.ne.0) then
|
if(snrdb.ne.0) then
|
||||||
fname='000000_000001.wav'
|
fname='000000_000001.wav'
|
||||||
@ -147,11 +149,11 @@ program sfoxtest
|
|||||||
fgoodsync=float(ngoodsync)/nfiles
|
fgoodsync=float(ngoodsync)/nfiles
|
||||||
fgood=float(ngood)/nfiles
|
fgood=float(ngood)/nfiles
|
||||||
if(isnr.eq.0) write(*,1300)
|
if(isnr.eq.0) write(*,1300)
|
||||||
1300 format(' SNR N fsync fgood'/ &
|
1300 format(' SNR N fsync fgood averr worst'/ &
|
||||||
'----------------------------')
|
'-----------------------------------------')
|
||||||
ave_harderr=float(ntot)/nfiles
|
ave_harderr=float(ntot)/nfiles
|
||||||
write(*,1310) snr,nfiles,fgoodsync,fgood,ave_harderr
|
write(*,1310) snr,nfiles,fgoodsync,fgood,ave_harderr,nworst
|
||||||
1310 format(f7.2,i6,2f7.2,f7.1)
|
1310 format(f7.2,i6,2f7.2,f7.1,i6)
|
||||||
if(snrdb.ne.0.0) exit
|
if(snrdb.ne.0.0) exit
|
||||||
if(fgoodsync.lt.0.5) exit
|
if(fgoodsync.lt.0.5) exit
|
||||||
enddo ! isnr
|
enddo ! isnr
|
||||||
|
14
lib/superfox/wrap_rs_8.c
Normal file
14
lib/superfox/wrap_rs_8.c
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
void encode_rs_8_(unsigned char data[], unsigned char parity[], int *npad)
|
||||||
|
{
|
||||||
|
encode_rs_8(data,parity,*npad); //Compute the parity symbols
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int decode_rs_8_(unsigned char *data, int *era_pos, int *numera, int *npad)
|
||||||
|
{
|
||||||
|
int nerr;
|
||||||
|
nerr=decode_rs_8(data,era_pos,*numera,*npad);
|
||||||
|
return nerr;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user