Initial Commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_ZIP_VIEW_ITERATOR_FWD)
|
||||
#define FUSION_ZIP_VIEW_ITERATOR_FWD
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/view/detail/strictest_traversal.hpp>
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
|
||||
template<
|
||||
typename IteratorSequence,
|
||||
typename Traversal = typename detail::strictest_traversal<IteratorSequence>::type>
|
||||
struct zip_view_iterator;
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,73 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2015-2015. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_CONTAINER_USES_ALLOCATOR_FWD_HPP
|
||||
#define BOOST_CONTAINER_USES_ALLOCATOR_FWD_HPP
|
||||
|
||||
#include <boost/container/detail/workaround.hpp>
|
||||
#include <boost/container/detail/std_fwd.hpp>
|
||||
|
||||
//! \file
|
||||
//! This header forward declares boost::container::constructible_with_allocator_prefix,
|
||||
//! boost::container::constructible_with_allocator_suffix and
|
||||
//! boost::container::uses_allocator. Also defines the following types:
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
template <int Dummy = 0>
|
||||
struct std_allocator_arg_holder
|
||||
{
|
||||
static ::std::allocator_arg_t *dummy;
|
||||
};
|
||||
|
||||
template <int Dummy> //Silence null-reference compiler warnings
|
||||
::std::allocator_arg_t *std_allocator_arg_holder<Dummy>::dummy = reinterpret_cast< ::std::allocator_arg_t * >(0x1234);
|
||||
|
||||
typedef const std::allocator_arg_t & allocator_arg_t;
|
||||
|
||||
#else
|
||||
|
||||
//! The allocator_arg_t struct is an empty structure type used as a unique type to
|
||||
//! disambiguate constructor and function overloading. Specifically, several types
|
||||
//! have constructors with allocator_arg_t as the first argument, immediately followed
|
||||
//! by an argument of a type that satisfies Allocator requirements
|
||||
typedef unspecified allocator_arg_t;
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
//! The `erased_type` struct is an empty struct that serves as a placeholder for a type
|
||||
//! T in situations where the actual type T is determined at runtime. For example,
|
||||
//! the nested type, `allocator_type`, is an alias for `erased_type` in classes that
|
||||
//! use type-erased allocators.
|
||||
struct erased_type {};
|
||||
|
||||
//! A instance of type
|
||||
//! allocator_arg_t
|
||||
static allocator_arg_t allocator_arg = BOOST_CONTAINER_DOC1ST(unspecified, *std_allocator_arg_holder<>::dummy);
|
||||
|
||||
// @cond
|
||||
|
||||
template <class T>
|
||||
struct constructible_with_allocator_suffix;
|
||||
|
||||
template <class T>
|
||||
struct constructible_with_allocator_prefix;
|
||||
|
||||
template <typename T, typename Allocator>
|
||||
struct uses_allocator;
|
||||
|
||||
// @endcond
|
||||
|
||||
}} // namespace boost { namespace container {
|
||||
|
||||
#endif //BOOST_CONTAINER_USES_ALLOCATOR_HPP
|
||||
@@ -0,0 +1,45 @@
|
||||
#if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES)
|
||||
|
||||
#include <boost/proto/detail/preprocessed/memfun_funop.hpp>
|
||||
|
||||
#elif !defined(BOOST_PP_IS_ITERATING)
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(preserve: 2, line: 0, output: "preprocessed/memfun_funop.hpp")
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// memfun_funop.hpp
|
||||
// Contains overloads of memfun::operator().
|
||||
//
|
||||
// Copyright 2008 Eric Niebler. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(preserve: 1)
|
||||
#endif
|
||||
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3, (1, BOOST_PROTO_MAX_ARITY, <boost/proto/detail/memfun_funop.hpp>))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(output: null)
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#define N BOOST_PP_ITERATION()
|
||||
|
||||
template<BOOST_PP_ENUM_PARAMS(N, typename A)>
|
||||
BOOST_FORCEINLINE
|
||||
result_type operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, const &a)) const
|
||||
{
|
||||
BOOST_PROTO_USE_GET_POINTER();
|
||||
return (BOOST_PROTO_GET_POINTER(V, obj) ->* pmf)(BOOST_PP_ENUM_PARAMS(N, a));
|
||||
}
|
||||
|
||||
#undef N
|
||||
|
||||
#endif // BOOST_PROTO_DONT_USE_PREPROCESSED_FILES
|
||||
@@ -0,0 +1,60 @@
|
||||
#ifndef BOOST_SERIALIZATION_WRAPPER_HPP
|
||||
#define BOOST_SERIALIZATION_WRAPPER_HPP
|
||||
|
||||
// (C) Copyright 2005-2006 Matthias Troyer
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/serialization/traits.hpp>
|
||||
#include <boost/type_traits/is_base_and_derived.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/bool_fwd.hpp>
|
||||
|
||||
namespace boost { namespace serialization {
|
||||
|
||||
/// the base class for serialization wrappers
|
||||
///
|
||||
/// wrappers need to be treated differently at various places in the serialization library,
|
||||
/// e.g. saving of non-const wrappers has to be possible. Since partial specialization
|
||||
// is not supported by all compilers, we derive all wrappers from wrapper_traits.
|
||||
|
||||
template<
|
||||
class T,
|
||||
int Level = object_serializable,
|
||||
int Tracking = track_never,
|
||||
unsigned int Version = 0,
|
||||
class ETII = extended_type_info_impl< T >
|
||||
>
|
||||
struct wrapper_traits :
|
||||
public traits<T,Level,Tracking,Version,ETII,mpl::true_>
|
||||
{};
|
||||
|
||||
template<class T>
|
||||
struct is_wrapper_impl :
|
||||
boost::mpl::eval_if<
|
||||
boost::is_base_and_derived<basic_traits,T>,
|
||||
boost::mpl::true_,
|
||||
boost::mpl::false_
|
||||
>::type
|
||||
{};
|
||||
|
||||
template<class T>
|
||||
struct is_wrapper {
|
||||
typedef typename is_wrapper_impl<const T>::type type;
|
||||
};
|
||||
|
||||
} // serialization
|
||||
} // boost
|
||||
|
||||
// A macro to define that a class is a wrapper
|
||||
#define BOOST_CLASS_IS_WRAPPER(T) \
|
||||
namespace boost { \
|
||||
namespace serialization { \
|
||||
template<> \
|
||||
struct is_wrapper_impl<const T> : boost::mpl::true_ {}; \
|
||||
} \
|
||||
} \
|
||||
/**/
|
||||
|
||||
#endif //BOOST_SERIALIZATION_WRAPPER_HPP
|
||||
@@ -0,0 +1,55 @@
|
||||
subroutine sync9f(s2,nq,nfa,nfb,ss2,ss3,lagpk,ipk,ccfbest)
|
||||
|
||||
! Look for JT9 sync pattern in the folded symbol spectra, s2.
|
||||
! Frequency search extends from nfa to nfb. Synchronized symbol
|
||||
! spectra are put into ss2() and ss3().
|
||||
|
||||
integer ii4(16)
|
||||
real s2(240,340)
|
||||
real ss2(0:8,85)
|
||||
real ss3(0:7,69)
|
||||
include 'jt9sync.f90'
|
||||
|
||||
ii4=4*ii-3
|
||||
ccf=0.
|
||||
ccfbest=0.
|
||||
nfft=4*nq
|
||||
df=12000.0/nfft
|
||||
ia=nfa/df
|
||||
ib=nfb/df + 0.9999
|
||||
|
||||
do i=ia,ib
|
||||
do lag=0,339
|
||||
t=0.
|
||||
do n=1,16
|
||||
j=ii4(n)+lag
|
||||
if(j.gt.340) j=j-340
|
||||
t=t + s2(i,j)
|
||||
enddo
|
||||
if(t.gt.ccfbest) then
|
||||
lagpk=lag
|
||||
ipk=i
|
||||
ccfbest=t
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
|
||||
do i=0,8
|
||||
j4=lagpk-4
|
||||
i2=2*i + ipk
|
||||
if(i2.lt.1) i2=1
|
||||
m=0
|
||||
do j=1,85
|
||||
j4=j4+4
|
||||
if(j4.gt.340) j4=j4-340
|
||||
if(j4.lt.1) j4=j4+340
|
||||
ss2(i,j)=s2(i2,j4)
|
||||
if(i.ge.1 .and. isync(j).eq.0) then
|
||||
m=m+1
|
||||
ss3(i-1,m)=ss2(i,j)
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
|
||||
return
|
||||
end subroutine sync9f
|
||||
@@ -0,0 +1,25 @@
|
||||
subroutine flat65(ss,nhsym,maxhsym,nsz,ref)
|
||||
|
||||
real stmp(nsz)
|
||||
real ss(maxhsym,nsz)
|
||||
real ref(nsz)
|
||||
|
||||
npct=28 !Somewhat arbitrary
|
||||
do i=1,nsz
|
||||
call pctile(ss(1,i),nhsym,npct,stmp(i))
|
||||
enddo
|
||||
|
||||
nsmo=33
|
||||
ia=nsmo/2 + 1
|
||||
ib=nsz - nsmo/2 - 1
|
||||
do i=ia,ib
|
||||
call pctile(stmp(i-nsmo/2),nsmo,npct,ref(i))
|
||||
enddo
|
||||
ref(:ia-1)=ref(ia)
|
||||
ref(ib+1:)=ref(ib)
|
||||
ref=4.0*ref
|
||||
|
||||
return
|
||||
end subroutine flat65
|
||||
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
<HTML><HEAD>
|
||||
|
||||
<TITLE> Programs for Low Density Parity Check Codes </TITLE>
|
||||
|
||||
</HEAD><BODY>
|
||||
|
||||
|
||||
<H1> Programs for Low Density Parity Check Codes </H1>
|
||||
|
||||
Programs are available for creating LDPC codes, encoding messages,
|
||||
simulating transmission through a channel, and decoding the received
|
||||
message. There are links here to the general documentation on each of
|
||||
these operations, and to the detailed documentation on the relevant
|
||||
programs.
|
||||
|
||||
<P>The programs names below are followed by the form of arguments they
|
||||
take; a similar usage message is displayed when a program is run with
|
||||
no arguments. In these descriptions, things to be entered literally
|
||||
are in roman font, descriptions of something to be supplied are in
|
||||
italic. Arguments in square brackets are optional. A vertical bar
|
||||
separates alternatives. Dots represent indefinite repetition.
|
||||
|
||||
<P>Many of the arguments are file names, which can be a dash ("-") in
|
||||
order to specify that standard input or standard output is to be used.
|
||||
(However, you can't use standard input or output for more than one thing.)
|
||||
|
||||
<P>Click on a main title below for general information on that aspect
|
||||
of the software, or on the name of a program for detailed information.
|
||||
|
||||
<P><A HREF="pchk.html">Creating a parity check matrix for a code</A>:
|
||||
<BLOCKQUOTE><PRE>
|
||||
<A HREF="pchk.html#make-pchk">make-pchk</A> <I>pchk-file n-checks n-bits row</I>:<I>col ...</I>
|
||||
|
||||
<A HREF="pchk.html#alist-to-pchk">alist-to-pchk</A> [ -t ] <I>alist-file pchk-file</I>
|
||||
|
||||
<A HREF="pchk.html#pchk-to-alist">pchk-to-alist</A> [ -t ] [ -z ] <I>pchk-file alist-file</I>
|
||||
|
||||
<A HREF="pchk.html#print-pchk">print-pchk</A> [ -d ] [ -t ] <I>pchk-file</I>
|
||||
|
||||
<A HREF="pchk.html#make-ldpc">make-ldpc</A> <I>pchk-file n-checks n-bits seed method</I>
|
||||
</PRE></BLOCKQUOTE>
|
||||
|
||||
<P><A HREF="encoding.html">Encoding message blocks as codewords</A>:
|
||||
<BLOCKQUOTE><PRE>
|
||||
<A HREF="encoding.html#make-gen">make-gen</A> <I>pchk-file gen-file method</I>
|
||||
|
||||
<A HREF="encoding.html#print-gen">print-gen</A> [ -d ] <I>gen-file</I>
|
||||
|
||||
<A HREF="encoding.html#encode">encode</A> [ -f ] <I>pchk-file gen-file source-file encoded-file</I>
|
||||
</PRE></BLOCKQUOTE>
|
||||
|
||||
<P><A HREF="channel.html">Transmitting bits through a simulated channel:</A>
|
||||
<BLOCKQUOTE><PRE>
|
||||
<A HREF="channel.html#transmit">transmit</A> <I>encoded-file</I>|<I>n-zeros received-file seed channel</I>
|
||||
</PRE></BLOCKQUOTE>
|
||||
|
||||
<P><A HREF="decoding.html">Decoding received blocks:</A>
|
||||
<BLOCKQUOTE><PRE>
|
||||
<A HREF="decoding.html#decode">decode</A> [ -f ] [ -t | -T ] <I>pchk-file received-file decoded-file</I> [ <I>bp-file</I> ] <I>channel method</I>
|
||||
|
||||
<A HREF="decoding.html#extract">extract</A> <I>gen-file decoded-file extracted-file</I>
|
||||
</PRE></BLOCKQUOTE>
|
||||
|
||||
<P><A HREF="support.html">Support programs:</A>
|
||||
<BLOCKQUOTE><PRE>
|
||||
<A HREF="support.html#rand-src">rand-src</A> <I>source-file seed n-bits</I>
|
||||
|
||||
<A HREF="support.html#verify">verify</A> [ -t ] <I>pchk-file decoded-file</I> [ <I>gen-file</I> [ <I>source-file</I> ] ]
|
||||
</PRE></BLOCKQUOTE>
|
||||
|
||||
See also the discussions of <A HREF="dep-H.html">linear dependence in
|
||||
parity check matrices</A> and of <A HREF="sparse-LU.html">sparse LU
|
||||
decomposition methods</A>, and the <A HREF="examples.html">examples
|
||||
of program usage</A>.
|
||||
|
||||
<HR>
|
||||
|
||||
<A HREF="index.html">Back to index for LDPC software</A>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -0,0 +1,55 @@
|
||||
=== New in Version 1.8
|
||||
|
||||
For quick reference, here's a short list of features and capabilities
|
||||
added to _WSJT-X_ since Version 1.7.0:
|
||||
|
||||
- New mode *FT8* designed for fast QSOs
|
||||
|
||||
- New tool *FreqCal* for accurate frequency calibration of your radio
|
||||
|
||||
- Improved decoding performance for JT65, QRA64, and MSK144
|
||||
|
||||
- *SWL* option for third-party decoding short-format MSK144 messages
|
||||
|
||||
- Experimental phase equalization for MSK144
|
||||
|
||||
- Options to minimize screen space used by *Main* and *Wide Graph*
|
||||
windows
|
||||
|
||||
- New set of suggested default frequencies specific to the three IARU
|
||||
regions
|
||||
|
||||
- Enhanced scheme for managing table of suggested default operating
|
||||
frequencies
|
||||
|
||||
- Improved CAT control for many radios, including those controlled
|
||||
through Commander or OmniRig
|
||||
|
||||
- Bug fixes and minor tweaks to user interface
|
||||
|
||||
=== Documentation Conventions
|
||||
|
||||
In this manual the following icons call attention to particular types
|
||||
of information:
|
||||
|
||||
NOTE: *Notes* containing information that may be of interest to
|
||||
particuar classes of users.
|
||||
|
||||
TIP: *Tips* on program features or capabilities that might otherwise be
|
||||
overlooked.
|
||||
|
||||
IMPORTANT: *Warnings* about usage that could lead to undesired
|
||||
consequences.
|
||||
|
||||
=== How You Can Contribute
|
||||
|
||||
_WSJT-X_ is part of an open-source project released under the
|
||||
{gnu_gpl} (GPL). If you have programming or documentation skills or
|
||||
would like to contribute to the project in other ways, please make
|
||||
your interests known to the development team. The project's
|
||||
source-code repository can be found at {devsvn}, and most
|
||||
communication among the developers takes place on the email reflector
|
||||
{devmail}. Bug reports and suggestions for new features, improvements
|
||||
to the _WSJT-X_ User Guide, etc., may also be sent to the
|
||||
{wsjt_yahoo_group} email reflector. You must join the relevant group
|
||||
before posting to either email list.
|
||||
@@ -0,0 +1,55 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko Jarvi
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_LESS_EQUAL_05052005_0432)
|
||||
#define FUSION_LESS_EQUAL_05052005_0432
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||
#include <boost/fusion/sequence/comparison/enable_comparison.hpp>
|
||||
|
||||
#if defined(FUSION_DIRECT_OPERATOR_USAGE)
|
||||
#include <boost/fusion/sequence/comparison/detail/less_equal.hpp>
|
||||
#else
|
||||
#include <boost/fusion/sequence/comparison/less.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
template <typename Seq1, typename Seq2>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline bool
|
||||
less_equal(Seq1 const& a, Seq2 const& b)
|
||||
{
|
||||
#if defined(FUSION_DIRECT_OPERATOR_USAGE)
|
||||
return detail::sequence_less_equal<Seq1 const, Seq2 const>::
|
||||
call(fusion::begin(a), fusion::begin(b));
|
||||
#else
|
||||
return !(b < a);
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace operators
|
||||
{
|
||||
template <typename Seq1, typename Seq2>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename
|
||||
boost::enable_if<
|
||||
traits::enable_comparison<Seq1, Seq2>
|
||||
, bool
|
||||
>::type
|
||||
operator<=(Seq1 const& a, Seq2 const& b)
|
||||
{
|
||||
return fusion::less_equal(a, b);
|
||||
}
|
||||
}
|
||||
using operators::operator<=;
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,51 @@
|
||||
/* boost random/shuffle_output.hpp header file
|
||||
*
|
||||
* Copyright Jens Maurer 2000-2001
|
||||
* Distributed under the Boost Software License, Version 1.0. (See
|
||||
* accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
* See http://www.boost.org for most recent version including documentation.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Revision history
|
||||
* 2001-02-18 moved to individual header files
|
||||
*/
|
||||
|
||||
#ifndef BOOST_RANDOM_SHUFFLE_OUTPUT_HPP
|
||||
#define BOOST_RANDOM_SHUFFLE_OUTPUT_HPP
|
||||
|
||||
#include <boost/random/shuffle_order.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace random {
|
||||
|
||||
/// \cond
|
||||
|
||||
template<typename URNG, int k,
|
||||
typename URNG::result_type val = 0>
|
||||
class shuffle_output : public shuffle_order_engine<URNG, k>
|
||||
{
|
||||
typedef shuffle_order_engine<URNG, k> base_t;
|
||||
public:
|
||||
typedef typename base_t::result_type result_type;
|
||||
shuffle_output() {}
|
||||
template<class T>
|
||||
explicit shuffle_output(T& arg) : base_t(arg) {}
|
||||
template<class T>
|
||||
explicit shuffle_output(const T& arg) : base_t(arg) {}
|
||||
template<class It>
|
||||
shuffle_output(It& first, It last) : base_t(first, last) {}
|
||||
result_type min BOOST_PREVENT_MACRO_SUBSTITUTION ()
|
||||
{ return (this->base().min)(); }
|
||||
result_type max BOOST_PREVENT_MACRO_SUBSTITUTION ()
|
||||
{ return (this->base().max)(); }
|
||||
};
|
||||
|
||||
/// \endcond
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BOOST_RANDOM_SHUFFLE_OUTPUT_HPP
|
||||
@@ -0,0 +1,77 @@
|
||||
subroutine addit(itone,nfsample,nsym,nsps,ifreq,sig,dat)
|
||||
|
||||
integer itone(nsym)
|
||||
real dat(60*12000)
|
||||
real*8 f,dt,twopi,phi,dphi,baud,fsample,freq,tsym,t
|
||||
|
||||
tsym=nsps*1.d0/nfsample !Symbol duration
|
||||
baud=1.d0/tsym
|
||||
fsample=12000.d0 !Sample rate (Hz)
|
||||
dt=1.d0/fsample !Sample interval (s)
|
||||
twopi=8.d0*atan(1.d0)
|
||||
|
||||
f=ifreq
|
||||
phi=0.
|
||||
k=12000 !Start audio at t = 1.0 s
|
||||
ntot=nsym*tsym/dt
|
||||
t=0.
|
||||
isym0=-1
|
||||
do i=1,ntot
|
||||
t=t+dt
|
||||
isym=nint(t/tsym) + 1
|
||||
if(isym.ne.isym0) then
|
||||
freq=f + itone(isym)*baud
|
||||
dphi=twopi*freq*dt
|
||||
isym0=isym
|
||||
endif
|
||||
phi=phi + dphi
|
||||
if(phi.gt.twopi) phi=phi-twopi
|
||||
xphi=phi
|
||||
k=k+1
|
||||
dat(k)=dat(k) + sig*sin(xphi)
|
||||
enddo
|
||||
|
||||
return
|
||||
end subroutine addit
|
||||
|
||||
subroutine addcw(icw,ncw,ifreq,sig,dat)
|
||||
|
||||
integer icw(ncw)
|
||||
real dat(60*12000)
|
||||
real s(60*12000)
|
||||
real x(60*12000)
|
||||
real y(60*12000)
|
||||
real*8 dt,twopi,phi,dphi,fsample,tdit,t
|
||||
|
||||
wpm=25.0
|
||||
nspd=nint(1.2*12000.0/wpm)
|
||||
fsample=12000.d0 !Sample rate (Hz)
|
||||
dt=1.d0/fsample !Sample interval (s)
|
||||
tdit=nspd*dt
|
||||
twopi=8.d0*atan(1.d0)
|
||||
dphi=twopi*ifreq*dt
|
||||
phi=0.
|
||||
k=12000 !Start audio at t = 1.0 s
|
||||
t=0.
|
||||
npts=60*12000
|
||||
x=0.
|
||||
do i=1,npts
|
||||
t=t+dt
|
||||
j=nint(t/tdit) + 1
|
||||
j=mod(j-1,ncw) + 1
|
||||
phi=phi + dphi
|
||||
if(phi.gt.twopi) phi=phi-twopi
|
||||
xphi=phi
|
||||
k=k+1
|
||||
x(k)=icw(j)
|
||||
s(k)=sin(xphi)
|
||||
if(t.ge.59.5) exit
|
||||
enddo
|
||||
|
||||
nadd=0.004/dt
|
||||
call smo(x,npts,y,nadd)
|
||||
y=y/nadd
|
||||
dat=dat + sig*y*s
|
||||
|
||||
return
|
||||
end subroutine addcw
|
||||
@@ -0,0 +1,46 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2011 Eric Niebler
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_REVERSE_CONS_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_REVERSE_CONS_HPP_INCLUDED
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/container/list/cons_fwd.hpp>
|
||||
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
template<typename Cons, typename State = nil_>
|
||||
struct reverse_cons;
|
||||
|
||||
template<typename Car, typename Cdr, typename State>
|
||||
struct reverse_cons<cons<Car, Cdr>, State>
|
||||
{
|
||||
typedef reverse_cons<Cdr, cons<Car, State> > impl;
|
||||
typedef typename impl::type type;
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type call(cons<Car, Cdr> const &cons, State const &state = State())
|
||||
{
|
||||
typedef fusion::cons<Car, State> cdr_type;
|
||||
return impl::call(cons.cdr, cdr_type(cons.car, state));
|
||||
}
|
||||
};
|
||||
|
||||
template<typename State>
|
||||
struct reverse_cons<nil_, State>
|
||||
{
|
||||
typedef State type;
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static State const &call(nil_ const &, State const &state = State())
|
||||
{
|
||||
return state;
|
||||
}
|
||||
};
|
||||
}}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,33 @@
|
||||
#ifndef MESSAGEAVERAGING_H
|
||||
#define MESSAGEAVERAGING_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class QSettings;
|
||||
class QFont;
|
||||
|
||||
namespace Ui {
|
||||
class MessageAveraging;
|
||||
}
|
||||
|
||||
class MessageAveraging : public QWidget
|
||||
{
|
||||
public:
|
||||
explicit MessageAveraging(QSettings *, QFont const&, QWidget * parent = 0);
|
||||
~MessageAveraging();
|
||||
void displayAvg(QString const&);
|
||||
void changeFont (QFont const&);
|
||||
|
||||
protected:
|
||||
void closeEvent (QCloseEvent *) override;
|
||||
|
||||
private:
|
||||
void read_settings ();
|
||||
void write_settings ();
|
||||
void setContentFont (QFont const&);
|
||||
QSettings * settings_;
|
||||
|
||||
QScopedPointer<Ui::MessageAveraging> ui;
|
||||
};
|
||||
|
||||
#endif // MESSAGEAVERAGING_H
|
||||
@@ -0,0 +1,29 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009 Christopher Schmidt
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_KEY_OF_IMPL_HPP
|
||||
#define BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_KEY_OF_IMPL_HPP
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/iterator/key_of.hpp>
|
||||
|
||||
namespace boost { namespace fusion { namespace extension
|
||||
{
|
||||
template <typename>
|
||||
struct key_of_impl;
|
||||
|
||||
template <>
|
||||
struct key_of_impl<filter_view_iterator_tag>
|
||||
{
|
||||
template <typename It>
|
||||
struct apply
|
||||
: result_of::key_of<typename It::first_type>
|
||||
{};
|
||||
};
|
||||
}}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,191 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct void_;
|
||||
namespace result_of
|
||||
{
|
||||
template <
|
||||
typename T0 = void_ , typename T1 = void_ , typename T2 = void_ , typename T3 = void_ , typename T4 = void_ , typename T5 = void_ , typename T6 = void_ , typename T7 = void_ , typename T8 = void_ , typename T9 = void_
|
||||
, typename Extra = void_
|
||||
>
|
||||
struct make_deque;
|
||||
template <>
|
||||
struct make_deque<>
|
||||
{
|
||||
typedef deque<> type;
|
||||
};
|
||||
}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<>
|
||||
make_deque()
|
||||
{
|
||||
return deque<>();
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template <typename T0>
|
||||
struct make_deque< T0 , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type>
|
||||
make_deque(T0 const& arg0)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type>(
|
||||
arg0);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template <typename T0 , typename T1>
|
||||
struct make_deque< T0 , T1 , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type>(
|
||||
arg0 , arg1);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template <typename T0 , typename T1 , typename T2>
|
||||
struct make_deque< T0 , T1 , T2 , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type>(
|
||||
arg0 , arg1 , arg2);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , void_ , void_ , void_ , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type>(
|
||||
arg0 , arg1 , arg2 , arg3);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , T4 , void_ , void_ , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , T4 , T5 , void_ , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , T4 , T5 , T6 , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9);
|
||||
}
|
||||
}}
|
||||
@@ -0,0 +1,28 @@
|
||||
// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
|
||||
// Use, modification, and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See library home page at http://www.boost.org/libs/numeric/conversion
|
||||
//
|
||||
// Contact the author at: fernando_cacciola@hotmail.com
|
||||
//
|
||||
#ifndef BOOST_NUMERIC_CONVERSION_UDT_BUILTIN_MIXTURE_FLC_12NOV2002_HPP
|
||||
#define BOOST_NUMERIC_CONVERSION_UDT_BUILTIN_MIXTURE_FLC_12NOV2002_HPP
|
||||
|
||||
#include "boost/numeric/conversion/detail/udt_builtin_mixture.hpp"
|
||||
|
||||
namespace boost { namespace numeric
|
||||
{
|
||||
|
||||
template<class T, class S>
|
||||
struct udt_builtin_mixture
|
||||
: convdetail::get_udt_builtin_mixture< BOOST_DEDUCED_TYPENAME remove_cv<T>::type
|
||||
,BOOST_DEDUCED_TYPENAME remove_cv<S>::type
|
||||
>::type {} ;
|
||||
|
||||
} } // namespace boost::numeric
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
// Copyright 2002 The Trustees of Indiana University.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// Boost.MultiArray Library
|
||||
// Authors: Ronald Garcia
|
||||
// Jeremy Siek
|
||||
// Andrew Lumsdaine
|
||||
// See http://www.boost.org/libs/multi_array for documentation.
|
||||
|
||||
#ifndef COLLECTION_CONCEPT_RG103101_HPP
|
||||
#define COLLECTION_CONCEPT_RG103101_HPP
|
||||
|
||||
#include "boost/concept_check.hpp"
|
||||
|
||||
namespace boost {
|
||||
namespace detail {
|
||||
namespace multi_array { // Old location for this
|
||||
using boost::CollectionConcept;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endif // COLLECTION_CONCEPT_RG103101_HPP
|
||||
@@ -0,0 +1,30 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/preprocessor/seq/subseq.hpp>
|
||||
#include <boost/preprocessor/repetition/repeat.hpp>
|
||||
#include <boost/preprocessor/arithmetic/add.hpp>
|
||||
|
||||
#define BOOST_MPL_PP_RANGE_ITEM(z,n,_) (n)
|
||||
|
||||
#define BOOST_MPL_PP_RANGE(first, length) \
|
||||
BOOST_PP_SEQ_SUBSEQ( \
|
||||
BOOST_PP_REPEAT(BOOST_PP_ADD(first,length), BOOST_MPL_PP_RANGE_ITEM, _), \
|
||||
first, length \
|
||||
) \
|
||||
/**/
|
||||
|
||||
#endif // BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED
|
||||
@@ -0,0 +1,34 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_CLEAR_09172005_1127)
|
||||
#define FUSION_CLEAR_09172005_1127
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/container/vector/vector10.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct clear
|
||||
{
|
||||
typedef vector0<> type;
|
||||
};
|
||||
}
|
||||
|
||||
template <typename Sequence>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::clear<Sequence const>::type
|
||||
clear(Sequence const& /*seq*/)
|
||||
{
|
||||
return vector0<>();
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
SNR Files Sync BM FT Hint Total False BadSync
|
||||
--------------------------------------------------------
|
||||
-18.0 1000 998 973 998 998 998 0 2
|
||||
-18.5 1000 1000 960 1000 1000 1000 0 0
|
||||
-19.0 1000 1000 917 1000 1000 1000 0 0
|
||||
-19.5 1000 1000 849 1000 1000 1000 0 0
|
||||
-20.0 1000 1000 725 1000 1000 1000 0 0
|
||||
-20.5 1000 1000 549 1000 1000 1000 0 0
|
||||
-21.0 1000 1000 373 1000 1000 1000 0 0
|
||||
-21.5 1000 1000 216 1000 1000 1000 0 0
|
||||
-22.0 1000 1000 100 998 1000 1000 0 0
|
||||
-22.5 1000 1000 32 998 1000 1000 0 0
|
||||
-23.0 1000 1000 12 991 1000 1000 0 0
|
||||
-23.5 1000 998 2 958 1000 1000 0 2
|
||||
-24.0 1000 992 0 878 998 998 1 8
|
||||
-24.5 1000 986 0 739 995 995 0 14
|
||||
-25.0 1000 977 0 533 991 991 0 23
|
||||
-25.5 1000 959 0 324 975 975 3 41
|
||||
-26.0 1000 930 0 153 953 953 1 70
|
||||
-26.5 1000 874 0 51 924 924 8 126
|
||||
-27.0 1000 808 0 14 866 866 6 192
|
||||
-27.5 1000 716 0 3 799 799 10 284
|
||||
-28.0 1000 610 0 1 689 689 14 390
|
||||
-28.5 1000 497 0 0 596 596 19 503
|
||||
-29.0 1000 399 0 0 451 451 21 601
|
||||
-29.5 1000 300 0 0 270 270 27 700
|
||||
-30.0 1000 243 0 0 172 172 26 757
|
||||
@@ -0,0 +1,227 @@
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0
|
||||
// See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
//
|
||||
// See http://boostorg.github.com/compute for more information.
|
||||
//---------------------------------------------------------------------------//
|
||||
|
||||
#ifndef BOOST_COMPUTE_BUFFER_HPP
|
||||
#define BOOST_COMPUTE_BUFFER_HPP
|
||||
|
||||
#include <boost/compute/config.hpp>
|
||||
#include <boost/compute/context.hpp>
|
||||
#include <boost/compute/exception.hpp>
|
||||
#include <boost/compute/memory_object.hpp>
|
||||
#include <boost/compute/detail/get_object_info.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace compute {
|
||||
|
||||
// forward declarations
|
||||
class command_queue;
|
||||
|
||||
/// \class buffer
|
||||
/// \brief A memory buffer on a compute device.
|
||||
///
|
||||
/// The buffer class represents a memory buffer on a compute device.
|
||||
///
|
||||
/// Buffers are allocated within a compute context. For example, to allocate
|
||||
/// a memory buffer for 32 float's:
|
||||
///
|
||||
/// \snippet test/test_buffer.cpp constructor
|
||||
///
|
||||
/// Once created, data can be copied to and from the buffer using the
|
||||
/// \c enqueue_*_buffer() methods in the command_queue class. For example, to
|
||||
/// copy a set of \c int values from the host to the device:
|
||||
/// \code
|
||||
/// int data[] = { 1, 2, 3, 4 };
|
||||
///
|
||||
/// queue.enqueue_write_buffer(buf, 0, 4 * sizeof(int), data);
|
||||
/// \endcode
|
||||
///
|
||||
/// Also see the copy() algorithm for a higher-level interface to copying data
|
||||
/// between the host and the device. For a higher-level, dynamically-resizable,
|
||||
/// type-safe container for data on a compute device, use the vector<T> class.
|
||||
///
|
||||
/// Buffer objects have reference semantics. Creating a copy of a buffer
|
||||
/// object simply creates another reference to the underlying OpenCL memory
|
||||
/// object. To create an actual copy use the buffer::clone() method.
|
||||
///
|
||||
/// \see context, command_queue
|
||||
class buffer : public memory_object
|
||||
{
|
||||
public:
|
||||
/// Creates a null buffer object.
|
||||
buffer()
|
||||
: memory_object()
|
||||
{
|
||||
}
|
||||
|
||||
/// Creates a buffer object for \p mem. If \p retain is \c true, the
|
||||
/// reference count for \p mem will be incremented.
|
||||
explicit buffer(cl_mem mem, bool retain = true)
|
||||
: memory_object(mem, retain)
|
||||
{
|
||||
}
|
||||
|
||||
/// Create a new memory buffer in of \p size with \p flags in
|
||||
/// \p context.
|
||||
///
|
||||
/// \see_opencl_ref{clCreateBuffer}
|
||||
buffer(const context &context,
|
||||
size_t size,
|
||||
cl_mem_flags flags = read_write,
|
||||
void *host_ptr = 0)
|
||||
{
|
||||
cl_int error = 0;
|
||||
m_mem = clCreateBuffer(context,
|
||||
flags,
|
||||
(std::max)(size, size_t(1)),
|
||||
host_ptr,
|
||||
&error);
|
||||
if(!m_mem){
|
||||
BOOST_THROW_EXCEPTION(opencl_error(error));
|
||||
}
|
||||
}
|
||||
|
||||
/// Creates a new buffer object as a copy of \p other.
|
||||
buffer(const buffer &other)
|
||||
: memory_object(other)
|
||||
{
|
||||
}
|
||||
|
||||
/// Copies the buffer object from \p other to \c *this.
|
||||
buffer& operator=(const buffer &other)
|
||||
{
|
||||
if(this != &other){
|
||||
memory_object::operator=(other);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifndef BOOST_COMPUTE_NO_RVALUE_REFERENCES
|
||||
/// Move-constructs a new buffer object from \p other.
|
||||
buffer(buffer&& other) BOOST_NOEXCEPT
|
||||
: memory_object(std::move(other))
|
||||
{
|
||||
}
|
||||
|
||||
/// Move-assigns the buffer from \p other to \c *this.
|
||||
buffer& operator=(buffer&& other) BOOST_NOEXCEPT
|
||||
{
|
||||
memory_object::operator=(std::move(other));
|
||||
|
||||
return *this;
|
||||
}
|
||||
#endif // BOOST_COMPUTE_NO_RVALUE_REFERENCES
|
||||
|
||||
/// Destroys the buffer object.
|
||||
~buffer()
|
||||
{
|
||||
}
|
||||
|
||||
/// Returns the size of the buffer in bytes.
|
||||
size_t size() const
|
||||
{
|
||||
return get_memory_size();
|
||||
}
|
||||
|
||||
/// \internal_
|
||||
size_t max_size() const
|
||||
{
|
||||
return get_context().get_device().max_memory_alloc_size();
|
||||
}
|
||||
|
||||
/// Returns information about the buffer.
|
||||
///
|
||||
/// \see_opencl_ref{clGetMemObjectInfo}
|
||||
template<class T>
|
||||
T get_info(cl_mem_info info) const
|
||||
{
|
||||
return get_memory_info<T>(info);
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<int Enum>
|
||||
typename detail::get_object_info_type<buffer, Enum>::type
|
||||
get_info() const;
|
||||
|
||||
/// Creates a new buffer with a copy of the data in \c *this. Uses
|
||||
/// \p queue to perform the copy.
|
||||
buffer clone(command_queue &queue) const;
|
||||
|
||||
#if defined(CL_VERSION_1_1) || defined(BOOST_COMPUTE_DOXYGEN_INVOKED)
|
||||
/// Creates a new buffer out of this buffer.
|
||||
/// The new buffer is a sub region of this buffer.
|
||||
/// \p flags The mem_flags which should be used to create the new buffer
|
||||
/// \p origin The start index in this buffer
|
||||
/// \p size The size of the new sub buffer
|
||||
///
|
||||
/// \see_opencl_ref{clCreateSubBuffer}
|
||||
///
|
||||
/// \opencl_version_warning{1,1}
|
||||
buffer create_subbuffer(cl_mem_flags flags, size_t origin,
|
||||
size_t size)
|
||||
{
|
||||
BOOST_ASSERT(origin + size <= this->size());
|
||||
BOOST_ASSERT(origin % (get_context().
|
||||
get_device().
|
||||
get_info<CL_DEVICE_MEM_BASE_ADDR_ALIGN>() / 8) == 0);
|
||||
cl_int error = 0;
|
||||
|
||||
cl_buffer_region region = { origin, size };
|
||||
|
||||
cl_mem mem = clCreateSubBuffer(m_mem,
|
||||
flags,
|
||||
CL_BUFFER_CREATE_TYPE_REGION,
|
||||
®ion,
|
||||
&error);
|
||||
|
||||
if(!mem){
|
||||
BOOST_THROW_EXCEPTION(opencl_error(error));
|
||||
}
|
||||
|
||||
return buffer(mem, false);
|
||||
}
|
||||
#endif // CL_VERSION_1_1
|
||||
};
|
||||
|
||||
/// \internal_ define get_info() specializations for buffer
|
||||
BOOST_COMPUTE_DETAIL_DEFINE_GET_INFO_SPECIALIZATIONS(buffer,
|
||||
((cl_mem_object_type, CL_MEM_TYPE))
|
||||
((cl_mem_flags, CL_MEM_FLAGS))
|
||||
((size_t, CL_MEM_SIZE))
|
||||
((void *, CL_MEM_HOST_PTR))
|
||||
((cl_uint, CL_MEM_MAP_COUNT))
|
||||
((cl_uint, CL_MEM_REFERENCE_COUNT))
|
||||
((cl_context, CL_MEM_CONTEXT))
|
||||
)
|
||||
|
||||
#ifdef CL_VERSION_1_1
|
||||
BOOST_COMPUTE_DETAIL_DEFINE_GET_INFO_SPECIALIZATIONS(buffer,
|
||||
((cl_mem, CL_MEM_ASSOCIATED_MEMOBJECT))
|
||||
((size_t, CL_MEM_OFFSET))
|
||||
)
|
||||
#endif // CL_VERSION_1_1
|
||||
|
||||
namespace detail {
|
||||
|
||||
// set_kernel_arg specialization for buffer
|
||||
template<>
|
||||
struct set_kernel_arg<buffer>
|
||||
{
|
||||
void operator()(kernel &kernel_, size_t index, const buffer &buffer_)
|
||||
{
|
||||
kernel_.set_arg(index, buffer_.get());
|
||||
}
|
||||
};
|
||||
|
||||
} // end detail namespace
|
||||
} // end compute namespace
|
||||
} // end boost namespace
|
||||
|
||||
#endif // BOOST_COMPUTE_BUFFER_HPP
|
||||
@@ -0,0 +1,70 @@
|
||||
#ifndef DATE_TIME_GREGORIAN_CALENDAR_HPP__
|
||||
#define DATE_TIME_GREGORIAN_CALENDAR_HPP__
|
||||
|
||||
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
|
||||
* Use, modification and distribution is subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying
|
||||
* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
* Author: Jeff Garland
|
||||
* $Date$
|
||||
*/
|
||||
|
||||
|
||||
namespace boost {
|
||||
namespace date_time {
|
||||
|
||||
|
||||
//! An implementation of the Gregorian calendar
|
||||
/*! This is a parameterized implementation of a proleptic Gregorian Calendar that
|
||||
can be used in the creation of date systems or just to perform calculations.
|
||||
All the methods of this class are static functions, so the intent is to
|
||||
never create instances of this class.
|
||||
@param ymd_type_ Struct type representing the year, month, day. The ymd_type must
|
||||
define a of types for the year, month, and day. These types need to be
|
||||
arithmetic types.
|
||||
@param date_int_type_ Underlying type for the date count. Must be an arithmetic type.
|
||||
*/
|
||||
template<typename ymd_type_, typename date_int_type_>
|
||||
class gregorian_calendar_base {
|
||||
public:
|
||||
//! define a type a date split into components
|
||||
typedef ymd_type_ ymd_type;
|
||||
//! define a type for representing months
|
||||
typedef typename ymd_type::month_type month_type;
|
||||
//! define a type for representing days
|
||||
typedef typename ymd_type::day_type day_type;
|
||||
//! Type to hold a stand alone year value (eg: 2002)
|
||||
typedef typename ymd_type::year_type year_type;
|
||||
//! Define the integer type to use for internal calculations
|
||||
typedef date_int_type_ date_int_type;
|
||||
|
||||
|
||||
static unsigned short day_of_week(const ymd_type& ymd);
|
||||
static int week_number(const ymd_type&ymd);
|
||||
//static unsigned short day_of_year(date_int_type);
|
||||
static date_int_type day_number(const ymd_type& ymd);
|
||||
static date_int_type julian_day_number(const ymd_type& ymd);
|
||||
static date_int_type modjulian_day_number(const ymd_type& ymd);
|
||||
static ymd_type from_day_number(date_int_type);
|
||||
static ymd_type from_julian_day_number(date_int_type);
|
||||
static ymd_type from_modjulian_day_number(date_int_type);
|
||||
static bool is_leap_year(year_type);
|
||||
static unsigned short end_of_month_day(year_type y, month_type m);
|
||||
static ymd_type epoch();
|
||||
static unsigned short days_in_week();
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
} } //namespace
|
||||
|
||||
#ifndef NO_BOOST_DATE_TIME_INLINE
|
||||
#include "boost/date_time/gregorian_calendar.ipp"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2003-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& ( BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|
||||
|| BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|
||||
)
|
||||
|
||||
# define BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED
|
||||
@@ -0,0 +1,145 @@
|
||||
program fsk4hf
|
||||
|
||||
! Simulate characteristics of a potential mode using LDPC (168,84) code,
|
||||
! 4-FSK modulation, and 30 s T/R sequences.
|
||||
|
||||
parameter (KK=84) !Information bits (72 + CRC12)
|
||||
parameter (ND=84) !Data symbols: LDPC (168,84), r=1/2
|
||||
parameter (NS=12) !Sync symbols (3 @ 4x4 Costas arrays)
|
||||
parameter (NR=2) !Ramp up/down
|
||||
parameter (NN=NR+NS+ND) !Total symbols (98)
|
||||
parameter (NSPS=2688/84) !Samples per symbol (32)
|
||||
parameter (NZ=NSPS*NN) !Samples in baseband waveform (3760)
|
||||
|
||||
character*8 arg
|
||||
complex c0(0:NZ-1) !Complex waveform
|
||||
complex c(0:NZ-1) !Complex waveform
|
||||
real xnoise(0:NZ-1) !Generated random noise
|
||||
real ynoise(0:NZ-1) !Generated random noise
|
||||
real rxdata(2*ND),llr(2*ND) !Soft symbols
|
||||
real s(0:NSPS,NN)
|
||||
real savg(0:NSPS)
|
||||
real ps(0:3)
|
||||
integer id(ND) !Symbol values (0-3), data only
|
||||
integer id1(ND) !Recovered data values
|
||||
integer*1 msgbits(KK),decoded(KK),apmask(ND),cw(ND)
|
||||
data msgbits/0,0,1,0,0,1,1,1,1,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,1,1,0,0,0,1, &
|
||||
1,1,1,0,1,1,1,1,1,1,1,0,0,1,0,0,1,1,0,1,0,1,1,1,0,1,1,0,1,1, &
|
||||
1,1,0,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,1,0/
|
||||
|
||||
nargs=iargc()
|
||||
if(nargs.ne.5) then
|
||||
print*,'Usage: fsk4hf f0(Hz) delay(ms) fspread(Hz) iters snr(dB)'
|
||||
print*,'Example: fsk4hf 20 0 0 10 -20'
|
||||
print*,'Set snr=0 to cycle through a range'
|
||||
go to 999
|
||||
endif
|
||||
call getarg(1,arg)
|
||||
read(arg,*) f0 !Generated carrier frequency
|
||||
call getarg(2,arg)
|
||||
read(arg,*) delay !Delta_t (ms) for Watterson model
|
||||
call getarg(3,arg)
|
||||
read(arg,*) fspread !Fspread (Hz) for Watterson model
|
||||
call getarg(4,arg)
|
||||
read(arg,*) iters !Iterations at each SNR
|
||||
call getarg(5,arg)
|
||||
read(arg,*) snrdb !Specified SNR_2500
|
||||
|
||||
twopi=8.0*atan(1.0)
|
||||
fs=12000.0/84.0 !Sample rate = 142.857... Hz
|
||||
dt=1.0/fs !Sample interval (s)
|
||||
tt=NSPS*dt !Duration of "itone" symbols (s)
|
||||
baud=1.0/tt !Keying rate for "itone" symbols (baud)
|
||||
txt=NZ*dt !Transmission length (s)
|
||||
bandwidth_ratio=2500.0/(fs/2.0)
|
||||
write(*,1000) f0,delay,fspread,iters,baud,4*baud,txt
|
||||
1000 format('f0:',f5.1,' Delay:',f4.1,' fSpread:',f5.2, &
|
||||
' Iters:',i6/'Baud:',f7.3,' BW:',f5.1,' TxT:',f5.1,f5.2/)
|
||||
write(*,1004)
|
||||
1004 format(/' SNR sym bit ser ber fer fsigma'/50('-'))
|
||||
|
||||
call genfsk4hf(msgbits,f0,id,c0) !Generate baseband waveform
|
||||
isna=-10
|
||||
isnb=-30
|
||||
if(snrdb.ne.0.0) then
|
||||
isna=nint(snrdb)
|
||||
isnb=isna
|
||||
endif
|
||||
do isnr=isna,isnb,-1 !Loop over SNR range
|
||||
snrdb=isnr
|
||||
sig=sqrt(bandwidth_ratio) * 10.0**(0.05*snrdb)
|
||||
if(snrdb.gt.90.0) sig=1.0
|
||||
nhard=0
|
||||
nbit=0
|
||||
nfe=0
|
||||
sqf=0.
|
||||
do iter=1,iters !Loop over requested iterations
|
||||
c=c0
|
||||
if(delay.ne.0.0 .or. fspread.ne.0.0) then
|
||||
call watterson(c,NZ,fs,delay,fspread)
|
||||
endif
|
||||
c=sig*c !Scale to requested SNR
|
||||
if(snrdb.lt.90) then
|
||||
do i=0,NZ-1 !Generate gaussian noise
|
||||
xnoise(i)=gran()
|
||||
ynoise(i)=gran()
|
||||
enddo
|
||||
c=c + cmplx(xnoise,ynoise) !Add AWGN noise
|
||||
endif
|
||||
df=fs/(2*NSPS)
|
||||
i0=nint(f0/df)
|
||||
call spec4(c,s,savg)
|
||||
do i=0,NSPS
|
||||
write(12,3001) i*df,savg(i),db(savg(i))
|
||||
3001 format(3f15.3)
|
||||
enddo
|
||||
|
||||
do j=1,ND
|
||||
nlo=0
|
||||
nhi=0
|
||||
k=j+5
|
||||
if(j.ge.43) k=j+9
|
||||
ps=s(i0:i0+6:2,k)
|
||||
ps=sqrt(ps) !###
|
||||
rlo=max(ps(1),ps(3))-max(ps(0),ps(2))
|
||||
rhi=max(ps(2),ps(3))-max(ps(0),ps(1))
|
||||
if(rlo.ge.0.0) nlo=1
|
||||
if(rhi.ge.0.0) nhi=1
|
||||
rxdata(2*j-1)=rhi
|
||||
rxdata(2*j)=rlo
|
||||
id1(j)=2*nhi+nlo
|
||||
enddo
|
||||
! write(*,1001) id(1:70)
|
||||
! write(*,1001) id1(1:70)
|
||||
!1001 format(70i1)
|
||||
nhard=nhard+count(id.ne.id1)
|
||||
nbit=nbit + count(iand(id,1).ne.iand(id1,1)) + &
|
||||
count(iand(id,2).ne.iand(id1,2))
|
||||
|
||||
rxav=sum(rxdata)/ND
|
||||
rx2av=sum(rxdata*rxdata)/ND
|
||||
rxsig=sqrt(rx2av-rxav*rxav)
|
||||
rxdata=rxdata/rxsig
|
||||
ss=0.84
|
||||
llr=2.0*rxdata/(ss*ss)
|
||||
apmask=0
|
||||
max_iterations=40
|
||||
ifer=0
|
||||
call bpdecode168(llr,apmask,max_iterations,decoded,niterations,cw)
|
||||
nbadcrc=0
|
||||
if(niterations.ge.0) call chkcrc12(decoded,nbadcrc)
|
||||
if(niterations.lt.0 .or. count(msgbits.ne.decoded).gt.0 .or. &
|
||||
nbadcrc.ne.0) ifer=1
|
||||
nfe=nfe+ifer
|
||||
enddo
|
||||
|
||||
fsigma=sqrt(sqf/iters)
|
||||
ser=float(nhard)/(ND*iters)
|
||||
ber=float(nbit)/(2*ND*iters)
|
||||
fer=float(nfe)/iters
|
||||
write(*,1050) snrdb,nhard,nbit,ser,ber,fer,fsigma
|
||||
! write(60,1050) snrdb,nhard,ber,fer,fsigma
|
||||
1050 format(f6.1,2i6,2f8.4,f7.3,f8.2)
|
||||
enddo
|
||||
|
||||
999 end program fsk4hf
|
||||
Reference in New Issue
Block a user