blob: 7d5b8cde7aa77fef916fd90ce988894d3d29a918 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#
# Copyright 2005,2006,2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
"""
BPSK modulation and demodulation.
"""
from math import pi, log
from cmath import exp
from gnuradio import gr
from gnuradio.digital.generic_mod_demod import generic_mod, generic_demod
from gnuradio.digital.generic_mod_demod import shared_mod_args, shared_demod_args
from . import digital_python
from . import modulation_utils
# /////////////////////////////////////////////////////////////////////////////
# BPSK constellation
# /////////////////////////////////////////////////////////////////////////////
def bpsk_constellation():
return digital_python.constellation_bpsk()
# /////////////////////////////////////////////////////////////////////////////
# DBPSK constellation
# /////////////////////////////////////////////////////////////////////////////
def dbpsk_constellation():
return digital_python.constellation_dbpsk()
#
# Add these to the mod/demod registry
#
modulation_utils.add_type_1_constellation('bpsk', bpsk_constellation)
modulation_utils.add_type_1_constellation('dbpsk', dbpsk_constellation)
|