Skip to content

Commit a2af4d0

Browse files
committed
Merge branch 'main' into maint-3.10
2 parents 2a0df29 + c62a4d3 commit a2af4d0

10 files changed

+129
-9
lines changed

CHANGELOG.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## Unreleased
88

9+
## [5.1.1], [4.8.1], [3.15.1] - 2022-11-19
10+
11+
### Fixed
12+
- RMS AGC block in aarch64 systems
13+
914
## [5.1.0], [4.8.0], [3.15.0] - 2022-10-24
1015

1116
### Added
@@ -541,9 +546,11 @@ Large refactor release bringing new functionality and improvements. This is an o
541546
## [1.0.0] - 2018-08-02
542547
First gr-satellites release using semantic versioning
543548

544-
[Unreleased]: https://github.com/daniestevez/gr-satellites/compare/v5.1.0...main
549+
[Unreleased]: https://github.com/daniestevez/gr-satellites/compare/v5.1.1...main
550+
[5.1.1]: https://github.com/daniestevez/gr-satellites/compare/v5.1.0...v5.1.1
545551
[5.1.0]: https://github.com/daniestevez/gr-satellites/compare/v5.0.0...v5.1.0
546552
[5.0.0]: https://github.com/daniestevez/gr-satellites/compare/v4.6.0...v5.0.0
553+
[4.8.1]: https://github.com/daniestevez/gr-satellites/compare/v4.8.0...v4.8.1
547554
[4.8.0]: https://github.com/daniestevez/gr-satellites/compare/v4.7.0...v4.8.0
548555
[4.7.0]: https://github.com/daniestevez/gr-satellites/compare/v4.6.0...v4.7.0
549556
[4.6.0]: https://github.com/daniestevez/gr-satellites/compare/v4.5.0...v4.6.0
@@ -555,7 +562,8 @@ First gr-satellites release using semantic versioning
555562
[4.1.0]: https://github.com/daniestevez/gr-satellites/compare/v4.0.0...v4.1.0
556563
[4.0.0]: https://github.com/daniestevez/gr-satellites/compare/v4.0.0-rc1...v4.0.0
557564
[4.0.0-rc1]: https://github.com/daniestevez/gr-satellites/compare/v3.7.0...v4.0.0-rc1
558-
[3.14.0]: https://github.com/daniestevez/gr-satellites/compare/v3.14.0...v3.15.0
565+
[3.15.1]: https://github.com/daniestevez/gr-satellites/compare/v3.15.0...v3.15.1
566+
[3.15.0]: https://github.com/daniestevez/gr-satellites/compare/v3.14.0...v3.15.0
559567
[3.14.0]: https://github.com/daniestevez/gr-satellites/compare/v3.13.0...v3.14.0
560568
[3.13.0]: https://github.com/daniestevez/gr-satellites/compare/v3.12.0...v3.13.0
561569
[3.12.0]: https://github.com/daniestevez/gr-satellites/compare/v3.11.0...v3.12.0

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules)
4444
# Set the version information here
4545
set(VERSION_MAJOR 5)
4646
set(VERSION_API 1)
47-
set(VERSION_ABI 0)
47+
set(VERSION_ABI 1)
4848
set(VERSION_PATCH 0)
4949

5050
cmake_policy(SET CMP0011 NEW)

docs/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# The short X.Y version
2727
version = ''
2828
# The full version, including alpha/beta/rc tags
29-
release = '5.1.0'
29+
release = '5.1.1'
3030

3131

3232
# -- General configuration ---------------------------------------------------

python/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
ad-hoc protocols used in other satellites.
2020
"""
2121

22-
__version__ = 'v5.1.0'
22+
__version__ = 'v5.1.1'
2323
__author__ = 'Daniel Estevez'
2424
__copyright__ = 'Copyright 2016-2022 Daniel Estevez'
2525
__email__ = '[email protected]'

python/hier/CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,6 @@ GR_PYTHON_INSTALL(
5050
include(GrTest)
5151

5252
set(GR_TEST_TARGET_DEPS gnuradio-satellites)
53-
set(GR_TEST_PYTHON_DIRS ${CMAKE_BINARY_DIR}/swig)
53+
set(GR_TEST_PYTHON_DIRS ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/swig)
54+
GR_ADD_TEST(qa_rms_agc ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_rms_agc.py)
55+
GR_ADD_TEST(qa_rms_agc_f ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_rms_agc_f.py)

python/hier/qa_rms_agc.py

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
4+
# Copyright 2022 Daniel Estevez <[email protected]>
5+
#
6+
# This file is part of gr-satellites
7+
#
8+
# SPDX-License-Identifier: GPL-3.0-or-later
9+
#
10+
11+
from gnuradio import gr, blocks, gr_unittest
12+
import numpy as np
13+
import pmt
14+
15+
# bootstrap satellites module, even from build dir
16+
try:
17+
import python as satellites
18+
except ImportError:
19+
pass
20+
else:
21+
import sys
22+
sys.modules['satellites'] = satellites
23+
24+
from satellites.hier import rms_agc
25+
26+
27+
class qa_rms_agc(gr_unittest.TestCase):
28+
def setUp(self):
29+
self.tb = gr.top_block()
30+
31+
def tearDown(self):
32+
self.tb = None
33+
34+
def test_zero_input(self):
35+
"""Tests that if the input is zero, the output is also zero.
36+
37+
In some architectures we have found that the calculations produce nan
38+
if the number that we put in the denominator to avoid 0/0 is too small.
39+
"""
40+
n = 256
41+
source = blocks.vector_source_c([0] * n, False, 1, [])
42+
sink = blocks.vector_sink_c(1, n)
43+
agc = rms_agc(alpha=1e-2, reference=1.0)
44+
self.tb.connect(source, agc, sink)
45+
46+
self.tb.start()
47+
self.tb.wait()
48+
49+
expected = np.zeros(n, 'complex64')
50+
np.testing.assert_equal(
51+
sink.data(), expected, 'AGC output is not zero')
52+
53+
54+
if __name__ == '__main__':
55+
gr_unittest.run(qa_rms_agc)

python/hier/qa_rms_agc_f.py

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
4+
# Copyright 2022 Daniel Estevez <[email protected]>
5+
#
6+
# This file is part of gr-satellites
7+
#
8+
# SPDX-License-Identifier: GPL-3.0-or-later
9+
#
10+
11+
from gnuradio import gr, blocks, gr_unittest
12+
import numpy as np
13+
import pmt
14+
15+
# bootstrap satellites module, even from build dir
16+
try:
17+
import python as satellites
18+
except ImportError:
19+
pass
20+
else:
21+
import sys
22+
sys.modules['satellites'] = satellites
23+
24+
from satellites.hier import rms_agc_f
25+
26+
27+
class qa_rms_agc_f(gr_unittest.TestCase):
28+
def setUp(self):
29+
self.tb = gr.top_block()
30+
31+
def tearDown(self):
32+
self.tb = None
33+
34+
def test_zero_input(self):
35+
"""Tests that if the input is zero, the output is also zero.
36+
37+
In some architectures we have found that the calculations produce nan
38+
if the number that we put in the denominator to avoid 0/0 is too small.
39+
"""
40+
n = 256
41+
source = blocks.vector_source_f([0] * n, False, 1, [])
42+
sink = blocks.vector_sink_f(1, n)
43+
agc = rms_agc_f(alpha=1e-2, reference=1.0)
44+
self.tb.connect(source, agc, sink)
45+
46+
self.tb.start()
47+
self.tb.wait()
48+
49+
expected = np.zeros(n, 'float32')
50+
np.testing.assert_equal(
51+
sink.data(), expected, 'AGC output is not zero')
52+
53+
54+
if __name__ == '__main__':
55+
gr_unittest.run(qa_rms_agc_f)

python/hier/rms_agc.grc

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ blocks:
5555
affinity: ''
5656
alias: ''
5757
comment: ''
58-
const: 1e-20
58+
const: 1e-19
5959
maxoutbuf: '0'
6060
minoutbuf: '0'
6161
type: float

python/hier/rms_agc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __init__(self, alpha=1e-2, reference=0.5):
3636
blocks.multiply_const_ff(1.0/reference))
3737
self.blocks_float_to_complex_0 = blocks.float_to_complex(1)
3838
self.blocks_divide_xx_0 = blocks.divide_cc(1)
39-
self.blocks_add_const_vxx_0 = blocks.add_const_ff(1e-20)
39+
self.blocks_add_const_vxx_0 = blocks.add_const_ff(1e-19)
4040

4141
##################################################
4242
# Connections

python/hier/rms_agc_f.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __init__(self, alpha=1e-2, reference=0.5):
3838
self.blocks_multiply_const_vxx_0 = (
3939
blocks.multiply_const_ff(1.0/reference))
4040
self.blocks_divide_xx_0 = blocks.divide_ff(1)
41-
self.blocks_add_const_vxx_0 = blocks.add_const_ff(1e-20)
41+
self.blocks_add_const_vxx_0 = blocks.add_const_ff(1e-19)
4242

4343
##################################################
4444
# Connections

0 commit comments

Comments
 (0)