From dcffee0db098b747e4ca9508a5db07946e574bca Mon Sep 17 00:00:00 2001 From: Manolis Surligas Date: Fri, 15 Jul 2016 23:22:15 +0300 Subject: [PATCH] Add a database with SDR hardware and working parameters --- python/CMakeLists.txt | 1 + python/__init__.py | 9 +++++---- python/hw_settings.py | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 python/hw_settings.py diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index b73ea94..62ef720 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -31,6 +31,7 @@ endif() GR_PYTHON_INSTALL( FILES __init__.py + hw_settings.py satnogs_upsat_transmitter.py DESTINATION ${GR_PYTHON_DIR}/satnogs ) diff --git a/python/__init__.py b/python/__init__.py index 5d19e65..6950aa0 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -25,11 +25,12 @@ description here (python/__init__.py). # import swig generated symbols into the satnogs namespace try: - # this might fail if the module is python-only - from satnogs_swig import * - from satnogs_upsat_transmitter import * + # this might fail if the module is python-only + from satnogs_swig import * + from hw_settings import * + from satnogs_upsat_transmitter import * except ImportError: - pass + pass # import any pure python here # diff --git a/python/hw_settings.py b/python/hw_settings.py new file mode 100644 index 0000000..5c21ce0 --- /dev/null +++ b/python/hw_settings.py @@ -0,0 +1,38 @@ +#! /usr/bin/python +# +# gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module +# +# Copyright (C) 2016, Libre Space Foundation +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# * along with this program. If not, see +# + +#=============================================================================== +# Bellow we provide some good and working settings for a large variety of +# different SDR hardware. Feel free, to provide additional hardware +# configurations +#=============================================================================== +hw_tx_settings = {'usrpb200' : {'rf_gain' : 60.0, 'samp_rate' : 2e6}, + 'usrp2' : {'rf_gain' : 20.0, 'samp_rate' : 2e6}, + 'hackrf' : {'rf_gain' : 20.0, 'if_gain' : 8.0, + 'bb_gain' : 5.0, 'samp_rate' : 2e6} } + +hw_rx_settings = {'usrpb200' : {'rf_gain' : 20.0, 'if_gain' : 0.0, + 'bb_gain' : 0.0, 'samp_rate' : 2e6}, + 'usrp2' : {'rf_gain' : 20.0, 'if_gain' : 0.0, + 'bb_gain' : 0.0, 'samp_rate' : 2e6}, + 'airspy' : {'rf_gain' : 20.0, 'if_gain' : 0.0, + 'bb_gain' : 0.0, 'samp_rate' : 2.5e6}, + 'hackrf' : {'rf_gain' : 20.0, 'if_gain' : 8.0, + 'bb_gain' : 5.0, 'samp_rate' : 2e6} }