kopia lustrzana https://github.com/Hamlib/Hamlib
Update LGPL header in GNU Radio source files.
TNX to Lucian Laga, YO6PLB, for the notification.Hamlib-1.2.15
rodzic
2f5e5618ca
commit
93fa0698ec
|
@ -2,21 +2,20 @@
|
||||||
* Hamlib GNUradio backend - AM class
|
* Hamlib GNUradio backend - AM class
|
||||||
* Copyright (c) 2003 by Stephane Fillod
|
* Copyright (c) 2003 by Stephane Fillod
|
||||||
*
|
*
|
||||||
* $Id: am.h,v 1.2 2004-02-08 20:27:58 fillods Exp $
|
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or
|
||||||
* it under the terms of the GNU Library General Public License as
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* published by the Free Software Foundation; either version 2 of
|
* License as published by the Free Software Foundation; either
|
||||||
* the License, or (at your option) any later version.
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* GNU Library General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Library General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -33,8 +32,8 @@ class AMDemodChainCF : public DemodChainCF {
|
||||||
GrMagnitude<d_iType, d_oType> *a_demod;
|
GrMagnitude<d_iType, d_oType> *a_demod;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AMDemodChainCF (VrSource<d_iType> *src, VrSink<d_oType> *snk, rmode_t mode, pbwidth_t width, int input_rate, freq_t centerfreq = 0) :
|
AMDemodChainCF (VrSource<d_iType> *src, VrSink<d_oType> *snk, rmode_t mode, pbwidth_t width, int input_rate, freq_t centerfreq = 0) :
|
||||||
DemodChainCF(src, snk, mode, width, input_rate, centerfreq) {
|
DemodChainCF(src, snk, mode, width, input_rate, centerfreq) {
|
||||||
|
|
||||||
demod_in = demod_out = a_demod = new GrMagnitude<d_iType, d_oType>();
|
demod_in = demod_out = a_demod = new GrMagnitude<d_iType, d_oType>();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,21 +2,20 @@
|
||||||
* Hamlib GNUradio backend - Demodulator chain class
|
* Hamlib GNUradio backend - Demodulator chain class
|
||||||
* Copyright (c) 2003-2004 by Stephane Fillod
|
* Copyright (c) 2003-2004 by Stephane Fillod
|
||||||
*
|
*
|
||||||
* $Id: demod.h,v 1.3 2004-05-17 21:09:43 fillods Exp $
|
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or
|
||||||
* it under the terms of the GNU Library General Public License as
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* published by the Free Software Foundation; either version 2 of
|
* License as published by the Free Software Foundation; either
|
||||||
* the License, or (at your option) any later version.
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* GNU Library General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Library General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -44,7 +43,7 @@
|
||||||
|
|
||||||
class DemodChainCF {
|
class DemodChainCF {
|
||||||
public:
|
public:
|
||||||
DemodChainCF (VrSource<d_iType> *d_source, VrSink<d_oType> *d_sink, rmode_t mode, pbwidth_t width, int input_rate, freq_t centerfreq = 0) :
|
DemodChainCF (VrSource<d_iType> *d_source, VrSink<d_oType> *d_sink, rmode_t mode, pbwidth_t width, int input_rate, freq_t centerfreq = 0) :
|
||||||
d_source(d_source), d_sink(d_sink), mode(mode), width(width), input_rate(input_rate), centerfreq(centerfreq), rf_gain(1.0), if_width_of_transition_band(1000), CFIRdecimate(1), RFIRdecimate(1) {}
|
d_source(d_source), d_sink(d_sink), mode(mode), width(width), input_rate(input_rate), centerfreq(centerfreq), rf_gain(1.0), if_width_of_transition_band(1000), CFIRdecimate(1), RFIRdecimate(1) {}
|
||||||
virtual ~DemodChainCF () { delete agc; delete mixer; delete gainstage; delete audio_filter; }
|
virtual ~DemodChainCF () { delete agc; delete mixer; delete gainstage; delete audio_filter; }
|
||||||
|
|
||||||
|
|
|
@ -3,21 +3,20 @@
|
||||||
* Hamlib GNUradio backend - main file
|
* Hamlib GNUradio backend - main file
|
||||||
* Copyright (c) 2001-2004 by Stephane Fillod
|
* Copyright (c) 2001-2004 by Stephane Fillod
|
||||||
*
|
*
|
||||||
* $Id: gnuradio.cc,v 1.9 2004-05-17 21:09:43 fillods Exp $
|
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or
|
||||||
* it under the terms of the GNU Library General Public License as
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* published by the Free Software Foundation; either version 2 of
|
* License as published by the Free Software Foundation; either
|
||||||
* the License, or (at your option) any later version.
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* GNU Library General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Library General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -260,7 +259,7 @@ int gr_open(RIG *rig)
|
||||||
rig_open(priv->tuner);
|
rig_open(priv->tuner);
|
||||||
|
|
||||||
/* TODO:
|
/* TODO:
|
||||||
* copy priv->tuner->rx_range/tx_range to rig->state,
|
* copy priv->tuner->rx_range/tx_range to rig->state,
|
||||||
* and override available modes with gnuradio's
|
* and override available modes with gnuradio's
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -273,7 +272,7 @@ int gr_open(RIG *rig)
|
||||||
|
|
||||||
|
|
||||||
/* ** Source ** */
|
/* ** Source ** */
|
||||||
|
|
||||||
// --> short
|
// --> short
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -500,7 +499,7 @@ int gr_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
||||||
char fstr[20];
|
char fstr[20];
|
||||||
|
|
||||||
sprintf_freq(fstr, freq);
|
sprintf_freq(fstr, freq);
|
||||||
rig_debug(RIG_DEBUG_TRACE,"%s called: %s %s\n",
|
rig_debug(RIG_DEBUG_TRACE,"%s called: %s %s\n",
|
||||||
__FUNCTION__, rig_strvfo(vfo), fstr);
|
__FUNCTION__, rig_strvfo(vfo), fstr);
|
||||||
|
|
||||||
ret = rig_get_freq(priv->tuner, RIG_VFO_CURR, &tuner_freq);
|
ret = rig_get_freq(priv->tuner, RIG_VFO_CURR, &tuner_freq);
|
||||||
|
@ -510,7 +509,7 @@ int gr_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
||||||
/* check if we're out of current IF window
|
/* check if we're out of current IF window
|
||||||
* TODO: with several VFO's, center the IF inbetween if out of window
|
* TODO: with several VFO's, center the IF inbetween if out of window
|
||||||
*/
|
*/
|
||||||
if (freq < tuner_freq ||
|
if (freq < tuner_freq ||
|
||||||
freq /* + mode_width */ > tuner_freq+GR_MAX_FREQUENCY(priv)) {
|
freq /* + mode_width */ > tuner_freq+GR_MAX_FREQUENCY(priv)) {
|
||||||
/*
|
/*
|
||||||
* do not set tuner to freq, but center it
|
* do not set tuner to freq, but center it
|
||||||
|
@ -580,7 +579,7 @@ int gr_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
||||||
if (width == RIG_PASSBAND_NORMAL)
|
if (width == RIG_PASSBAND_NORMAL)
|
||||||
width = rig_passband_normal(rig, mode);
|
width = rig_passband_normal(rig, mode);
|
||||||
sprintf_freq(buf, width);
|
sprintf_freq(buf, width);
|
||||||
rig_debug(RIG_DEBUG_VERBOSE,"%s called: %s %s %s\n",
|
rig_debug(RIG_DEBUG_VERBOSE,"%s called: %s %s %s\n",
|
||||||
__FUNCTION__, rig_strvfo(vfo), rig_strrmode(mode), buf);
|
__FUNCTION__, rig_strvfo(vfo), rig_strrmode(mode), buf);
|
||||||
|
|
||||||
if (mode == chan->mode && width == chan->width)
|
if (mode == chan->mode && width == chan->width)
|
||||||
|
@ -737,7 +736,7 @@ int gnuradio_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
||||||
sprintf(lstr, "%f", val.f);
|
sprintf(lstr, "%f", val.f);
|
||||||
else
|
else
|
||||||
sprintf(lstr, "%d", val.i);
|
sprintf(lstr, "%d", val.i);
|
||||||
rig_debug(RIG_DEBUG_VERBOSE,"%s called: %s %s\n",__FUNCTION__,
|
rig_debug(RIG_DEBUG_VERBOSE,"%s called: %s %s\n",__FUNCTION__,
|
||||||
rig_strlevel(level), lstr);
|
rig_strlevel(level), lstr);
|
||||||
/* TODO: check val is in range */
|
/* TODO: check val is in range */
|
||||||
|
|
||||||
|
@ -771,7 +770,7 @@ int gnuradio_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
||||||
|
|
||||||
if (idx < RIG_SETTING_MAX)
|
if (idx < RIG_SETTING_MAX)
|
||||||
*val = chan->levels[idx];
|
*val = chan->levels[idx];
|
||||||
rig_debug(RIG_DEBUG_VERBOSE,"%s called: %s\n",__FUNCTION__,
|
rig_debug(RIG_DEBUG_VERBOSE,"%s called: %s\n",__FUNCTION__,
|
||||||
rig_strlevel(level));
|
rig_strlevel(level));
|
||||||
|
|
||||||
return RIG_OK;
|
return RIG_OK;
|
||||||
|
@ -843,7 +842,7 @@ int gnuradio_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
|
||||||
shortfreq_t ts;
|
shortfreq_t ts;
|
||||||
int ret = RIG_OK;
|
int ret = RIG_OK;
|
||||||
|
|
||||||
rig_debug(RIG_DEBUG_VERBOSE,"%s called: %s\n",__FUNCTION__,
|
rig_debug(RIG_DEBUG_VERBOSE,"%s called: %s\n",__FUNCTION__,
|
||||||
rig_strvfop(op));
|
rig_strvfop(op));
|
||||||
|
|
||||||
switch (op) {
|
switch (op) {
|
||||||
|
|
|
@ -2,21 +2,20 @@
|
||||||
* Hamlib GNUradio backend - main header
|
* Hamlib GNUradio backend - main header
|
||||||
* Copyright (c) 2001-2003 by Stephane Fillod
|
* Copyright (c) 2001-2003 by Stephane Fillod
|
||||||
*
|
*
|
||||||
* $Id: gnuradio.h,v 1.5 2003-09-28 15:59:27 fillods Exp $
|
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or
|
||||||
* it under the terms of the GNU Library General Public License as
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* published by the Free Software Foundation; either version 2 of
|
* License as published by the Free Software Foundation; either
|
||||||
* the License, or (at your option) any later version.
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* GNU Library General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Library General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -2,21 +2,20 @@
|
||||||
* Hamlib GNUradio backend - main file
|
* Hamlib GNUradio backend - main file
|
||||||
* Copyright (c) 2001-2003 by Stephane Fillod
|
* Copyright (c) 2001-2003 by Stephane Fillod
|
||||||
*
|
*
|
||||||
* $Id: gr.c,v 1.5 2003-10-01 19:31:55 fillods Exp $
|
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or
|
||||||
* it under the terms of the GNU Library General Public License as
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* published by the Free Software Foundation; either version 2 of
|
* License as published by the Free Software Foundation; either
|
||||||
* the License, or (at your option) any later version.
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* GNU Library General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Library General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -2,21 +2,20 @@
|
||||||
* Hamlib GNUradio backend - gnuradio priv structure
|
* Hamlib GNUradio backend - gnuradio priv structure
|
||||||
* Copyright (c) 2001-2003 by Stephane Fillod
|
* Copyright (c) 2001-2003 by Stephane Fillod
|
||||||
*
|
*
|
||||||
* $Id: gr_priv.h,v 1.7 2004-02-08 20:27:58 fillods Exp $
|
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or
|
||||||
* it under the terms of the GNU Library General Public License as
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* published by the Free Software Foundation; either version 2 of
|
* License as published by the Free Software Foundation; either
|
||||||
* the License, or (at your option) any later version.
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* GNU Library General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Library General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -2,21 +2,20 @@
|
||||||
* Hamlib GNUradio backend - graudio/any rig
|
* Hamlib GNUradio backend - graudio/any rig
|
||||||
* Copyright (c) 2001-2003 by Stephane Fillod
|
* Copyright (c) 2001-2003 by Stephane Fillod
|
||||||
*
|
*
|
||||||
* $Id: graudio.c,v 1.7 2008-10-26 13:37:10 y32kn Exp $
|
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or
|
||||||
* it under the terms of the GNU Library General Public License as
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* published by the Free Software Foundation; either version 2 of
|
* License as published by the Free Software Foundation; either
|
||||||
* the License, or (at your option) any later version.
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* GNU Library General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Library General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -2,21 +2,20 @@
|
||||||
* Hamlib GNUradio backend - MC4020/eb4937
|
* Hamlib GNUradio backend - MC4020/eb4937
|
||||||
* Copyright (c) 2001-2003 by Stephane Fillod
|
* Copyright (c) 2001-2003 by Stephane Fillod
|
||||||
*
|
*
|
||||||
* $Id: mc4020.c,v 1.3 2003-10-01 19:31:56 fillods Exp $
|
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or
|
||||||
* it under the terms of the GNU Library General Public License as
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* published by the Free Software Foundation; either version 2 of
|
* License as published by the Free Software Foundation; either
|
||||||
* the License, or (at your option) any later version.
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* GNU Library General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Library General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -2,21 +2,20 @@
|
||||||
* Hamlib GNUradio backend - Narrow FM class
|
* Hamlib GNUradio backend - Narrow FM class
|
||||||
* Copyright (c) 2003 by Stephane Fillod
|
* Copyright (c) 2003 by Stephane Fillod
|
||||||
*
|
*
|
||||||
* $Id: nfm.h,v 1.2 2004-02-08 20:27:58 fillods Exp $
|
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or
|
||||||
* it under the terms of the GNU Library General Public License as
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* published by the Free Software Foundation; either version 2 of
|
* License as published by the Free Software Foundation; either
|
||||||
* the License, or (at your option) any later version.
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* GNU Library General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Library General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -33,8 +32,8 @@ class FMDemodChainCF : public DemodChainCF {
|
||||||
VrQuadratureDemod<d_oType> *q_demod;
|
VrQuadratureDemod<d_oType> *q_demod;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FMDemodChainCF (VrSource<d_iType> *src, VrSink<d_oType> *snk, rmode_t mode, pbwidth_t width, int input_rate, freq_t centerfreq = 0) :
|
FMDemodChainCF (VrSource<d_iType> *src, VrSink<d_oType> *snk, rmode_t mode, pbwidth_t width, int input_rate, freq_t centerfreq = 0) :
|
||||||
DemodChainCF(src, snk, mode, width, input_rate, centerfreq) {
|
DemodChainCF(src, snk, mode, width, input_rate, centerfreq) {
|
||||||
|
|
||||||
demod_in = demod_out = q_demod = new VrQuadratureDemod<d_oType>(1.0);
|
demod_in = demod_out = q_demod = new VrQuadratureDemod<d_oType>(1.0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,21 +2,20 @@
|
||||||
* Hamlib GNUradio backend - SSB class
|
* Hamlib GNUradio backend - SSB class
|
||||||
* Copyright (c) 2003 by Stephane Fillod
|
* Copyright (c) 2003 by Stephane Fillod
|
||||||
*
|
*
|
||||||
* $Id: ssb.h,v 1.2 2004-02-08 20:27:58 fillods Exp $
|
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or
|
||||||
* it under the terms of the GNU Library General Public License as
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* published by the Free Software Foundation; either version 2 of
|
* License as published by the Free Software Foundation; either
|
||||||
* the License, or (at your option) any later version.
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* GNU Library General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Library General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -34,8 +33,8 @@ class USBDemodChainCF : public DemodChainCF {
|
||||||
float low_cutoff;
|
float low_cutoff;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
USBDemodChainCF (VrSource<d_iType> *src, VrSink<d_oType> *snk, rmode_t mode, pbwidth_t width, int input_rate, freq_t centerfreq = 0) :
|
USBDemodChainCF (VrSource<d_iType> *src, VrSink<d_oType> *snk, rmode_t mode, pbwidth_t width, int input_rate, freq_t centerfreq = 0) :
|
||||||
DemodChainCF(src, snk, mode, width, input_rate, centerfreq) {
|
DemodChainCF(src, snk, mode, width, input_rate, centerfreq) {
|
||||||
|
|
||||||
low_cutoff = 300;
|
low_cutoff = 300;
|
||||||
// centerfreq, relative to IF_center_freq
|
// centerfreq, relative to IF_center_freq
|
||||||
|
@ -58,8 +57,8 @@ class LSBDemodChainCF : public DemodChainCF {
|
||||||
float low_cutoff;
|
float low_cutoff;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LSBDemodChainCF (VrSource<d_iType> *src, VrSink<d_oType> *snk, rmode_t mode, pbwidth_t width, int input_rate, freq_t centerfreq = 0) :
|
LSBDemodChainCF (VrSource<d_iType> *src, VrSink<d_oType> *snk, rmode_t mode, pbwidth_t width, int input_rate, freq_t centerfreq = 0) :
|
||||||
DemodChainCF(src, snk, mode, width, input_rate, centerfreq) {
|
DemodChainCF(src, snk, mode, width, input_rate, centerfreq) {
|
||||||
|
|
||||||
float low_cutoff = 300;
|
float low_cutoff = 300;
|
||||||
// centerfreq, relative to IF_center_freq
|
// centerfreq, relative to IF_center_freq
|
||||||
|
|
|
@ -2,21 +2,20 @@
|
||||||
* Hamlib GNUradio backend - Wide FM class
|
* Hamlib GNUradio backend - Wide FM class
|
||||||
* Copyright (c) 2003 by Stephane Fillod
|
* Copyright (c) 2003 by Stephane Fillod
|
||||||
*
|
*
|
||||||
* $Id: wfm.h,v 1.2 2004-02-08 20:27:58 fillods Exp $
|
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or
|
||||||
* it under the terms of the GNU Library General Public License as
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* published by the Free Software Foundation; either version 2 of
|
* License as published by the Free Software Foundation; either
|
||||||
* the License, or (at your option) any later version.
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* GNU Library General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Library General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -36,31 +35,31 @@ class WFMDemodChainCF : public DemodChainCF {
|
||||||
GrFIRfilterFFF *audio_filter;
|
GrFIRfilterFFF *audio_filter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
WFMDemodChainCF (VrSource<d_iType> *src, VrSink<d_oType> *snk, rmode_t mode, pbwidth_t width, int input_rate, freq_t centerfreq = 0) :
|
WFMDemodChainCF (VrSource<d_iType> *src, VrSink<d_oType> *snk, rmode_t mode, pbwidth_t width, int input_rate, freq_t centerfreq = 0) :
|
||||||
DemodChainCF(src, snk, mode, width, input_rate, centerfreq) {
|
DemodChainCF(src, snk, mode, width, input_rate, centerfreq) {
|
||||||
|
|
||||||
CFIRdecimate = 125;
|
CFIRdecimate = 125;
|
||||||
RFIRdecimate = 5;
|
RFIRdecimate = 5;
|
||||||
|
|
||||||
const int quadRate = input_rate / CFIRdecimate;
|
const int quadRate = input_rate / CFIRdecimate;
|
||||||
const int audioRate = quadRate / RFIRdecimate;
|
const int audioRate = quadRate / RFIRdecimate;
|
||||||
|
|
||||||
rig_debug(RIG_DEBUG_VERBOSE, "Input Sampling Rate: %d\n", input_rate);
|
rig_debug(RIG_DEBUG_VERBOSE, "Input Sampling Rate: %d\n", input_rate);
|
||||||
rig_debug(RIG_DEBUG_VERBOSE, "Complex FIR decimation factor: %d\n", CFIRdecimate);
|
rig_debug(RIG_DEBUG_VERBOSE, "Complex FIR decimation factor: %d\n", CFIRdecimate);
|
||||||
rig_debug(RIG_DEBUG_VERBOSE, "QuadDemod Sampling Rate: %d\n", quadRate);
|
rig_debug(RIG_DEBUG_VERBOSE, "QuadDemod Sampling Rate: %d\n", quadRate);
|
||||||
rig_debug(RIG_DEBUG_VERBOSE, "Real FIR decimation factor: %d\n", RFIRdecimate);
|
rig_debug(RIG_DEBUG_VERBOSE, "Real FIR decimation factor: %d\n", RFIRdecimate);
|
||||||
rig_debug(RIG_DEBUG_VERBOSE, "Audio Sampling Rate: %d\n", audioRate);
|
rig_debug(RIG_DEBUG_VERBOSE, "Audio Sampling Rate: %d\n", audioRate);
|
||||||
|
|
||||||
|
|
||||||
// build channel filter
|
// build channel filter
|
||||||
//
|
//
|
||||||
// note that the totally bogus transition width is because
|
// note that the totally bogus transition width is because
|
||||||
// we don't have enough mips right now to really do the right thing.
|
// we don't have enough mips right now to really do the right thing.
|
||||||
// This results in a filter with 83 taps, which is just a few
|
// This results in a filter with 83 taps, which is just a few
|
||||||
// more than the original 75 in microtune_fm_demo.
|
// more than the original 75 in microtune_fm_demo.
|
||||||
|
|
||||||
if_width_of_transition_band = 8*100e3;
|
if_width_of_transition_band = 8*100e3;
|
||||||
|
|
||||||
// float --> float
|
// float --> float
|
||||||
double width_of_transition_band = audioRate / 32;
|
double width_of_transition_band = audioRate / 32;
|
||||||
vector<float> audio_coeffs =
|
vector<float> audio_coeffs =
|
||||||
|
@ -69,12 +68,12 @@ class WFMDemodChainCF : public DemodChainCF {
|
||||||
audioRate/2 - width_of_transition_band, // low-pass cutoff freq
|
audioRate/2 - width_of_transition_band, // low-pass cutoff freq
|
||||||
width_of_transition_band,
|
width_of_transition_band,
|
||||||
gr_firdes::WIN_HAMMING);
|
gr_firdes::WIN_HAMMING);
|
||||||
|
|
||||||
rig_debug(RIG_DEBUG_VERBOSE, "Number of audio_coeffs: %d\n", audio_coeffs.size ());
|
rig_debug(RIG_DEBUG_VERBOSE, "Number of audio_coeffs: %d\n", audio_coeffs.size ());
|
||||||
rig_debug(RIG_DEBUG_VERBOSE, "Low-pass cutoff freq: %d\n", audioRate/2 - (int)width_of_transition_band);
|
rig_debug(RIG_DEBUG_VERBOSE, "Low-pass cutoff freq: %d\n", audioRate/2 - (int)width_of_transition_band);
|
||||||
|
|
||||||
audio_filter = new GrFIRfilterFFF(RFIRdecimate, audio_coeffs);
|
audio_filter = new GrFIRfilterFFF(RFIRdecimate, audio_coeffs);
|
||||||
|
|
||||||
q_demod = new VrQuadratureDemod<d_oType>(1.0);
|
q_demod = new VrQuadratureDemod<d_oType>(1.0);
|
||||||
|
|
||||||
demod_in = q_demod;
|
demod_in = q_demod;
|
||||||
|
|
Ładowanie…
Reference in New Issue