kopia lustrzana https://github.com/ag1le/morse-wip
Changed program name to bmorse (b stands for bayesian).
Cleaned up all files and changed morse.h tp bmorse.h 2013-DEC-29 Added more options to enable debugging and testing bmorse decoder while using WAV audio files as source. Bit filter (-bfv) option does envelope smoothing - 10 msec rise time assumption based on experiences with FLDIGI. Plot option (-plt) enables piping such as "bmorse -plt <sndfile> | xplot" to visualize the CW envelope. AGC option (-agc) has fast rise and slow decay in case original signal has very large dynamic range. AMP option (-amp) allows to multiply envelope signal with a constant. DUR option (-dur) allows manually to set Bayesian decoder sample duration (used in path.c). FFT option (-fft) enables either FFT based signal recovery or just low pass filtering. - FFT has also peak_detection() to find if there are multiple signals in the audio frequency range. - Parameter "delta" sets peak detection threshold - Width (-wid) and length (-len) parameters can be used to set FFT size and chunkingmaster
rodzic
995b9b17dc
commit
ab2a727620
63
Makefile
63
Makefile
|
@ -33,10 +33,10 @@ am__make_dryrun = \
|
|||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
pkgdatadir = $(datadir)/full-package-name
|
||||
pkgincludedir = $(includedir)/full-package-name
|
||||
pkglibdir = $(libdir)/full-package-name
|
||||
pkglibexecdir = $(libexecdir)/full-package-name
|
||||
pkgdatadir = $(datadir)/bmorse
|
||||
pkgincludedir = $(includedir)/bmorse
|
||||
pkglibdir = $(libdir)/bmorse
|
||||
pkglibexecdir = $(libexecdir)/bmorse
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
|
@ -49,7 +49,7 @@ POST_INSTALL = :
|
|||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
bin_PROGRAMS = morse$(EXEEXT)
|
||||
bin_PROGRAMS = bmorse$(EXEEXT)
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||
|
@ -68,16 +68,16 @@ CONFIG_CLEAN_VPATH_FILES =
|
|||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am__dirstamp = $(am__leading_dot)dirstamp
|
||||
am_morse_OBJECTS = src/initl.$(OBJEXT) src/likhd.$(OBJEXT) \
|
||||
am_bmorse_OBJECTS = src/initl.$(OBJEXT) src/likhd.$(OBJEXT) \
|
||||
src/path.$(OBJEXT) src/spdtr.$(OBJEXT) src/trelis.$(OBJEXT) \
|
||||
src/bpfdet.$(OBJEXT) src/inputl.$(OBJEXT) src/model.$(OBJEXT) \
|
||||
src/probp.$(OBJEXT) src/sprob.$(OBJEXT) src/trprob.$(OBJEXT) \
|
||||
src/kalfil.$(OBJEXT) src/morse.$(OBJEXT) src/proces.$(OBJEXT) \
|
||||
src/kalfil.$(OBJEXT) src/bmorse.$(OBJEXT) src/proces.$(OBJEXT) \
|
||||
src/savep.$(OBJEXT) src/stats.$(OBJEXT) src/xtrans.$(OBJEXT) \
|
||||
src/noise.$(OBJEXT) src/ptrans.$(OBJEXT) src/transl.$(OBJEXT) \
|
||||
src/window.$(OBJEXT)
|
||||
morse_OBJECTS = $(am_morse_OBJECTS)
|
||||
morse_LDADD = $(LDADD)
|
||||
bmorse_OBJECTS = $(am_bmorse_OBJECTS)
|
||||
bmorse_LDADD = $(LDADD)
|
||||
DEFAULT_INCLUDES = -I.
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
|
@ -86,8 +86,8 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
|||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(morse_SOURCES)
|
||||
DIST_SOURCES = $(morse_SOURCES)
|
||||
SOURCES = $(bmorse_SOURCES)
|
||||
DIST_SOURCES = $(bmorse_SOURCES)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
|
@ -116,12 +116,12 @@ AUTOCONF = ${SHELL} /home/mauri/Projects/morse/missing --run autoconf
|
|||
AUTOHEADER = ${SHELL} /home/mauri/Projects/morse/missing --run autoheader
|
||||
AUTOMAKE = ${SHELL} /home/mauri/Projects/morse/missing --run automake-1.11
|
||||
AWK = gawk
|
||||
CC = gcc
|
||||
CC = clang
|
||||
CCDEPMODE = depmode=gcc3
|
||||
CFLAGS = -g -O2
|
||||
CPP = gcc -E
|
||||
CPP = clang -E
|
||||
CPPFLAGS =
|
||||
CXX = g++
|
||||
CXX = clang++
|
||||
CXXDEPMODE = depmode=gcc3
|
||||
CXXFLAGS = -g -O2
|
||||
CYGPATH_W = echo
|
||||
|
@ -145,24 +145,24 @@ LTLIBOBJS =
|
|||
MAKEINFO = ${SHELL} /home/mauri/Projects/morse/missing --run makeinfo
|
||||
MKDIR_P = /bin/mkdir -p
|
||||
OBJEXT = o
|
||||
PACKAGE = full-package-name
|
||||
PACKAGE_BUGREPORT = BUG-REPORT-ADDRESS
|
||||
PACKAGE_NAME = FULL-PACKAGE-NAME
|
||||
PACKAGE_STRING = FULL-PACKAGE-NAME VERSION
|
||||
PACKAGE_TARNAME = full-package-name
|
||||
PACKAGE = bmorse
|
||||
PACKAGE_BUGREPORT = ag1le@innomore.com
|
||||
PACKAGE_NAME = bmorse
|
||||
PACKAGE_STRING = bmorse 0.1
|
||||
PACKAGE_TARNAME = bmorse
|
||||
PACKAGE_URL =
|
||||
PACKAGE_VERSION = VERSION
|
||||
PACKAGE_VERSION = 0.1
|
||||
PATH_SEPARATOR = :
|
||||
SET_MAKE =
|
||||
SHELL = /bin/bash
|
||||
STRIP =
|
||||
VERSION = VERSION
|
||||
VERSION = 0.1
|
||||
abs_builddir = /home/mauri/Projects/morse
|
||||
abs_srcdir = /home/mauri/Projects/morse
|
||||
abs_top_builddir = /home/mauri/Projects/morse
|
||||
abs_top_srcdir = /home/mauri/Projects/morse
|
||||
ac_ct_CC = gcc
|
||||
ac_ct_CXX = g++
|
||||
ac_ct_CC = clang
|
||||
ac_ct_CXX =
|
||||
am__include = include
|
||||
am__leading_dot = .
|
||||
am__quote =
|
||||
|
@ -203,11 +203,11 @@ top_srcdir = .
|
|||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
|
||||
AM_CFLAGS = -ggdb
|
||||
morse_SOURCES = src/initl.c src/likhd.c src/path.c\
|
||||
bmorse_SOURCES = src/initl.c src/likhd.c src/path.c\
|
||||
src/spdtr.c src/trelis.c\
|
||||
src/bpfdet.c src/inputl.c src/model.c \
|
||||
src/probp.c src/sprob.c src/trprob.c\
|
||||
src/kalfil.c src/morse.c src/proces.c src/savep.c \
|
||||
src/kalfil.c src/bmorse.c src/proces.c src/savep.c \
|
||||
src/stats.c src/xtrans.c\
|
||||
src/noise.c src/ptrans.c src/transl.c \
|
||||
src/window.c
|
||||
|
@ -329,7 +329,8 @@ src/trprob.$(OBJEXT): src/$(am__dirstamp) \
|
|||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/kalfil.$(OBJEXT): src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/morse.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/bmorse.$(OBJEXT): src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/proces.$(OBJEXT): src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/savep.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
|
||||
|
@ -343,19 +344,19 @@ src/transl.$(OBJEXT): src/$(am__dirstamp) \
|
|||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/window.$(OBJEXT): src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
morse$(EXEEXT): $(morse_OBJECTS) $(morse_DEPENDENCIES) $(EXTRA_morse_DEPENDENCIES)
|
||||
@rm -f morse$(EXEEXT)
|
||||
$(LINK) $(morse_OBJECTS) $(morse_LDADD) $(LIBS)
|
||||
bmorse$(EXEEXT): $(bmorse_OBJECTS) $(bmorse_DEPENDENCIES) $(EXTRA_bmorse_DEPENDENCIES)
|
||||
@rm -f bmorse$(EXEEXT)
|
||||
$(LINK) $(bmorse_OBJECTS) $(bmorse_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
-rm -f src/bmorse.$(OBJEXT)
|
||||
-rm -f src/bpfdet.$(OBJEXT)
|
||||
-rm -f src/initl.$(OBJEXT)
|
||||
-rm -f src/inputl.$(OBJEXT)
|
||||
-rm -f src/kalfil.$(OBJEXT)
|
||||
-rm -f src/likhd.$(OBJEXT)
|
||||
-rm -f src/model.$(OBJEXT)
|
||||
-rm -f src/morse.$(OBJEXT)
|
||||
-rm -f src/noise.$(OBJEXT)
|
||||
-rm -f src/path.$(OBJEXT)
|
||||
-rm -f src/probp.$(OBJEXT)
|
||||
|
@ -374,13 +375,13 @@ mostlyclean-compile:
|
|||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
include src/$(DEPDIR)/bmorse.Po
|
||||
include src/$(DEPDIR)/bpfdet.Po
|
||||
include src/$(DEPDIR)/initl.Po
|
||||
include src/$(DEPDIR)/inputl.Po
|
||||
include src/$(DEPDIR)/kalfil.Po
|
||||
include src/$(DEPDIR)/likhd.Po
|
||||
include src/$(DEPDIR)/model.Po
|
||||
include src/$(DEPDIR)/morse.Po
|
||||
include src/$(DEPDIR)/noise.Po
|
||||
include src/$(DEPDIR)/path.Po
|
||||
include src/$(DEPDIR)/probp.Po
|
||||
|
|
|
@ -3,12 +3,12 @@ ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
|
|||
LIBS = -lm -lsndfile -lfftw3
|
||||
AM_CFLAGS = -ggdb
|
||||
|
||||
bin_PROGRAMS = morse
|
||||
morse_SOURCES = src/initl.c src/likhd.c src/path.c\
|
||||
bin_PROGRAMS = bmorse
|
||||
bmorse_SOURCES = src/initl.c src/likhd.c src/path.c\
|
||||
src/spdtr.c src/trelis.c\
|
||||
src/bpfdet.c src/inputl.c src/model.c \
|
||||
src/probp.c src/sprob.c src/trprob.c\
|
||||
src/kalfil.c src/morse.c src/proces.c src/savep.c \
|
||||
src/kalfil.c src/bmorse.c src/proces.c src/savep.c \
|
||||
src/stats.c src/xtrans.c\
|
||||
src/noise.c src/ptrans.c src/transl.c \
|
||||
src/window.c
|
||||
|
|
31
Makefile.in
31
Makefile.in
|
@ -49,7 +49,7 @@ POST_INSTALL = :
|
|||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
bin_PROGRAMS = morse$(EXEEXT)
|
||||
bin_PROGRAMS = bmorse$(EXEEXT)
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||
|
@ -68,16 +68,16 @@ CONFIG_CLEAN_VPATH_FILES =
|
|||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am__dirstamp = $(am__leading_dot)dirstamp
|
||||
am_morse_OBJECTS = src/initl.$(OBJEXT) src/likhd.$(OBJEXT) \
|
||||
am_bmorse_OBJECTS = src/initl.$(OBJEXT) src/likhd.$(OBJEXT) \
|
||||
src/path.$(OBJEXT) src/spdtr.$(OBJEXT) src/trelis.$(OBJEXT) \
|
||||
src/bpfdet.$(OBJEXT) src/inputl.$(OBJEXT) src/model.$(OBJEXT) \
|
||||
src/probp.$(OBJEXT) src/sprob.$(OBJEXT) src/trprob.$(OBJEXT) \
|
||||
src/kalfil.$(OBJEXT) src/morse.$(OBJEXT) src/proces.$(OBJEXT) \
|
||||
src/kalfil.$(OBJEXT) src/bmorse.$(OBJEXT) src/proces.$(OBJEXT) \
|
||||
src/savep.$(OBJEXT) src/stats.$(OBJEXT) src/xtrans.$(OBJEXT) \
|
||||
src/noise.$(OBJEXT) src/ptrans.$(OBJEXT) src/transl.$(OBJEXT) \
|
||||
src/window.$(OBJEXT)
|
||||
morse_OBJECTS = $(am_morse_OBJECTS)
|
||||
morse_LDADD = $(LDADD)
|
||||
bmorse_OBJECTS = $(am_bmorse_OBJECTS)
|
||||
bmorse_LDADD = $(LDADD)
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
|
@ -86,8 +86,8 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
|||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(morse_SOURCES)
|
||||
DIST_SOURCES = $(morse_SOURCES)
|
||||
SOURCES = $(bmorse_SOURCES)
|
||||
DIST_SOURCES = $(bmorse_SOURCES)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
|
@ -203,11 +203,11 @@ top_srcdir = @top_srcdir@
|
|||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
|
||||
AM_CFLAGS = -ggdb
|
||||
morse_SOURCES = src/initl.c src/likhd.c src/path.c\
|
||||
bmorse_SOURCES = src/initl.c src/likhd.c src/path.c\
|
||||
src/spdtr.c src/trelis.c\
|
||||
src/bpfdet.c src/inputl.c src/model.c \
|
||||
src/probp.c src/sprob.c src/trprob.c\
|
||||
src/kalfil.c src/morse.c src/proces.c src/savep.c \
|
||||
src/kalfil.c src/bmorse.c src/proces.c src/savep.c \
|
||||
src/stats.c src/xtrans.c\
|
||||
src/noise.c src/ptrans.c src/transl.c \
|
||||
src/window.c
|
||||
|
@ -329,7 +329,8 @@ src/trprob.$(OBJEXT): src/$(am__dirstamp) \
|
|||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/kalfil.$(OBJEXT): src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/morse.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/bmorse.$(OBJEXT): src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/proces.$(OBJEXT): src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/savep.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
|
||||
|
@ -343,19 +344,19 @@ src/transl.$(OBJEXT): src/$(am__dirstamp) \
|
|||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/window.$(OBJEXT): src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
morse$(EXEEXT): $(morse_OBJECTS) $(morse_DEPENDENCIES) $(EXTRA_morse_DEPENDENCIES)
|
||||
@rm -f morse$(EXEEXT)
|
||||
$(LINK) $(morse_OBJECTS) $(morse_LDADD) $(LIBS)
|
||||
bmorse$(EXEEXT): $(bmorse_OBJECTS) $(bmorse_DEPENDENCIES) $(EXTRA_bmorse_DEPENDENCIES)
|
||||
@rm -f bmorse$(EXEEXT)
|
||||
$(LINK) $(bmorse_OBJECTS) $(bmorse_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
-rm -f src/bmorse.$(OBJEXT)
|
||||
-rm -f src/bpfdet.$(OBJEXT)
|
||||
-rm -f src/initl.$(OBJEXT)
|
||||
-rm -f src/inputl.$(OBJEXT)
|
||||
-rm -f src/kalfil.$(OBJEXT)
|
||||
-rm -f src/likhd.$(OBJEXT)
|
||||
-rm -f src/model.$(OBJEXT)
|
||||
-rm -f src/morse.$(OBJEXT)
|
||||
-rm -f src/noise.$(OBJEXT)
|
||||
-rm -f src/path.$(OBJEXT)
|
||||
-rm -f src/probp.$(OBJEXT)
|
||||
|
@ -374,13 +375,13 @@ mostlyclean-compile:
|
|||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/bmorse.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/bpfdet.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/initl.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/inputl.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/kalfil.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/likhd.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/model.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/morse.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/noise.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/path.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/probp.Po@am__quote@
|
||||
|
|
18
README.md
18
README.md
|
@ -4,7 +4,23 @@ This software is a Morse decoder orinally created by Dr. E. L. Bell in 1977.
|
|||
The software was manually entered from Fortran program listings and later converted to C++
|
||||
by AG1LE Mauri Niininen.
|
||||
|
||||
2013-SEP-29
|
||||
2013-DEC-29
|
||||
Added more options to enable debugging and testing bmorse decoder while using WAV audio files as source.
|
||||
Bit filter (-bfv) option does envelope smoothing - 10 msec rise time assumption based on experiences with FLDIGI.
|
||||
Plot option (-plt) enables piping such as "bmorse -plt <sndfile> | xplot" to visualize the CW envelope.
|
||||
AGC option (-agc) has fast rise and slow decay in case original signal has very large dynamic range.
|
||||
AMP option (-amp) allows to multiply envelope signal with a constant.
|
||||
DUR option (-dur) allows manually to set Bayesian decoder sample duration (used in path.c).
|
||||
FFT option (-fft) enables either FFT based signal recovery or just low pass filtering.
|
||||
- FFT has also peak_detection() to find if there are multiple signals in the audio frequency range.
|
||||
- Parameter "delta" sets peak detection threshold
|
||||
- Width (-wid) and length (-len) parameters can be used to set FFT size and chunking
|
||||
|
||||
|
||||
2013-DEC-28
|
||||
Renamed this program as "bmorse" - it stands for Bayesian Morse code decoder.
|
||||
Built new functionality and options for testing both sound files and text files.
|
||||
|
||||
|
||||
|
||||
2013-SEP-26
|
||||
|
|
14
config.h
14
config.h
|
@ -47,28 +47,28 @@
|
|||
/* #undef NO_MINUS_C_MINUS_O */
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "full-package-name"
|
||||
#define PACKAGE "bmorse"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "BUG-REPORT-ADDRESS"
|
||||
#define PACKAGE_BUGREPORT "ag1le@innomore.com"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "FULL-PACKAGE-NAME"
|
||||
#define PACKAGE_NAME "bmorse"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "FULL-PACKAGE-NAME VERSION"
|
||||
#define PACKAGE_STRING "bmorse 0.1"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "full-package-name"
|
||||
#define PACKAGE_TARNAME "bmorse"
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#define PACKAGE_URL ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "VERSION"
|
||||
#define PACKAGE_VERSION "0.1"
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "VERSION"
|
||||
#define VERSION "0.1"
|
||||
|
|
519
config.log
519
config.log
|
@ -1,7 +1,7 @@
|
|||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by FULL-PACKAGE-NAME configure VERSION, which was
|
||||
It was created by bmorse configure 0.1, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ ./configure
|
||||
|
@ -42,258 +42,256 @@ PATH: /usr/local/games
|
|||
## Core tests. ##
|
||||
## ----------- ##
|
||||
|
||||
configure:2233: checking for a BSD-compatible install
|
||||
configure:2301: result: /usr/bin/install -c
|
||||
configure:2312: checking whether build environment is sane
|
||||
configure:2362: result: yes
|
||||
configure:2503: checking for a thread-safe mkdir -p
|
||||
configure:2542: result: /bin/mkdir -p
|
||||
configure:2555: checking for gawk
|
||||
configure:2571: found /usr/bin/gawk
|
||||
configure:2582: result: gawk
|
||||
configure:2593: checking whether make sets $(MAKE)
|
||||
configure:2615: result: yes
|
||||
configure:2754: checking for g++
|
||||
configure:2770: found /usr/bin/g++
|
||||
configure:2781: result: g++
|
||||
configure:2808: checking for C++ compiler version
|
||||
configure:2817: g++ --version >&5
|
||||
g++ (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
configure:2828: $? = 0
|
||||
configure:2817: g++ -v >&5
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=g++
|
||||
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.7/lto-wrapper
|
||||
Target: i686-linux-gnu
|
||||
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.7.3-1ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --with-system-zlib --enable-objc-gc --enable-targets=all --with-cloog --enable-cloog-backend=ppl --disable-cloog-version-check --disable-ppl-version-check --enable-multiarch --disable-werror --with-arch-32=i686 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
|
||||
configure:2232: checking for a BSD-compatible install
|
||||
configure:2300: result: /usr/bin/install -c
|
||||
configure:2311: checking whether build environment is sane
|
||||
configure:2361: result: yes
|
||||
configure:2502: checking for a thread-safe mkdir -p
|
||||
configure:2541: result: /bin/mkdir -p
|
||||
configure:2554: checking for gawk
|
||||
configure:2570: found /usr/bin/gawk
|
||||
configure:2581: result: gawk
|
||||
configure:2592: checking whether make sets $(MAKE)
|
||||
configure:2614: result: yes
|
||||
configure:2807: checking for C++ compiler version
|
||||
configure:2816: clang++ --version >&5
|
||||
Ubuntu clang version 3.2-1~exp9ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
|
||||
Target: i386-pc-linux-gnu
|
||||
Thread model: posix
|
||||
gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)
|
||||
configure:2828: $? = 0
|
||||
configure:2817: g++ -V >&5
|
||||
g++: error: unrecognized command line option '-V'
|
||||
g++: fatal error: no input files
|
||||
compilation terminated.
|
||||
configure:2828: $? = 4
|
||||
configure:2817: g++ -qversion >&5
|
||||
g++: error: unrecognized command line option '-qversion'
|
||||
g++: fatal error: no input files
|
||||
compilation terminated.
|
||||
configure:2828: $? = 4
|
||||
configure:2848: checking whether the C++ compiler works
|
||||
configure:2870: g++ conftest.cpp >&5
|
||||
configure:2874: $? = 0
|
||||
configure:2922: result: yes
|
||||
configure:2925: checking for C++ compiler default output file name
|
||||
configure:2927: result: a.out
|
||||
configure:2933: checking for suffix of executables
|
||||
configure:2940: g++ -o conftest conftest.cpp >&5
|
||||
configure:2944: $? = 0
|
||||
configure:2966: result:
|
||||
configure:2988: checking whether we are cross compiling
|
||||
configure:2996: g++ -o conftest conftest.cpp >&5
|
||||
configure:3000: $? = 0
|
||||
configure:3007: ./conftest
|
||||
configure:3011: $? = 0
|
||||
configure:3026: result: no
|
||||
configure:3031: checking for suffix of object files
|
||||
configure:3053: g++ -c conftest.cpp >&5
|
||||
configure:3057: $? = 0
|
||||
configure:3078: result: o
|
||||
configure:3082: checking whether we are using the GNU C++ compiler
|
||||
configure:3101: g++ -c conftest.cpp >&5
|
||||
configure:3101: $? = 0
|
||||
configure:3110: result: yes
|
||||
configure:3119: checking whether g++ accepts -g
|
||||
configure:3139: g++ -c -g conftest.cpp >&5
|
||||
configure:3139: $? = 0
|
||||
configure:3180: result: yes
|
||||
configure:3214: checking for style of include used by make
|
||||
configure:3242: result: GNU
|
||||
configure:3268: checking dependency style of g++
|
||||
configure:3379: result: gcc3
|
||||
configure:3442: checking for gcc
|
||||
configure:3458: found /usr/bin/gcc
|
||||
configure:3469: result: gcc
|
||||
configure:3698: checking for C compiler version
|
||||
configure:3707: gcc --version >&5
|
||||
gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
configure:3718: $? = 0
|
||||
configure:3707: gcc -v >&5
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=gcc
|
||||
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.7/lto-wrapper
|
||||
Target: i686-linux-gnu
|
||||
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.7.3-1ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --with-system-zlib --enable-objc-gc --enable-targets=all --with-cloog --enable-cloog-backend=ppl --disable-cloog-version-check --disable-ppl-version-check --enable-multiarch --disable-werror --with-arch-32=i686 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
|
||||
configure:2827: $? = 0
|
||||
configure:2816: clang++ -v >&5
|
||||
Ubuntu clang version 3.2-1~exp9ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
|
||||
Target: i386-pc-linux-gnu
|
||||
Thread model: posix
|
||||
gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)
|
||||
configure:3718: $? = 0
|
||||
configure:3707: gcc -V >&5
|
||||
gcc: error: unrecognized command line option '-V'
|
||||
gcc: fatal error: no input files
|
||||
compilation terminated.
|
||||
configure:3718: $? = 4
|
||||
configure:3707: gcc -qversion >&5
|
||||
gcc: error: unrecognized command line option '-qversion'
|
||||
gcc: fatal error: no input files
|
||||
compilation terminated.
|
||||
configure:3718: $? = 4
|
||||
configure:3722: checking whether we are using the GNU C compiler
|
||||
configure:3741: gcc -c conftest.c >&5
|
||||
configure:3741: $? = 0
|
||||
configure:3750: result: yes
|
||||
configure:3759: checking whether gcc accepts -g
|
||||
configure:3779: gcc -c -g conftest.c >&5
|
||||
configure:3779: $? = 0
|
||||
configure:3820: result: yes
|
||||
configure:3837: checking for gcc option to accept ISO C89
|
||||
configure:3900: gcc -c -g -O2 conftest.c >&5
|
||||
configure:3900: $? = 0
|
||||
configure:3913: result: none needed
|
||||
configure:3935: checking dependency style of gcc
|
||||
configure:4046: result: gcc3
|
||||
configure:4062: checking whether gcc and cc understand -c and -o together
|
||||
configure:4093: gcc -c conftest.c -o conftest2.o >&5
|
||||
configure:4097: $? = 0
|
||||
configure:4103: gcc -c conftest.c -o conftest2.o >&5
|
||||
configure:4107: $? = 0
|
||||
configure:4118: cc -c conftest.c >&5
|
||||
configure:4122: $? = 0
|
||||
configure:4130: cc -c conftest.c -o conftest2.o >&5
|
||||
configure:4134: $? = 0
|
||||
configure:4140: cc -c conftest.c -o conftest2.o >&5
|
||||
configure:4144: $? = 0
|
||||
configure:4162: result: yes
|
||||
configure:4191: checking for main in -lm
|
||||
configure:4210: gcc -o conftest -g -O2 conftest.c -lm >&5
|
||||
configure:4210: $? = 0
|
||||
configure:4219: result: yes
|
||||
configure:4237: checking how to run the C preprocessor
|
||||
configure:4268: gcc -E conftest.c
|
||||
configure:4268: $? = 0
|
||||
configure:4282: gcc -E conftest.c
|
||||
conftest.c:12:28: fatal error: ac_nonexistent.h: No such file or directory
|
||||
compilation terminated.
|
||||
configure:4282: $? = 1
|
||||
configure:2827: $? = 0
|
||||
configure:2816: clang++ -V >&5
|
||||
clang: error: argument to '-V' is missing (expected 1 value)
|
||||
clang: error: no input files
|
||||
configure:2827: $? = 1
|
||||
configure:2816: clang++ -qversion >&5
|
||||
clang: error: no input files
|
||||
configure:2827: $? = 1
|
||||
configure:2847: checking whether the C++ compiler works
|
||||
configure:2869: clang++ conftest.cpp >&5
|
||||
configure:2873: $? = 0
|
||||
configure:2921: result: yes
|
||||
configure:2924: checking for C++ compiler default output file name
|
||||
configure:2926: result: a.out
|
||||
configure:2932: checking for suffix of executables
|
||||
configure:2939: clang++ -o conftest conftest.cpp >&5
|
||||
configure:2943: $? = 0
|
||||
configure:2965: result:
|
||||
configure:2987: checking whether we are cross compiling
|
||||
configure:2995: clang++ -o conftest conftest.cpp >&5
|
||||
configure:2999: $? = 0
|
||||
configure:3006: ./conftest
|
||||
configure:3010: $? = 0
|
||||
configure:3025: result: no
|
||||
configure:3030: checking for suffix of object files
|
||||
configure:3052: clang++ -c conftest.cpp >&5
|
||||
configure:3056: $? = 0
|
||||
configure:3077: result: o
|
||||
configure:3081: checking whether we are using the GNU C++ compiler
|
||||
configure:3100: clang++ -c conftest.cpp >&5
|
||||
configure:3100: $? = 0
|
||||
configure:3109: result: yes
|
||||
configure:3118: checking whether clang++ accepts -g
|
||||
configure:3138: clang++ -c -g conftest.cpp >&5
|
||||
configure:3138: $? = 0
|
||||
configure:3179: result: yes
|
||||
configure:3213: checking for style of include used by make
|
||||
configure:3241: result: GNU
|
||||
configure:3267: checking dependency style of clang++
|
||||
configure:3378: result: gcc3
|
||||
configure:3441: checking for gcc
|
||||
configure:3468: result: clang
|
||||
configure:3697: checking for C compiler version
|
||||
configure:3706: clang --version >&5
|
||||
Ubuntu clang version 3.2-1~exp9ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
|
||||
Target: i386-pc-linux-gnu
|
||||
Thread model: posix
|
||||
configure:3717: $? = 0
|
||||
configure:3706: clang -v >&5
|
||||
Ubuntu clang version 3.2-1~exp9ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
|
||||
Target: i386-pc-linux-gnu
|
||||
Thread model: posix
|
||||
configure:3717: $? = 0
|
||||
configure:3706: clang -V >&5
|
||||
clang: error: argument to '-V' is missing (expected 1 value)
|
||||
clang: error: no input files
|
||||
configure:3717: $? = 1
|
||||
configure:3706: clang -qversion >&5
|
||||
clang: error: no input files
|
||||
configure:3717: $? = 1
|
||||
configure:3721: checking whether we are using the GNU C compiler
|
||||
configure:3740: clang -c conftest.c >&5
|
||||
configure:3740: $? = 0
|
||||
configure:3749: result: yes
|
||||
configure:3758: checking whether clang accepts -g
|
||||
configure:3778: clang -c -g conftest.c >&5
|
||||
configure:3778: $? = 0
|
||||
configure:3819: result: yes
|
||||
configure:3836: checking for clang option to accept ISO C89
|
||||
configure:3899: clang -c -g -O2 conftest.c >&5
|
||||
configure:3899: $? = 0
|
||||
configure:3912: result: none needed
|
||||
configure:3934: checking dependency style of clang
|
||||
configure:4045: result: gcc3
|
||||
configure:4061: checking whether clang and cc understand -c and -o together
|
||||
configure:4092: clang -c conftest.c -o conftest2.o >&5
|
||||
configure:4096: $? = 0
|
||||
configure:4102: clang -c conftest.c -o conftest2.o >&5
|
||||
configure:4106: $? = 0
|
||||
configure:4117: cc -c conftest.c >&5
|
||||
configure:4121: $? = 0
|
||||
configure:4129: cc -c conftest.c -o conftest2.o >&5
|
||||
configure:4133: $? = 0
|
||||
configure:4139: cc -c conftest.c -o conftest2.o >&5
|
||||
configure:4143: $? = 0
|
||||
configure:4161: result: yes
|
||||
configure:4190: checking for main in -lm
|
||||
configure:4209: clang -o conftest -g -O2 conftest.c -lm >&5
|
||||
configure:4209: $? = 0
|
||||
configure:4218: result: yes
|
||||
configure:4236: checking how to run the C preprocessor
|
||||
configure:4267: clang -E conftest.c
|
||||
configure:4267: $? = 0
|
||||
configure:4281: clang -E conftest.c
|
||||
conftest.c:12:10: fatal error: 'ac_nonexistent.h' file not found
|
||||
#include <ac_nonexistent.h>
|
||||
^
|
||||
1 error generated.
|
||||
configure:4281: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h */
|
||||
| #define PACKAGE_NAME "FULL-PACKAGE-NAME"
|
||||
| #define PACKAGE_TARNAME "full-package-name"
|
||||
| #define PACKAGE_VERSION "VERSION"
|
||||
| #define PACKAGE_STRING "FULL-PACKAGE-NAME VERSION"
|
||||
| #define PACKAGE_BUGREPORT "BUG-REPORT-ADDRESS"
|
||||
| #define PACKAGE_NAME "bmorse"
|
||||
| #define PACKAGE_TARNAME "bmorse"
|
||||
| #define PACKAGE_VERSION "0.1"
|
||||
| #define PACKAGE_STRING "bmorse 0.1"
|
||||
| #define PACKAGE_BUGREPORT "ag1le@innomore.com"
|
||||
| #define PACKAGE_URL ""
|
||||
| #define PACKAGE "full-package-name"
|
||||
| #define VERSION "VERSION"
|
||||
| #define PACKAGE "bmorse"
|
||||
| #define VERSION "0.1"
|
||||
| #define HAVE_LIBM 1
|
||||
| /* end confdefs.h. */
|
||||
| #include <ac_nonexistent.h>
|
||||
configure:4307: result: gcc -E
|
||||
configure:4327: gcc -E conftest.c
|
||||
configure:4327: $? = 0
|
||||
configure:4341: gcc -E conftest.c
|
||||
conftest.c:12:28: fatal error: ac_nonexistent.h: No such file or directory
|
||||
compilation terminated.
|
||||
configure:4341: $? = 1
|
||||
configure:4306: result: clang -E
|
||||
configure:4326: clang -E conftest.c
|
||||
configure:4326: $? = 0
|
||||
configure:4340: clang -E conftest.c
|
||||
conftest.c:12:10: fatal error: 'ac_nonexistent.h' file not found
|
||||
#include <ac_nonexistent.h>
|
||||
^
|
||||
1 error generated.
|
||||
configure:4340: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h */
|
||||
| #define PACKAGE_NAME "FULL-PACKAGE-NAME"
|
||||
| #define PACKAGE_TARNAME "full-package-name"
|
||||
| #define PACKAGE_VERSION "VERSION"
|
||||
| #define PACKAGE_STRING "FULL-PACKAGE-NAME VERSION"
|
||||
| #define PACKAGE_BUGREPORT "BUG-REPORT-ADDRESS"
|
||||
| #define PACKAGE_NAME "bmorse"
|
||||
| #define PACKAGE_TARNAME "bmorse"
|
||||
| #define PACKAGE_VERSION "0.1"
|
||||
| #define PACKAGE_STRING "bmorse 0.1"
|
||||
| #define PACKAGE_BUGREPORT "ag1le@innomore.com"
|
||||
| #define PACKAGE_URL ""
|
||||
| #define PACKAGE "full-package-name"
|
||||
| #define VERSION "VERSION"
|
||||
| #define PACKAGE "bmorse"
|
||||
| #define VERSION "0.1"
|
||||
| #define HAVE_LIBM 1
|
||||
| /* end confdefs.h. */
|
||||
| #include <ac_nonexistent.h>
|
||||
configure:4370: checking for grep that handles long lines and -e
|
||||
configure:4428: result: /bin/grep
|
||||
configure:4433: checking for egrep
|
||||
configure:4495: result: /bin/grep -E
|
||||
configure:4500: checking for ANSI C header files
|
||||
configure:4520: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4520: $? = 0
|
||||
configure:4593: gcc -o conftest -g -O2 conftest.c -lm >&5
|
||||
configure:4593: $? = 0
|
||||
configure:4593: ./conftest
|
||||
configure:4593: $? = 0
|
||||
configure:4604: result: yes
|
||||
configure:4617: checking for sys/types.h
|
||||
configure:4617: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4617: $? = 0
|
||||
configure:4617: result: yes
|
||||
configure:4617: checking for sys/stat.h
|
||||
configure:4617: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4617: $? = 0
|
||||
configure:4617: result: yes
|
||||
configure:4617: checking for stdlib.h
|
||||
configure:4617: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4617: $? = 0
|
||||
configure:4617: result: yes
|
||||
configure:4617: checking for string.h
|
||||
configure:4617: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4617: $? = 0
|
||||
configure:4617: result: yes
|
||||
configure:4617: checking for memory.h
|
||||
configure:4617: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4617: $? = 0
|
||||
configure:4617: result: yes
|
||||
configure:4617: checking for strings.h
|
||||
configure:4617: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4617: $? = 0
|
||||
configure:4617: result: yes
|
||||
configure:4617: checking for inttypes.h
|
||||
configure:4617: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4617: $? = 0
|
||||
configure:4617: result: yes
|
||||
configure:4617: checking for stdint.h
|
||||
configure:4617: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4617: $? = 0
|
||||
configure:4617: result: yes
|
||||
configure:4617: checking for unistd.h
|
||||
configure:4617: gcc -c -g -O2 conftest.c >&5
|
||||
configure:4617: $? = 0
|
||||
configure:4617: result: yes
|
||||
configure:4632: checking for stdlib.h
|
||||
configure:4632: result: yes
|
||||
configure:4632: checking for string.h
|
||||
configure:4632: result: yes
|
||||
configure:4649: checking for memset
|
||||
configure:4649: gcc -o conftest -g -O2 conftest.c -lm >&5
|
||||
conftest.c:47:6: warning: conflicting types for built-in function 'memset' [enabled by default]
|
||||
configure:4649: $? = 0
|
||||
configure:4649: result: yes
|
||||
configure:4649: checking for pow
|
||||
configure:4649: gcc -o conftest -g -O2 conftest.c -lm >&5
|
||||
conftest.c:48:6: warning: conflicting types for built-in function 'pow' [enabled by default]
|
||||
configure:4649: $? = 0
|
||||
configure:4649: result: yes
|
||||
configure:4649: checking for sqrt
|
||||
configure:4649: gcc -o conftest -g -O2 conftest.c -lm >&5
|
||||
conftest.c:49:6: warning: conflicting types for built-in function 'sqrt' [enabled by default]
|
||||
configure:4649: $? = 0
|
||||
configure:4649: result: yes
|
||||
configure:4649: checking for strrchr
|
||||
configure:4649: gcc -o conftest -g -O2 conftest.c -lm >&5
|
||||
conftest.c:50:6: warning: conflicting types for built-in function 'strrchr' [enabled by default]
|
||||
configure:4649: $? = 0
|
||||
configure:4649: result: yes
|
||||
configure:4795: creating ./config.status
|
||||
configure:4369: checking for grep that handles long lines and -e
|
||||
configure:4427: result: /bin/grep
|
||||
configure:4432: checking for egrep
|
||||
configure:4494: result: /bin/grep -E
|
||||
configure:4499: checking for ANSI C header files
|
||||
configure:4519: clang -c -g -O2 conftest.c >&5
|
||||
configure:4519: $? = 0
|
||||
configure:4592: clang -o conftest -g -O2 conftest.c -lm >&5
|
||||
configure:4592: $? = 0
|
||||
configure:4592: ./conftest
|
||||
configure:4592: $? = 0
|
||||
configure:4603: result: yes
|
||||
configure:4616: checking for sys/types.h
|
||||
configure:4616: clang -c -g -O2 conftest.c >&5
|
||||
configure:4616: $? = 0
|
||||
configure:4616: result: yes
|
||||
configure:4616: checking for sys/stat.h
|
||||
configure:4616: clang -c -g -O2 conftest.c >&5
|
||||
configure:4616: $? = 0
|
||||
configure:4616: result: yes
|
||||
configure:4616: checking for stdlib.h
|
||||
configure:4616: clang -c -g -O2 conftest.c >&5
|
||||
configure:4616: $? = 0
|
||||
configure:4616: result: yes
|
||||
configure:4616: checking for string.h
|
||||
configure:4616: clang -c -g -O2 conftest.c >&5
|
||||
configure:4616: $? = 0
|
||||
configure:4616: result: yes
|
||||
configure:4616: checking for memory.h
|
||||
configure:4616: clang -c -g -O2 conftest.c >&5
|
||||
configure:4616: $? = 0
|
||||
configure:4616: result: yes
|
||||
configure:4616: checking for strings.h
|
||||
configure:4616: clang -c -g -O2 conftest.c >&5
|
||||
configure:4616: $? = 0
|
||||
configure:4616: result: yes
|
||||
configure:4616: checking for inttypes.h
|
||||
configure:4616: clang -c -g -O2 conftest.c >&5
|
||||
configure:4616: $? = 0
|
||||
configure:4616: result: yes
|
||||
configure:4616: checking for stdint.h
|
||||
configure:4616: clang -c -g -O2 conftest.c >&5
|
||||
configure:4616: $? = 0
|
||||
configure:4616: result: yes
|
||||
configure:4616: checking for unistd.h
|
||||
configure:4616: clang -c -g -O2 conftest.c >&5
|
||||
configure:4616: $? = 0
|
||||
configure:4616: result: yes
|
||||
configure:4631: checking for stdlib.h
|
||||
configure:4631: result: yes
|
||||
configure:4631: checking for string.h
|
||||
configure:4631: result: yes
|
||||
configure:4648: checking for memset
|
||||
configure:4648: clang -o conftest -g -O2 conftest.c -lm >&5
|
||||
conftest.c:47:6: warning: incompatible redeclaration of library function 'memset'
|
||||
char memset ();
|
||||
^
|
||||
conftest.c:47:6: note: 'memset' is a builtin with type 'void *(void *, int, unsigned int)'
|
||||
1 warning generated.
|
||||
configure:4648: $? = 0
|
||||
configure:4648: result: yes
|
||||
configure:4648: checking for pow
|
||||
configure:4648: clang -o conftest -g -O2 conftest.c -lm >&5
|
||||
conftest.c:48:6: warning: incompatible redeclaration of library function 'pow'
|
||||
char pow ();
|
||||
^
|
||||
conftest.c:48:6: note: 'pow' is a builtin with type 'double (double, double)'
|
||||
1 warning generated.
|
||||
configure:4648: $? = 0
|
||||
configure:4648: result: yes
|
||||
configure:4648: checking for sqrt
|
||||
configure:4648: clang -o conftest -g -O2 conftest.c -lm >&5
|
||||
conftest.c:49:6: warning: incompatible redeclaration of library function 'sqrt'
|
||||
char sqrt ();
|
||||
^
|
||||
conftest.c:49:6: note: 'sqrt' is a builtin with type 'double (double)'
|
||||
1 warning generated.
|
||||
configure:4648: $? = 0
|
||||
configure:4648: result: yes
|
||||
configure:4648: checking for strrchr
|
||||
configure:4648: clang -o conftest -g -O2 conftest.c -lm >&5
|
||||
conftest.c:50:6: warning: incompatible redeclaration of library function 'strrchr'
|
||||
char strrchr ();
|
||||
^
|
||||
conftest.c:50:6: note: 'strrchr' is a builtin with type 'char *(const char *, int)'
|
||||
1 warning generated.
|
||||
configure:4648: $? = 0
|
||||
configure:4648: result: yes
|
||||
configure:4794: creating ./config.status
|
||||
|
||||
## ---------------------- ##
|
||||
## Running config.status. ##
|
||||
## ---------------------- ##
|
||||
|
||||
This file was extended by FULL-PACKAGE-NAME config.status VERSION, which was
|
||||
This file was extended by bmorse config.status 0.1, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES =
|
||||
|
@ -317,8 +315,8 @@ ac_cv_c_compiler_gnu=yes
|
|||
ac_cv_cxx_compiler_gnu=yes
|
||||
ac_cv_env_CCC_set=
|
||||
ac_cv_env_CCC_value=
|
||||
ac_cv_env_CC_set=
|
||||
ac_cv_env_CC_value=
|
||||
ac_cv_env_CC_set=set
|
||||
ac_cv_env_CC_value=clang
|
||||
ac_cv_env_CFLAGS_set=
|
||||
ac_cv_env_CFLAGS_value=
|
||||
ac_cv_env_CPPFLAGS_set=
|
||||
|
@ -327,8 +325,8 @@ ac_cv_env_CPP_set=
|
|||
ac_cv_env_CPP_value=
|
||||
ac_cv_env_CXXFLAGS_set=
|
||||
ac_cv_env_CXXFLAGS_value=
|
||||
ac_cv_env_CXX_set=
|
||||
ac_cv_env_CXX_value=
|
||||
ac_cv_env_CXX_set=set
|
||||
ac_cv_env_CXX_value=clang++
|
||||
ac_cv_env_LDFLAGS_set=
|
||||
ac_cv_env_LDFLAGS_value=
|
||||
ac_cv_env_LIBS_set=
|
||||
|
@ -360,12 +358,11 @@ ac_cv_path_GREP=/bin/grep
|
|||
ac_cv_path_install='/usr/bin/install -c'
|
||||
ac_cv_path_mkdir=/bin/mkdir
|
||||
ac_cv_prog_AWK=gawk
|
||||
ac_cv_prog_CPP='gcc -E'
|
||||
ac_cv_prog_ac_ct_CC=gcc
|
||||
ac_cv_prog_ac_ct_CXX=g++
|
||||
ac_cv_prog_CPP='clang -E'
|
||||
ac_cv_prog_ac_ct_CC=clang
|
||||
ac_cv_prog_cc_c89=
|
||||
ac_cv_prog_cc_clang_c_o=yes
|
||||
ac_cv_prog_cc_g=yes
|
||||
ac_cv_prog_cc_gcc_c_o=yes
|
||||
ac_cv_prog_cxx_g=yes
|
||||
ac_cv_prog_make_make_set=yes
|
||||
am_cv_CC_dependencies_compiler_type=gcc3
|
||||
|
@ -384,12 +381,12 @@ AUTOCONF='${SHELL} /home/mauri/Projects/morse/missing --run autoconf'
|
|||
AUTOHEADER='${SHELL} /home/mauri/Projects/morse/missing --run autoheader'
|
||||
AUTOMAKE='${SHELL} /home/mauri/Projects/morse/missing --run automake-1.11'
|
||||
AWK='gawk'
|
||||
CC='gcc'
|
||||
CC='clang'
|
||||
CCDEPMODE='depmode=gcc3'
|
||||
CFLAGS='-g -O2'
|
||||
CPP='gcc -E'
|
||||
CPP='clang -E'
|
||||
CPPFLAGS=''
|
||||
CXX='g++'
|
||||
CXX='clang++'
|
||||
CXXDEPMODE='depmode=gcc3'
|
||||
CXXFLAGS='-g -O2'
|
||||
CYGPATH_W='echo'
|
||||
|
@ -412,20 +409,20 @@ LTLIBOBJS=''
|
|||
MAKEINFO='${SHELL} /home/mauri/Projects/morse/missing --run makeinfo'
|
||||
MKDIR_P='/bin/mkdir -p'
|
||||
OBJEXT='o'
|
||||
PACKAGE='full-package-name'
|
||||
PACKAGE_BUGREPORT='BUG-REPORT-ADDRESS'
|
||||
PACKAGE_NAME='FULL-PACKAGE-NAME'
|
||||
PACKAGE_STRING='FULL-PACKAGE-NAME VERSION'
|
||||
PACKAGE_TARNAME='full-package-name'
|
||||
PACKAGE='bmorse'
|
||||
PACKAGE_BUGREPORT='ag1le@innomore.com'
|
||||
PACKAGE_NAME='bmorse'
|
||||
PACKAGE_STRING='bmorse 0.1'
|
||||
PACKAGE_TARNAME='bmorse'
|
||||
PACKAGE_URL=''
|
||||
PACKAGE_VERSION='VERSION'
|
||||
PACKAGE_VERSION='0.1'
|
||||
PATH_SEPARATOR=':'
|
||||
SET_MAKE=''
|
||||
SHELL='/bin/bash'
|
||||
STRIP=''
|
||||
VERSION='VERSION'
|
||||
ac_ct_CC='gcc'
|
||||
ac_ct_CXX='g++'
|
||||
VERSION='0.1'
|
||||
ac_ct_CC='clang'
|
||||
ac_ct_CXX=''
|
||||
am__EXEEXT_FALSE=''
|
||||
am__EXEEXT_TRUE='#'
|
||||
am__fastdepCC_FALSE='#'
|
||||
|
@ -472,14 +469,14 @@ target_alias=''
|
|||
## ----------- ##
|
||||
|
||||
/* confdefs.h */
|
||||
#define PACKAGE_NAME "FULL-PACKAGE-NAME"
|
||||
#define PACKAGE_TARNAME "full-package-name"
|
||||
#define PACKAGE_VERSION "VERSION"
|
||||
#define PACKAGE_STRING "FULL-PACKAGE-NAME VERSION"
|
||||
#define PACKAGE_BUGREPORT "BUG-REPORT-ADDRESS"
|
||||
#define PACKAGE_NAME "bmorse"
|
||||
#define PACKAGE_TARNAME "bmorse"
|
||||
#define PACKAGE_VERSION "0.1"
|
||||
#define PACKAGE_STRING "bmorse 0.1"
|
||||
#define PACKAGE_BUGREPORT "ag1le@innomore.com"
|
||||
#define PACKAGE_URL ""
|
||||
#define PACKAGE "full-package-name"
|
||||
#define VERSION "VERSION"
|
||||
#define PACKAGE "bmorse"
|
||||
#define VERSION "0.1"
|
||||
#define HAVE_LIBM 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ([2.69])
|
||||
AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
|
||||
AC_INIT([bmorse], [0.1], [ag1le@innomore.com])
|
||||
AC_CONFIG_SRCDIR([config.h.in])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
|
|
10
src/autocr.c
10
src/autocr.c
|
@ -1,23 +1,23 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// autocr.c -- morse code decoder
|
||||
// autocr.c -- bayesian morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// This file is part of Bayesian Morse code decoder
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// bmorse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// bmorse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// along with bmorse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "f2c.h"
|
||||
|
|
14
src/bpfdet.c
14
src/bpfdet.c
|
@ -1,26 +1,26 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// bpfdet.c -- morse code decoder
|
||||
// bpfdet.c -- bayesian morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// This file is part of Bayesian Morse code decoder
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// bmorse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// bmorse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
// along with bmorse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#include "morse.h"
|
||||
#include "bmorse.h"
|
||||
#include <math.h>
|
||||
|
||||
/* Subroutine */ int bpfdet_(real *zin, real *z__)
|
||||
|
|
87
src/common.h
87
src/common.h
|
@ -1,87 +0,0 @@
|
|||
|
||||
/* Common Block Declarations */
|
||||
|
||||
struct BLKTRN {
|
||||
integer ltrmap[400], iblank[400];
|
||||
} blktrn;
|
||||
|
||||
|
||||
struct Alpha {
|
||||
char ialph[70];
|
||||
} alpha;
|
||||
|
||||
|
||||
|
||||
struct BLK1 {
|
||||
real tau;
|
||||
} blk1;
|
||||
|
||||
|
||||
struct BLK6 {
|
||||
real dmean;
|
||||
real xdur;
|
||||
real esep[6];
|
||||
real edev[6];
|
||||
} blk6;
|
||||
|
||||
|
||||
struct BLK2 {
|
||||
real wc, wchirp, asigma, bsigma, phisgm, rsigm, tchirp, gamma;
|
||||
} blk2;
|
||||
|
||||
|
||||
struct BLKLAM {
|
||||
integer ielmst[400], ilami[16], ilamx[6];
|
||||
} blklam;
|
||||
|
||||
|
||||
struct BLKELM {
|
||||
real elemtr[6][16] /* was [16][6] */;
|
||||
} blkelm;
|
||||
|
||||
|
||||
struct BLKSPD {
|
||||
real rtrans[2][5] /* was [5][2] */;
|
||||
integer mempr[6][6] /* was [6][6] */;
|
||||
} blkspd;
|
||||
|
||||
|
||||
struct BLKRAT {
|
||||
integer memdel[6][6] /* was [6][6] */;
|
||||
} blkrat;
|
||||
|
||||
|
||||
struct BLKMEM {
|
||||
integer memfcn[6][400] /* was [400][6] */;
|
||||
} blkmem;
|
||||
|
||||
|
||||
struct BLKS {
|
||||
integer isx[6];
|
||||
} blks;
|
||||
|
||||
struct BLKSV {
|
||||
real ykkip[25], pkkip[25], ykksv[750], pkksv[750];
|
||||
} blksv;
|
||||
|
||||
|
||||
struct BLKEND {
|
||||
integer iend;
|
||||
} blkend;
|
||||
|
||||
|
||||
struct BLKTXT {
|
||||
integer itext[200];
|
||||
} blktxt;
|
||||
|
||||
|
||||
|
||||
extern int path_(integer ip, integer *lambda, real *dur, integer *ilrate, integer lamsav[][25], real dursav[][25], integer ilrsav[][25]);
|
||||
extern int likhd_(real *z, real *rn, integer ip, integer *lambda, real *dur, integer *ilrate, real p[][25], real lkhd[][25]);
|
||||
extern int savep_(real p[][25], integer *pathsv, integer *isave, integer *imax, integer lamsav[][25], real dursav[][25], integer ilrsav[][25], integer *lambda, real *dur, integer *ilrate, integer *sort);
|
||||
extern int probp_(real p[][25], real pin[][25], integer *isave, real lkhd[][25]);
|
||||
extern int sprob_(real p[][25], integer *isave, integer ilrsav[][25], real *pelm, integer *khat, real *spdhat, real *px);
|
||||
extern int trelis_(integer *, integer *, integer *, integer *);
|
||||
extern int trprob_(integer , integer *, real *, integer *, real [][25]);
|
||||
|
||||
|
18
src/initl.c
18
src/initl.c
|
@ -1,26 +1,26 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// initl.c -- morse code decoder
|
||||
// initl.c -- bayesian morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// This file is part of Bayesian Morse code decoder
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// bmorse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// bmorse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
// along with bmorse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#include "morse.h"
|
||||
#include "bmorse.h"
|
||||
|
||||
/* Common Block Declarations */
|
||||
|
||||
|
@ -232,7 +232,7 @@ static integer c__1 = 1;
|
|||
/* static cilist io___2 = { 0, 20, 0, fmt_30, 0 };
|
||||
static cilist io___5 = { 0, 20, 0, fmt_40, 0 };
|
||||
static cilist io___6 = { 0, 20, 0, fmt_70, 0 };
|
||||
|
||||
*/
|
||||
|
||||
/* MEMORY FUNCTION */
|
||||
/* MEMFCN(400,6) - ACCESSED BY (LAMBDA, K) - LETTER STATE TABLE */
|
||||
|
@ -265,7 +265,7 @@ static integer c__1 = 1;
|
|||
do_fio(&c__1, (char *)&iarray[k - 1], (ftnlen)sizeof(integer));
|
||||
}
|
||||
e_rsfe();
|
||||
|
||||
*/
|
||||
/* PROCESS ONE ROW OF MORSEM FILE - IARRAY(8) */
|
||||
/* LTRMAP(1..16) = 3,4,5,6,3,4,5,6,1,2,1,2,1,2,1,2,0,... */
|
||||
/* IELMST(1..16) = LAST TWO ELEMENTS */
|
||||
|
|
16
src/inputl.c
16
src/inputl.c
|
@ -1,26 +1,26 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// inputl.c -- morse code decoder
|
||||
// inputl.c -- bayesian morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// This file is part of Bayesian Morse code decoder
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// bmorse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// bmorse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
// along with bmorse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#include "morse.h"
|
||||
#include "bmorse.h"
|
||||
#include <math.h>
|
||||
|
||||
/* Common Block Declarations */
|
||||
|
@ -65,7 +65,7 @@ struct {
|
|||
static char fmt_300[] = "(1x,\002INPUT SIG PARMS- AVAR,BVAR,FCHIRP,TCHIR"
|
||||
"P,PHIVAR\002)";
|
||||
static char fmt_400[] = "(1x,\002INPUT SIG PARMS: GAMMA,FREQ,NOISE\002)";
|
||||
|
||||
*/
|
||||
/* Builtin functions */
|
||||
// integer s_wsfe(cilist *), e_wsfe(void);
|
||||
// double sqrt(doublereal);
|
||||
|
|
43
src/kalfil.c
43
src/kalfil.c
|
@ -1,51 +1,38 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// kalfil.c -- morse code decoder
|
||||
// kalfil.c -- bayesian morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// This file is part of Bayesian Morse code decoder
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// bmorse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// bmorse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
// along with bmorse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#include "morse.h"
|
||||
#include "bmorse.h"
|
||||
#include <math.h>
|
||||
/* Common Block Declarations */
|
||||
|
||||
struct blksv1_1_ {
|
||||
real ykkip[25], pkkip[25], ykksv[750], pkksv[750];
|
||||
};
|
||||
|
||||
#define blksv1_1 (*(struct blksv1_1_ *) &blksv1_)
|
||||
|
||||
/* Initialized data */
|
||||
|
||||
struct {
|
||||
real e_1[50];
|
||||
integer fill_2[1500];
|
||||
} blksv1_ = { .5f, .5f, .5f, .5f, .5f, .5f, .5f, .5f, .5f, .5f, .5f, .5f,
|
||||
struct BLKSV blksv = { .5f, .5f, .5f, .5f, .5f, .5f, .5f, .5f, .5f, .5f, .5f, .5f,
|
||||
.5f, .5f, .5f, .5f, .5f, .5f, .5f, .5f, .5f, .5f, .5f, .5f, .5f,
|
||||
.1f, .1f, .1f, .1f, .1f, .1f, .1f, .1f, .1f, .1f, .1f, .1f, .1f,
|
||||
.1f, .1f, .1f, .1f, .1f, .1f, .1f, .1f, .1f, .1f, .1f, .1f };
|
||||
|
||||
|
||||
/* Table of constant values */
|
||||
|
||||
static integer c__1 = 1;
|
||||
|
||||
/* Subroutine */ int kalfil_(real *z, integer *ip, real *rn, integer *ilx,
|
||||
int kalfil_(real *z, integer *ip, real *rn, integer *ilx,
|
||||
integer *ixs, integer *kelem, integer *jnode, integer *israte, real *
|
||||
dur, integer *ilrate, real *pin, real *lkhdj)
|
||||
{
|
||||
|
@ -100,8 +87,8 @@ L100:
|
|||
|
||||
/* GET PREVIOUS ESTIMATES FOR PATH IP */
|
||||
|
||||
ykk = blksv1_1.ykkip[*ip - 1];
|
||||
pkk = blksv1_1.pkkip[*ip - 1];
|
||||
ykk = blksv.ykkip[*ip - 1];
|
||||
pkk = blksv.pkkip[*ip - 1];
|
||||
|
||||
/* IMPLEMENT KALMAN FILTER FOR THIS TRANSITION */
|
||||
|
||||
|
@ -112,10 +99,10 @@ L100:
|
|||
g = ppred * hz * pzinv;
|
||||
pest = (1.f - g * hz) * ppred;
|
||||
zr = *z - hz * ypred;
|
||||
blksv1_1.ykksv[*jnode - 1] = ypred + g * zr;
|
||||
blksv1_1.pkksv[*jnode - 1] = pest;
|
||||
if (blksv1_1.ykksv[*jnode - 1] <= .01f) {
|
||||
blksv1_1.ykksv[*jnode - 1] = .01f;
|
||||
blksv.ykksv[*jnode - 1] = ypred + g * zr;
|
||||
blksv.pkksv[*jnode - 1] = pest;
|
||||
if (blksv.ykksv[*jnode - 1] <= .01f) {
|
||||
blksv.ykksv[*jnode - 1] = .01f;
|
||||
}
|
||||
/* Computing 2nd power */
|
||||
r1 = zr;
|
||||
|
|
12
src/key.c
12
src/key.c
|
@ -1,24 +1,24 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// key.c -- morse code decoder
|
||||
// key.c -- bayesian morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// This file is part of Bayesian Morse code decoder
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// bmorse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// bmorse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
// along with bmorse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
14
src/likhd.c
14
src/likhd.c
|
@ -1,26 +1,26 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// likhd.c -- morse code decoder
|
||||
// likhd.c -- bayesian morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// This file is part of Bayesian Morse code decoder
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// bmorse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// bmorse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
// along with bmorse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#include "morse.h"
|
||||
#include "bmorse.h"
|
||||
|
||||
|
||||
int likhd_(real *z, real *rn, integer *ip, integer *lambda,
|
||||
|
|
14
src/model.c
14
src/model.c
|
@ -1,27 +1,27 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// model.c -- morse code decoder
|
||||
// model.c -- bayesian morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// This file is part of Bayesian Morse code decoder
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// bmorse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// bmorse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
// along with bmorse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#include <math.h>
|
||||
#include "morse.h"
|
||||
#include "bmorse.h"
|
||||
|
||||
|
||||
|
||||
|
|
463
src/morse.c
463
src/morse.c
|
@ -1,463 +0,0 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// morse.c -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// Parts of this is adapted from sndfile-spectrogram
|
||||
// Copyright (C) 2007-2009 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
//
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <math.h>
|
||||
#include "morse.h"
|
||||
#include <sndfile.h>
|
||||
#include <fftw3.h>
|
||||
#include "window.h"
|
||||
|
||||
#define ARRAY_LEN(x) ((int) (sizeof (x) / sizeof (x [0])))
|
||||
#define MAX(x,y) ((x) > (y) ? (x) : (y))
|
||||
#define MIN(x,y) ((x) < (y) ? (x) : (y))
|
||||
#define MIN_WIDTH 640
|
||||
#define MIN_HEIGHT 480
|
||||
#define MAX_WIDTH 65536
|
||||
#define MAX_HEIGHT 4096
|
||||
|
||||
PARAMS params = { FALSE, FALSE, FALSE, FALSE, FALSE, 16384, 16, 5, 0};
|
||||
|
||||
double filter(double a, int len)
|
||||
{
|
||||
static double in[10];
|
||||
static double out;
|
||||
static int i, pint;
|
||||
static int empty = 1;
|
||||
|
||||
if (!in) {
|
||||
return a;
|
||||
}
|
||||
if (empty) {
|
||||
empty = 0;
|
||||
for (i = 0; i < len; i++) {
|
||||
in[i] = a;
|
||||
}
|
||||
out = a * len;
|
||||
pint = 0;
|
||||
return a;
|
||||
}
|
||||
out = out - in[pint] + a;
|
||||
in[pint] = a;
|
||||
if (++pint >= len) pint = 0;
|
||||
return out / len;
|
||||
}
|
||||
|
||||
|
||||
|
||||
sf_count_t sfx_mix_mono_read_double (SNDFILE * file, double * data, sf_count_t datalen)
|
||||
{
|
||||
SF_INFO info ;
|
||||
|
||||
#if HAVE_SF_GET_INFO
|
||||
/*
|
||||
** The function sf_get_info was in a number of 1.0.18 pre-releases but was removed
|
||||
** before 1.0.18 final and replaced with the SFC_GET_CURRENT_SF_INFO command.
|
||||
*/
|
||||
sf_get_info (file, &info) ;
|
||||
#else
|
||||
sf_command (file, SFC_GET_CURRENT_SF_INFO, &info, sizeof (info)) ;
|
||||
#endif
|
||||
|
||||
if (info.channels == 1)
|
||||
return sf_read_double (file, data, datalen) ;
|
||||
|
||||
static double multi_data [2048] ;
|
||||
int k, ch, frames_read ;
|
||||
sf_count_t dataout = 0 ;
|
||||
|
||||
while (dataout < datalen)
|
||||
{ int this_read ;
|
||||
|
||||
this_read = MIN (ARRAY_LEN (multi_data) / info.channels, datalen) ;
|
||||
|
||||
frames_read = sf_readf_double (file, multi_data, this_read) ;
|
||||
if (frames_read == 0)
|
||||
break ;
|
||||
|
||||
for (k = 0 ; k < frames_read ; k++)
|
||||
{ double mix = 0.0 ;
|
||||
|
||||
for (ch = 0 ; ch < info.channels ; ch++)
|
||||
mix += multi_data [k * info.channels + ch] ;
|
||||
data [dataout + k] = mix / info.channels ;
|
||||
} ;
|
||||
|
||||
dataout += this_read ;
|
||||
} ;
|
||||
|
||||
return dataout ;
|
||||
} /* sfx_mix_mono_read_double */
|
||||
|
||||
|
||||
static void read_mono_audio (SNDFILE * file, sf_count_t filelen, double * data, int datalen, int indx, int total)
|
||||
{
|
||||
sf_count_t start;
|
||||
|
||||
memset (data, 0, datalen * sizeof (data [0])) ;
|
||||
|
||||
|
||||
start = (indx * filelen) / total - datalen / 2 ;
|
||||
|
||||
if (start >= 0)
|
||||
sf_seek (file, start, SEEK_SET) ;
|
||||
else
|
||||
{ start = -start ;
|
||||
sf_seek (file, 0, SEEK_SET) ;
|
||||
data += start ;
|
||||
datalen -= start ;
|
||||
} ;
|
||||
|
||||
sfx_mix_mono_read_double (file, data, datalen) ;
|
||||
|
||||
return ;
|
||||
} /* read_mono_audio */
|
||||
|
||||
static double calc_magnitude (const double * freq, int freqlen, double * magnitude)
|
||||
{
|
||||
int k ;
|
||||
double max = 0.0 ;
|
||||
|
||||
for (k = 1 ; k < freqlen / 2 ; k++)
|
||||
{ magnitude [k] = sqrt (freq [k] * freq [k] + freq [freqlen - k - 1] * freq [freqlen - k - 1]) ;
|
||||
max = MAX (max, magnitude [k]) ;
|
||||
} ;
|
||||
magnitude [0] = 0.0 ;
|
||||
|
||||
return max ;
|
||||
} /* calc_magnitude */
|
||||
|
||||
|
||||
static void apply_window (double * data, int datalen)
|
||||
{
|
||||
static double window [10 * MAX_HEIGHT] ;
|
||||
static int window_len = 0 ;
|
||||
int k ;
|
||||
|
||||
if (window_len != datalen)
|
||||
{
|
||||
window_len = datalen ;
|
||||
if (datalen > ARRAY_LEN (window))
|
||||
{
|
||||
printf ("%s : datalen > MAX_HEIGHT\n", __func__) ;
|
||||
exit (1) ;
|
||||
} ;
|
||||
|
||||
calc_kaiser_window (window, datalen, 20.0) ;
|
||||
// calc_nuttall_window (window, datalen);
|
||||
} ;
|
||||
|
||||
for (k = 0 ; k < datalen ; k++)
|
||||
data [k] *= window [k] ;
|
||||
|
||||
return ;
|
||||
} /* apply_window */
|
||||
|
||||
static void interp_spec (float * mag, int maglen, const double *spec, int speclen)
|
||||
{
|
||||
int k, lastspec = 0 ;
|
||||
|
||||
mag [0] = spec [0] ;
|
||||
|
||||
for (k = 1 ; k < maglen ; k++) {
|
||||
double sum = 0.0 ;
|
||||
int count = 0 ;
|
||||
|
||||
do {
|
||||
sum += spec [lastspec] ;
|
||||
lastspec ++ ;
|
||||
count ++ ;
|
||||
}
|
||||
while (lastspec <= ceil ((k * speclen) / maglen)) ;
|
||||
|
||||
mag [k] = sum / count ;
|
||||
|
||||
} ;
|
||||
|
||||
return ;
|
||||
} /* interp_spec */
|
||||
|
||||
void process_data(double x)
|
||||
{
|
||||
static integer sample_counter = 0;
|
||||
static real rn = .1f;
|
||||
static integer retstat, n1, n2, imax, xhat, elmhat;
|
||||
static real pmax, zout, spdhat, px;
|
||||
static int init = 1;
|
||||
|
||||
if (params.print_variables && init) { //print variable labels first (only once) iu
|
||||
printf("\nretstat\timax\telmhat\txhat\tx\tpx\tpmax\tspdhat\trn\tzout\tp1\tp2\tp3\tp4\tp5\tp6\n");
|
||||
init = 0;
|
||||
}
|
||||
|
||||
sample_counter++;
|
||||
// if (sample_counter % DECIMATE == 0) { /* DECIMATE 4 kHz by 20 down to 200Hz - 5 ms sample time for PROCES */
|
||||
|
||||
noise_(x, &rn, &zout);
|
||||
|
||||
if (zout > 1.0) zout = 1.0;
|
||||
if (zout < 0.0) zout = 0.0;
|
||||
|
||||
retstat = proces_(&zout, &rn, &xhat, &px, &elmhat, &spdhat, &imax, &pmax);
|
||||
if (params.print_variables)
|
||||
printf("\n%d\t%d\t%d\t%d\t%f\t%f\t%f\t%f\t%f\t%f",(int)retstat,(int)imax,(int)elmhat,(int)xhat,x,px,pmax,spdhat,rn,zout);
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
decode_sndfile (SNDFILE *infile, int samplerate, sf_count_t filelen)
|
||||
{
|
||||
|
||||
|
||||
static double time_domain [10 * MAX_HEIGHT] ;
|
||||
static double freq_domain [10 * MAX_HEIGHT] ;
|
||||
static double single_mag_spec [5 * MAX_HEIGHT] ;
|
||||
static float mag_spec [MAX_WIDTH][MAX_HEIGHT] ;
|
||||
|
||||
fftw_plan plan ;
|
||||
double max_mag = 0.0 ;
|
||||
int width = 8192, height= 32, w, speclen ;
|
||||
|
||||
printf("\nfilelen:%d",(int)filelen);
|
||||
|
||||
/*
|
||||
** Choose a speclen value that is long enough to represent frequencies down
|
||||
** to 20Hz, and then increase it slightly so it is a multiple of 0x40 (64) so that
|
||||
** FFTW calculations will be quicker.
|
||||
*/
|
||||
|
||||
//qspeclen = 16; // 16 ok for 4000 Hz test60db.wav @16384 width
|
||||
speclen = params.speclen; // 64 for 48000 Hz capture.wav @4096 w or 2048
|
||||
width = params.width;
|
||||
|
||||
params.sample_rate = samplerate;
|
||||
//params.sample_duration = 2000.*speclen/samplerate;
|
||||
|
||||
if (2 * speclen > ARRAY_LEN (time_domain))
|
||||
{ printf ("%s : 2 * speclen > ARRAY_LEN (time_domain)\n", __func__) ;
|
||||
exit (1) ;
|
||||
} ;
|
||||
fprintf(stderr,"\nsamplerate:%d\nwidth:%d\nspeclen:%d\nsample duration:%f\n", samplerate,width, speclen,params.sample_duration);
|
||||
|
||||
plan = fftw_plan_r2r_1d (2 * speclen, time_domain, freq_domain, FFTW_R2HC, FFTW_MEASURE | FFTW_PRESERVE_INPUT) ;
|
||||
if (plan == NULL)
|
||||
{ printf ("%s : line %d : create plan failed.\n", __FILE__, __LINE__) ;
|
||||
exit (1) ;
|
||||
} ;
|
||||
|
||||
for (w = 0 ; w < width ; w++)
|
||||
{ double single_max ;
|
||||
|
||||
|
||||
read_mono_audio (infile, filelen, time_domain, 2 * speclen, w, width) ;
|
||||
|
||||
apply_window (time_domain, 2 * speclen) ;
|
||||
|
||||
fftw_execute (plan) ;
|
||||
|
||||
single_max = calc_magnitude (freq_domain, 2 * speclen, single_mag_spec) ;
|
||||
max_mag = MAX (max_mag, single_max) ;
|
||||
if (params.print_xplot)
|
||||
printf("\n%f",single_max);
|
||||
|
||||
// single_max = filter(single_max,10);
|
||||
process_data(single_max/max_mag); // decode Morse code here
|
||||
|
||||
// interp_spec (mag_spec [w], height, single_mag_spec, speclen) ;
|
||||
} ;
|
||||
|
||||
fftw_destroy_plan (plan) ;
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
process_sndfile (char * filename)
|
||||
{
|
||||
SNDFILE *infile ;
|
||||
SF_INFO info ;
|
||||
|
||||
memset (&info, 0, sizeof (info)) ;
|
||||
|
||||
infile = sf_open (filename, SFM_READ, &info) ;
|
||||
if (infile == NULL)
|
||||
{ printf ("Error : failed to open sound file '%s' : \n%s\n", filename, sf_strerror (NULL)) ;
|
||||
return ;
|
||||
} ;
|
||||
|
||||
decode_sndfile ( infile, info.samplerate, info.frames) ;
|
||||
|
||||
sf_close (infile);
|
||||
|
||||
return ;
|
||||
} /* render_sndfile */
|
||||
|
||||
void process_textfile(char *filename)
|
||||
{
|
||||
FILE *fp;
|
||||
float x;
|
||||
int res;
|
||||
static int samplecounter =0;
|
||||
|
||||
fp = fopen(filename, "r");
|
||||
if (fp == NULL) {
|
||||
printf("\nError : failed to open text file '%s' : \n", filename);
|
||||
return;
|
||||
}
|
||||
while (1) {
|
||||
res = fscanf(fp,"%f",&x);
|
||||
if ( res != 1) {
|
||||
fclose(fp);
|
||||
printf("\n");
|
||||
exit(0);
|
||||
}
|
||||
samplecounter++;
|
||||
if ((samplecounter % 20) == 0) { // assuming that text envelope files have 4000 Hz sampling rate, decimate by 20 to get to 200 Hz (5ms sample time)
|
||||
if (params.print_xplot)
|
||||
printf("\n%f",x);
|
||||
process_data((double)x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void usage_exit (const char * argv0)
|
||||
{
|
||||
const char * progname ;
|
||||
|
||||
progname = strrchr (argv0, '/') ;
|
||||
progname = (progname == NULL) ? argv0 : progname + 1 ;
|
||||
|
||||
puts ("\nBayesian Morse Decoder program reads sound file and decodes CW to text.") ;
|
||||
|
||||
printf ("\nUsage :\n\n %s [options] <sound file> \n\n", progname) ;
|
||||
|
||||
puts (
|
||||
" Options include:\n\n"
|
||||
" -var Print variables for post-analysis (default off).\n"
|
||||
" -sym Print symbols before translation (default off). \n"
|
||||
" -txt Print decoded and translated text (default off).\n"
|
||||
" -txf Process text file instead of soundfile.\n"
|
||||
" -plt Print sndfile values for xplot ./morse -plt <sndfile> | xplot \n"
|
||||
" -len <length> Window length for FFT [8,16,32,64,128...].\n"
|
||||
" -wid <width> Width of buffer to read & process [8192, 16384].\n"
|
||||
" -dur <duration> Sample duration in msec [5.0].\n"
|
||||
|
||||
|
||||
|
||||
) ;
|
||||
|
||||
puts (
|
||||
" TXF: The text file contains real valued input (1 datapoint per line) to be decoded.\n"
|
||||
" Default: The sound file type is determined by the file name extension which should be one\n"
|
||||
" of 'wav', 'aifc', 'aif', 'aiff', 'au', 'caf' and 'w64'.\n"
|
||||
) ;
|
||||
|
||||
exit (0) ;
|
||||
} /* usage_exit */
|
||||
|
||||
|
||||
|
||||
|
||||
// MAIN PROGRAM = BAYESIAN MORSE DECODER
|
||||
// (c) Mauri Niininen AG1LE
|
||||
//
|
||||
|
||||
int main(int argc, char**argv)
|
||||
{
|
||||
/* Initialized data */
|
||||
|
||||
|
||||
int k;
|
||||
|
||||
int s_stop(char *, ftnlen);
|
||||
|
||||
/* Local variables */
|
||||
|
||||
int res;
|
||||
FILE *fp;
|
||||
|
||||
/* PARSE PARAMETERS FROM COMMAND LINE */
|
||||
|
||||
if (argc < 2)
|
||||
usage_exit (argv [0]) ;
|
||||
|
||||
for (k = 1 ; k < argc; k++) {
|
||||
if (strcmp (argv [k], "-wid") == 0){
|
||||
k++ ;
|
||||
params.width = atoi (argv [k]) ;
|
||||
continue ;
|
||||
}
|
||||
if (strcmp (argv [k], "-len") == 0) {
|
||||
k++ ;
|
||||
params.speclen = atoi (argv [k]) ;
|
||||
continue ;
|
||||
}
|
||||
if (strcmp (argv [k], "-dur") == 0){
|
||||
k++ ;
|
||||
params.sample_duration = atof (argv [k]) ;
|
||||
continue ;
|
||||
}
|
||||
if (strcmp (argv [k], "-var") == 0){
|
||||
params.print_variables = TRUE;
|
||||
continue ;
|
||||
}
|
||||
if (strcmp (argv [k], "-sym") == 0){
|
||||
params.print_symbols = TRUE;
|
||||
continue ;
|
||||
}
|
||||
if (strcmp (argv [k], "-txt") == 0){
|
||||
params.print_text = TRUE;
|
||||
continue ;
|
||||
}
|
||||
if (strcmp (argv [k], "-txf") == 0){
|
||||
params.process_textfile = TRUE;
|
||||
continue ;
|
||||
}
|
||||
if (strcmp (argv [k], "-plt") == 0){
|
||||
params.print_xplot = TRUE;
|
||||
continue ;
|
||||
}
|
||||
} ;
|
||||
|
||||
/* INITIALIZE DATA STRUCTURES */
|
||||
initl_();
|
||||
inputl_();
|
||||
|
||||
if(params.process_textfile)
|
||||
process_textfile(argv[k-1]);
|
||||
else
|
||||
process_sndfile(argv[k-1]);
|
||||
|
||||
|
||||
} /* MAIN__ */
|
||||
|
||||
|
||||
|
||||
|
||||
|
96
src/morse.h
96
src/morse.h
|
@ -1,96 +0,0 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// morse.h -- morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
typedef long int integer;
|
||||
typedef unsigned long int uinteger;
|
||||
typedef float real;
|
||||
typedef double doublereal;
|
||||
typedef int ftnlen;
|
||||
|
||||
extern int rcvr_(real *, real *);
|
||||
extern int noise_(double, real *, real *);
|
||||
extern int initl_(void);
|
||||
extern int stats_(real *, real *, real *, integer *, real *, real *, real *, real *, integer *);
|
||||
extern int bpfdet_(real *, real *);
|
||||
extern int simsgi_(real *, real *);
|
||||
extern int proces_(real *z, real *rn, integer *xhat, real *px, integer *elmhat, real *spdhat, integer *imax, real *pmax);
|
||||
extern int inputl_(void);
|
||||
extern int transl_(int *ltr);
|
||||
extern int trelis_(integer *isave, integer *pathsv, integer *lambda, integer *imax, integer *ipmax);
|
||||
|
||||
|
||||
extern int probp_(real *, real *, integer *, real *);
|
||||
extern int sprob_(real *, integer *, integer *, real *, integer *, real *, real *);
|
||||
extern int trprob_(integer *, integer *, real *, integer *, real *);
|
||||
extern int savep_(real *, integer *, integer *, integer *, integer *, real *, integer *, integer *, real *, integer *, integer *, real *);
|
||||
extern int likhd_(real *, real *, integer *, integer *, real *, integer *, real *, real *);
|
||||
extern int path_(integer *, integer *, real *, integer *, integer *, real *, integer *);
|
||||
extern doublereal spdtr_(integer *, integer *, integer *, integer *);
|
||||
|
||||
#define FSAMPLE 4000.0 // Sampling Frequency FLDIGI=8000 MORSE.M =4000
|
||||
#define DECIMATE 20 // Decimation FLDIGI=40 MORSE.M=20
|
||||
#define SAMPLEDURATION (1000. * DECIMATE) / FSAMPLE // 1000*DECIMATE / FSAMPLE SHOULD BE 5 msec
|
||||
#define NDELAY 200 // 200 SAMPLES * 5 msec = 1000 msec decoding delay
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
typedef struct
|
||||
{ int print_variables ;
|
||||
int print_symbols;
|
||||
int process_textfile;
|
||||
int print_text;
|
||||
int print_xplot;
|
||||
int width, speclen ;
|
||||
double sample_duration;
|
||||
double sample_rate;
|
||||
} PARAMS ;
|
||||
|
||||
extern PARAMS params;
|
||||
|
||||
|
||||
/* Common Block Declarations */
|
||||
struct BLKSPD {
|
||||
real rtrans[10] /* was [5][2] */;
|
||||
integer mempr[36] /* was [6][6] */;
|
||||
} blkspd;
|
||||
|
||||
struct BLKRAT {
|
||||
integer memdel[36] /* was [6][6] */;
|
||||
} blkrat;
|
||||
|
||||
struct BLKLAM {
|
||||
integer ielmst[400], ilami[16], ilamx[6];
|
||||
} blklam;
|
||||
|
||||
|
||||
struct BLKS {
|
||||
integer isx[6];
|
||||
} blks;
|
||||
|
||||
struct BLKELM {
|
||||
real elemtr[96] /* was [16][6] */;
|
||||
} blkelm;
|
||||
|
||||
struct BLKMEM {
|
||||
integer memfcn[2400] /* was [400][6] */;
|
||||
} blkmem;
|
||||
|
36
src/noise.c
36
src/noise.c
|
@ -1,28 +1,28 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// noise.c -- morse code decoder
|
||||
// noise.c -- bayesian morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// This file is part of Bayesian Morse code decoder
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// bmorse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// bmorse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// along with bmorse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "morse.h"
|
||||
#include "bmorse.h"
|
||||
|
||||
/* Subroutine */ int noise_(double zin, real *rn, real *z__)
|
||||
int noise_(double zin, real *rn, real *z)
|
||||
{
|
||||
/* Initialized data */
|
||||
|
||||
|
@ -52,10 +52,10 @@
|
|||
static real ymavg = .05f;
|
||||
|
||||
/* System generated locals */
|
||||
integer i__1;
|
||||
integer i1;
|
||||
|
||||
/* Local variables */
|
||||
static integer i__;
|
||||
static integer i;
|
||||
static real fs, ymin;
|
||||
|
||||
|
||||
|
@ -90,21 +90,21 @@
|
|||
ymin1 = zin;
|
||||
ymin2 = zin;
|
||||
L10:
|
||||
i__1 = kkl;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
if (ylong[i__ - 1] > ymin1) {
|
||||
i1 = kkl;
|
||||
for (i = 1; i <= i1; ++i) {
|
||||
if (ylong[i - 1] > ymin1) {
|
||||
goto L100;
|
||||
}
|
||||
ymin1 = ylong[i__ - 1];
|
||||
ymin1 = ylong[i - 1];
|
||||
L100:
|
||||
;
|
||||
}
|
||||
i__1 = kks;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
if (yshort[i__ - 1] > ymin2) {
|
||||
i1 = kks;
|
||||
for (i = 1; i <= i1; ++i) {
|
||||
if (yshort[i - 1] > ymin2) {
|
||||
goto L200;
|
||||
}
|
||||
ymin2 = yshort[i__ - 1];
|
||||
ymin2 = yshort[i - 1];
|
||||
L200:
|
||||
;
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ L200:
|
|||
if (*rn < .005f) {
|
||||
*rn = .005f;
|
||||
}
|
||||
*z__ = (zin - ymavg * 2.4f - .05f) * 1.1f;
|
||||
*z = (zin - ymavg * 2.4f - .05f) * 1.1f;
|
||||
return 0;
|
||||
} /* noise_ */
|
||||
|
||||
|
|
12
src/path.c
12
src/path.c
|
@ -1,26 +1,26 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// path.c -- morse code decoder
|
||||
// path.c -- bayesian morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// This file is part of Bayesian Morse code decoder
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// bmorse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// bmorse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// along with bmorse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "morse.h"
|
||||
#include "bmorse.h"
|
||||
|
||||
|
||||
int path_(integer *ip, integer *lambda, real *dur, integer *ilrate, integer *lamsav, real *dursav, integer *ilrsav)
|
||||
|
|
12
src/probp.c
12
src/probp.c
|
@ -1,26 +1,26 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// probp.c -- morse code decoder
|
||||
// probp.c -- bayesian morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// This file is part of Bayesian Morse code decoder
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// bmorse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// bmorse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// along with bmorse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "f2c.h"
|
||||
#include "bmorse.h"
|
||||
|
||||
/* Subroutine */ int probp_(real *p, real *pin, integer *isave, real *lkhd)
|
||||
{
|
||||
|
|
23
src/proces.c
23
src/proces.c
|
@ -1,26 +1,26 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// proces.c -- morse code decoder
|
||||
// proces.c -- bayesian morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// This file is part of Bayesian Morse code decoder
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// bmorse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// bmorse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// along with bmorse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "morse.h"
|
||||
#include "bmorse.h"
|
||||
|
||||
int proces_(real *z, real *rn, integer *xhat, real *px, integer *elmhat, real *spdhat, integer *imax, real *
|
||||
pmax)
|
||||
|
@ -202,8 +202,8 @@ int proces_(real *z, real *rn, integer *xhat, real *px, integer *elmhat, real *
|
|||
static real pelm;
|
||||
static integer sort[25];
|
||||
static integer ipath;
|
||||
|
||||
static integer ipmax;
|
||||
static int init =1;
|
||||
|
||||
|
||||
/* THIS SUBROUTINE IMPLEMENTS THE PROCESSING ALGORITHM */
|
||||
|
@ -252,7 +252,14 @@ int proces_(real *z, real *rn, integer *xhat, real *px, integer *elmhat, real *
|
|||
/* IDENTITY OF EACH NEW PATH EXTENDED (PATH); */
|
||||
/* LIKELIHOOD OF EACH STATE EXTENSION (LIKHD); */
|
||||
|
||||
|
||||
/* if (init) {
|
||||
for (i=0; i<750; i++)
|
||||
ilrsav[i]=10;
|
||||
for(i=0;i<25;i++)
|
||||
ilrate[i]=13;
|
||||
init = 0;
|
||||
}
|
||||
*/
|
||||
i1 = isave;
|
||||
for (i = 1; i <= i1; ++i) {
|
||||
ipath = i;
|
||||
|
|
14
src/ptrans.c
14
src/ptrans.c
|
@ -1,30 +1,30 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// ptrans.c -- morse code decoder
|
||||
// ptrans.c -- bayesian morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// This file is part of Bayesian Morse code decoder
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// bmorse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// bmorse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// along with bmorse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "morse.h"
|
||||
#include "bmorse.h"
|
||||
|
||||
|
||||
|
||||
/* Subroutine */ int ptrans_(integer *kelem, integer *irate, integer *lambda, integer *ilrate, real *ptrx, real *psum, real *pin, integer *n)
|
||||
int ptrans_(integer *kelem, integer *irate, integer *lambda, integer *ilrate, real *ptrx, real *psum, real *pin, integer *n)
|
||||
{
|
||||
static real pelem, prate;
|
||||
|
||||
|
|
26
src/savep.c
26
src/savep.c
|
@ -1,34 +1,28 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// savep.c -- morse code decoder
|
||||
// savep.c -- bayesian morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// This file is part of Bayesian Morse code decoder
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// bmorse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// bmorse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// along with bmorse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "morse.h"
|
||||
#include "bmorse.h"
|
||||
|
||||
/* Common Block Declarations */
|
||||
|
||||
struct {
|
||||
real ykkip[25], pkkip[25], ykksv[750], pkksv[750];
|
||||
} blksv1_;
|
||||
|
||||
#define blksv1_1 blksv1_
|
||||
|
||||
/* Subroutine */ int savep_(real *p, integer *pathsv, integer *isave, integer
|
||||
*imax, integer *lamsav, real *dursav, integer *ilrsav, integer *
|
||||
|
@ -158,8 +152,8 @@ struct {
|
|||
lambda[i] = lamsav[sort[i]];
|
||||
dur[i] = dursav[sort[i]];
|
||||
ilrate[i] = ilrsav[sort[i]];
|
||||
blksv1_1.ykkip[i - 1] = blksv1_1.ykksv[sort[i] - 1];
|
||||
blksv1_1.pkkip[i - 1] = blksv1_1.pkksv[sort[i] - 1];
|
||||
blksv.ykkip[i - 1] = blksv.ykksv[sort[i] - 1];
|
||||
blksv.pkkip[i - 1] = blksv.pkksv[sort[i] - 1];
|
||||
}
|
||||
i1 = *isave;
|
||||
for (i = 1; i <= i1; ++i) {
|
||||
|
@ -199,8 +193,8 @@ struct {
|
|||
lambda[n] = lambda[i];
|
||||
dur[n] = dur[i];
|
||||
ilrate[n] = ilrate[i];
|
||||
blksv1_1.ykkip[n - 1] = blksv1_1.ykkip[i - 1];
|
||||
blksv1_1.pkkip[n - 1] = blksv1_1.pkkip[i - 1];
|
||||
blksv.ykkip[n - 1] = blksv.ykkip[i - 1];
|
||||
blksv.pkkip[n - 1] = blksv.pkkip[i - 1];
|
||||
pathsv[n] = pathsv[i];
|
||||
sort[n] = sort[i];
|
||||
p[n] = p[i];
|
||||
|
|
10
src/simsgi.c
10
src/simsgi.c
|
@ -1,23 +1,23 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// simsgi.c -- morse code decoder
|
||||
// simsgi.c -- bayesian morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// This file is part of Bayesian Morse code decoder
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// bmorse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// bmorse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// along with bmorse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
|
12
src/spdtr.c
12
src/spdtr.c
|
@ -1,26 +1,26 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// spdtr.c -- morse code decoder
|
||||
// spdtr.c -- bayesian morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// This file is part of Bayesian Morse code decoder
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// bmorse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// bmorse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// along with bmorse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "morse.h"
|
||||
#include "bmorse.h"
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
|
|
22
src/sprob.c
22
src/sprob.c
|
@ -1,26 +1,26 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// sprob.c -- morse code decoder
|
||||
// sprob.c -- bayesian morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// This file is part of Bayesian Morse code decoder
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// bmorse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// bmorse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// along with bmorse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "morse.h"
|
||||
#include "bmorse.h"
|
||||
|
||||
#include <stdio.h>
|
||||
extern char debug;
|
||||
|
@ -75,15 +75,17 @@ int sprob_(real *p, integer *isave, integer *ilrsav, real *pelm, integer *khat,
|
|||
*pelm = 0.f;
|
||||
|
||||
for (k = 1; k <= 6; ++k) {
|
||||
// IF WANT ELEMENT PROBABILITIES BY SAMPLE ENABLE debug flag -var
|
||||
if (params.print_variables && initial) {
|
||||
printf("\t%f",pselem[k - 1]);
|
||||
}
|
||||
// IF WANT ELEMENT PROBABILITIES BY SAMPLE ENABLE debug flag -var
|
||||
if (params.print_variables && initial) {
|
||||
printf("\t%f",pselem[k - 1]);
|
||||
}
|
||||
if (pselem[k - 1] >= *pelm) {
|
||||
*pelm = pselem[k - 1];
|
||||
*khat = k;
|
||||
}
|
||||
}
|
||||
if (params.print_variables && initial)
|
||||
printf("\t");
|
||||
initial = 1;
|
||||
return 0;
|
||||
} /* sprob_ */
|
||||
|
|
12
src/stats.c
12
src/stats.c
|
@ -1,28 +1,28 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// stats.c -- morse code decoder
|
||||
// stats.c -- bayesian morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// This file is part of Bayesian Morse code decoder
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// bmorse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// bmorse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// along with bmorse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
/* Subroutine */ int stats_(real *xin1, real *xin2, real *xin3, real *xin4,
|
||||
int stats_(real *xin1, real *xin2, real *xin3, real *xin4,
|
||||
real *s1, real *s2, real *s3, real *s4, integer *n)
|
||||
{
|
||||
/* Parameter adjustments */
|
||||
|
|
12
src/transl.c
12
src/transl.c
|
@ -1,27 +1,27 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// transl.c -- morse code decoder
|
||||
// transl.c -- bayesian morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// This file is part of Bayesian Morse code decoder
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// bmorse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// bmorse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// along with bmorse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include <stdio.h>
|
||||
#include "morse.h"
|
||||
#include "bmorse.h"
|
||||
struct TREE {
|
||||
int dit,dah;
|
||||
char chr[12];
|
||||
|
|
12
src/trelis.c
12
src/trelis.c
|
@ -1,27 +1,27 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// trelis.c -- morse code decoder
|
||||
// trelis.c -- bayesian morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// This file is part of Bayesian Morse code decoder
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// bmorse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// bmorse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// along with bmorse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include <stdio.h>
|
||||
#include "morse.h"
|
||||
#include "bmorse.h"
|
||||
|
||||
//#define DEBUG 1
|
||||
|
||||
|
|
12
src/trprob.c
12
src/trprob.c
|
@ -1,26 +1,26 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// trprob.c -- morse code decoder
|
||||
// trprob.c -- bayesian morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// This file is part of Bayesian Morse code decoder
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// bmorse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// bmorse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// along with bmorse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "morse.h"
|
||||
#include "bmorse.h"
|
||||
|
||||
int trprob_(integer *ip, integer *lambda, real *dur, integer *ilrate, real *p)
|
||||
{
|
||||
|
|
14
src/xtrans.c
14
src/xtrans.c
|
@ -1,26 +1,26 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// xtrans.c -- morse code decoder
|
||||
// xtrans.c -- bayesian morse code decoder
|
||||
//
|
||||
// Copyright (C) 2012-2014
|
||||
// (C) Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of Morse.
|
||||
// This file is part of Bayesian Morse code decoder
|
||||
|
||||
// Morse is free software: you can redistribute it and/or modify
|
||||
// bmorse is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Morse is distributed in the hope that it will be useful,
|
||||
// bmorse is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Morse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// along with bmorse. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "morse.h"
|
||||
#include "bmorse.h"
|
||||
#include <math.h>
|
||||
|
||||
doublereal xtrans_(integer *ielem, real *d0, integer *irate)
|
||||
|
@ -53,7 +53,7 @@ doublereal xtrans_(integer *ielem, real *d0, integer *irate)
|
|||
|
||||
/* SCALE DURATION AND OBTAIN DENSITY PARAMETER: */
|
||||
|
||||
mscale = kimap[(0 + (0 + (*ielem - 1 << 2))) / 4];
|
||||
mscale = kimap[(0 + (0 + ((*ielem - 1) << 2))) / 4];
|
||||
rscale = 1200.f / *irate;
|
||||
b0 = *d0 / (mscale * rscale);
|
||||
b1 = (*d0 + 5.f) / (mscale * rscale);
|
||||
|
|
Ładowanie…
Reference in New Issue