From 9eb911230923e11773be422f76726dfbfad7e5bc Mon Sep 17 00:00:00 2001
From: Nao Pross <np@0hm.ch>
Date: Sun, 28 Nov 2021 01:07:08 +0100
Subject: Delete acgen stuff, it was all wrong

---
 tests/correlator/acgen.dat |  15 ----
 tests/correlator/acgen.grc | 198 ---------------------------------------------
 tests/correlator/acgen.py  | 125 ----------------------------
 tests/correlator/acproc.py |  73 -----------------
 4 files changed, 411 deletions(-)
 delete mode 100644 tests/correlator/acgen.dat
 delete mode 100644 tests/correlator/acgen.grc
 delete mode 100755 tests/correlator/acgen.py
 delete mode 100755 tests/correlator/acproc.py

diff --git a/tests/correlator/acgen.dat b/tests/correlator/acgen.dat
deleted file mode 100644
index a13db8e..0000000
--- a/tests/correlator/acgen.dat
+++ /dev/null
@@ -1,15 +0,0 @@
-��s9��s9ty�ty��R��R�P8|!P8|!���9���9)Eס)Eס�
-��
-����"���"b�I:b�I:�T¡�T¡��S���S�٦�"٦�"o��:o��:̟w�̟w�S픺S픺Nj#Nj#�8�:�8�:��]���]�XźXź��"#��"#�E�:�E�:�Ţ�Ţ�K���K��дk#дk#9�;9�;�B���B���Z��Z�U2}#U2}#&�4;&�4;N
-�N
-��q?��q?����#���#lbZ;lbZ;�颓�v�g�v�g��a�#�a�#f�;f�;3�3���������#��#.��;.��;m=�m=��x���x��T�#T�#P"�;P"�;Y~]�Y~]���Ȼ��Ȼ(�!$(�!$��;��;�?���?��D��D��j�$$j�$$`�<`�<3nѣ3nѣ	u�	u�Ĝ&$Ĝ&$�#<�#<�����E3��E3�3�&$3�&$�PI<�PI<מ/�מ/���^���^��V#$�V#$/�|</�|<�a��a��������$�$�G�<�G�<C’�C’�����������$��$~ �<~ �<��Ĥ��Ĥ�������ר#�ר#�#"=�#"=�������+N��+N�֟
$֟
$ᚋ=ᚋ=�F��F��rн�rн_�w$_�w$�@>�@>�N��N��3��3�'��'��&dο&dο'��'��Ů��Ů��'��'��������'��'���D���D��'��'��^��^��'��'����������'��'��j���j���'��'��(ǰ�(ǰ�'��'��ڸ�ڸ�'��'���}���}��'��'��&F��&F��'��'����������'��'���߷��߷�'��'��gO��gO��'��'��.���.���'��'��������'��'���Z���Z��'��'��IJ�IJ�'��'���,���,��'��'��������'��'��
-��
-��'��'��z��z��'��'���鶿�鶿'��'��`*��`*��'��'���϶��϶�'��'���A���A��'��'��������'��'��:V��:V��'��'��E���E���'��'���g���g��'��'��ᖶ�ᖶ�'��'��w��w��'��'��x���x���'��'����������'��'���{���{��'��'����������'��'��Rp��Rp��'��'��~���~���'��'��Yu��f��'��'��<���2���'��'���|��!l��'��'��t������'��'���}t��'��'��
-���q���'��'������p��'��'��p{������'��'��˙�����'��'���d��}��'��'������Ո��'��'���K���v��'��'��m̶�����'��'��%/��^o��'��'���۶�����'��'������f��'��'�����G���'��'������\��'��'���#�����'��'���в�S?��'��'���P���ڶ�'��'��������'��'���w���ﶿ'��'���t�����'��'��������'��'��(.���ٲ�'��'�����E;��'��'��ֱ�Ѳ��'��'��>i���g��'��'��nd�����'��'���ܸ�&���'��'��Xܰ�9:��'��'��]���$���'��'�����4ر�'��'��I���*{��'��'���Ů�6��'��'���,��UC��'��'������9��'��'��y��}��'��'���i������'��'��{�ſ'��'���֛�Xિ'��'�����_�¿'��'���Ҽ�q��'�?'�����?�B߿'�?'��4Փ?��'�?'�?t�?I_�?'�?'�?��?�?'�?'�?
�?d��?'�?'�?�C�=�<'��'�����B��'��'���3>�Y7�'�?'�?jd�?��@'�?'�?�G�?����'�?'��QD�?@޿'�?'���Ϝ?n���'�?'��L?�?�5ǿ'�?'����>�֣�'��'������ȿ'��'���f>�q��'�?'����?�u�'�?'���ߝ?��U�'�?'�? ��?v-�?'�?'�?�
-�?���?'�?'�?'�?�Y�?'�?'�?�|>qZ�<'��'���D�(~��'��'����>mZ�'�?'�?��?{@'�?'�?鉞?@��'�?'��>C�?x߿'�?'��~��?�ޜ�'�?'��y��?x�ǿ'�?'��S!>
<��'��'���}�ީȿ'��'��!">.'�?'���o�?3��'�?'����?H�G�'�?'�?��?2��?'�?'�?c�?���?'�?'�?\U�?���?'�?'�?
-�#>��<'��'��R��>���'��'��w%$>C�
-�'�?'�?22�?x�@'�?'�?O!�?tv�'�?'�����?�K߿'�?'��L!�?����'�?'���"�?hȿ'�?'�� �$>���'��'��N��D�ȿ'��'��!�$>�ʚ�'�?'���"�?��'�?'��O!�?��E�'�?'�?���?x��?'�?'�?L!�?��?'�?'�?�"�?t��?'�?'�? �$>��<'��'��N��>���'��'��!�$>C�
-�'�?'�?�"�?x�@'�?'�?O!�?tv�'�?'�����?�K߿'�?'��L!�?����'�?'���"�?hȿ'�?'�� �$>���'��'��N��D�ȿ'��'��!�$>�ʚ�'�?'���"�?��'�?'��O!�?��E�'�?'�?���?x��?'�?'�?L!�?��?'�?'�?�"�?t��?'�?'�? �$>��<'��'��N��>���'��'��!�$>C�
-�'�?'�?�"�?x�@'�?'�?O!�?tv�'�?'�����?�K߿'�?'��L!�?����'�?'���"�?hȿ'�?'�� �$>���'��'��N��D�ȿ'��'��!�$>�ʚ�'�?'���"�?��'�?'��O!�?��E�'�?'�?���?x��?'�?'�?L!�?��?'�?'�?�"�?t��?'�?'�? �$>��<'��'��N��>���'��'��!�$>C�
-�'�?'�?�"�?x�@'�?'�?O!�?tv�'�?'�����?�K߿'�?'��L!�?����'�?'���"�?hȿ'�?'�� �$>���'��'��N��D�ȿ'��'��!�$>�ʚ�'�?'���"�?��'�?'��O!�?��E�'�?'�?���?x��?'�?'�?L!�?��?'�?'�?�"�?t��?'�?'�? �$>��<'��'��N��>���'��'��!�$>C�
-�'�?'�?�"�?x�@'�?'�?O!�?tv�'�?'�����?�K߿'�?'��L!�?����'�?'���"�?hȿ'�?'�� �$>���'��'��N��D�ȿ'��'��!�$>�ʚ�'�?'���"�?��'�?'��O!�?��E�'�?'�?
\ No newline at end of file
diff --git a/tests/correlator/acgen.grc b/tests/correlator/acgen.grc
deleted file mode 100644
index abdc3bc..0000000
--- a/tests/correlator/acgen.grc
+++ /dev/null
@@ -1,198 +0,0 @@
-options:
-  parameters:
-    author: Naoki Pross
-    category: '[GRC Hier Blocks]'
-    cmake_opt: ''
-    comment: ''
-    copyright: ''
-    description: ''
-    gen_cmake: 'On'
-    gen_linking: dynamic
-    generate_options: no_gui
-    hier_block_src_path: '.:'
-    id: acgen
-    max_nouts: '0'
-    output_language: python
-    placement: (0,0)
-    qt_qss_theme: ''
-    realtime_scheduling: ''
-    run: 'True'
-    run_command: '{python} -u {filename}'
-    run_options: run
-    sizing_mode: fixed
-    thread_safe_setters: ''
-    title: Access Code Symbols Generator
-    window_size: ''
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [8, 8]
-    rotation: 0
-    state: enabled
-
-blocks:
-- name: access_code
-  id: variable
-  parameters:
-    comment: ''
-    value: '[ 0xaa, 0xff, 0xff ]'
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [40, 292.0]
-    rotation: 0
-    state: true
-- name: const
-  id: variable_constellation
-  parameters:
-    comment: ''
-    const_points: '[-1-1j, -1+1j, 1+1j, 1-1j]'
-    dims: '1'
-    precision: '8'
-    rot_sym: '4'
-    soft_dec_lut: None
-    sym_map: '[0, 1, 3, 2]'
-    type: qpsk
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [464, 124.0]
-    rotation: 0
-    state: true
-- name: excess_bw
-  id: variable
-  parameters:
-    comment: ''
-    value: '1'
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [464, 308.0]
-    rotation: 0
-    state: true
-- name: padding_zeros
-  id: variable
-  parameters:
-    comment: ''
-    value: '10'
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [40, 364.0]
-    rotation: 0
-    state: true
-- name: samp_rate
-  id: variable
-  parameters:
-    comment: ''
-    value: '32000'
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [208, 12.0]
-    rotation: 0
-    state: enabled
-- name: sps
-  id: variable
-  parameters:
-    comment: ''
-    value: '4'
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [304, 12.0]
-    rotation: 0
-    state: true
-- name: blocks_file_sink_0
-  id: blocks_file_sink
-  parameters:
-    affinity: ''
-    alias: ''
-    append: 'False'
-    comment: ''
-    file: acgen.dat
-    type: complex
-    unbuffered: 'False'
-    vlen: '1'
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [752, 204.0]
-    rotation: 0
-    state: true
-- name: blocks_throttle_0
-  id: blocks_throttle
-  parameters:
-    affinity: ''
-    alias: ''
-    comment: ''
-    ignoretag: 'True'
-    maxoutbuf: '0'
-    minoutbuf: '0'
-    samples_per_second: samp_rate
-    type: byte
-    vlen: '1'
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [264, 220.0]
-    rotation: 0
-    state: true
-- name: blocks_vector_source_x_0
-  id: blocks_vector_source_x
-  parameters:
-    affinity: ''
-    alias: ''
-    comment: ''
-    maxoutbuf: '0'
-    minoutbuf: '0'
-    repeat: 'False'
-    tags: '[]'
-    type: byte
-    vector: '[0x00] * padding_zeros + access_code * 10'
-    vlen: '1'
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [40, 204.0]
-    rotation: 0
-    state: true
-- name: digital_constellation_modulator_0
-  id: digital_constellation_modulator
-  parameters:
-    affinity: ''
-    alias: ''
-    comment: ''
-    constellation: const
-    differential: 'False'
-    excess_bw: excess_bw
-    log: 'False'
-    maxoutbuf: '0'
-    minoutbuf: '0'
-    samples_per_symbol: sps
-    verbose: 'False'
-  states:
-    bus_sink: false
-    bus_source: false
-    bus_structure: null
-    coordinate: [464, 196.0]
-    rotation: 0
-    state: true
-
-connections:
-- [blocks_throttle_0, '0', digital_constellation_modulator_0, '0']
-- [blocks_vector_source_x_0, '0', blocks_throttle_0, '0']
-- [digital_constellation_modulator_0, '0', blocks_file_sink_0, '0']
-
-metadata:
-  file_format: 1
diff --git a/tests/correlator/acgen.py b/tests/correlator/acgen.py
deleted file mode 100755
index 4d18b92..0000000
--- a/tests/correlator/acgen.py
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-
-#
-# SPDX-License-Identifier: GPL-3.0
-#
-# GNU Radio Python Flow Graph
-# Title: Access Code Symbols Generator
-# Author: Naoki Pross
-# GNU Radio version: 3.8.2.0
-
-from gnuradio import blocks
-from gnuradio import digital
-from gnuradio import gr
-from gnuradio.filter import firdes
-import sys
-import signal
-from argparse import ArgumentParser
-from gnuradio.eng_arg import eng_float, intx
-from gnuradio import eng_notation
-
-
-class acgen(gr.top_block):
-
-    def __init__(self):
-        gr.top_block.__init__(self, "Access Code Symbols Generator")
-
-        ##################################################
-        # Variables
-        ##################################################
-        self.sps = sps = 4
-        self.samp_rate = samp_rate = 32000
-        self.padding_zeros = padding_zeros = 10
-        self.excess_bw = excess_bw = 1
-        self.const = const = digital.constellation_qpsk().base()
-        self.access_code = access_code = [ 0xaa, 0xff, 0xff ]
-
-        ##################################################
-        # Blocks
-        ##################################################
-        self.digital_constellation_modulator_0 = digital.generic_mod(
-            constellation=const,
-            differential=False,
-            samples_per_symbol=sps,
-            pre_diff_code=True,
-            excess_bw=excess_bw,
-            verbose=False,
-            log=False)
-        self.blocks_vector_source_x_0 = blocks.vector_source_b([0x00] * padding_zeros + access_code * 10, False, 1, [])
-        self.blocks_throttle_0 = blocks.throttle(gr.sizeof_char*1, samp_rate,True)
-        self.blocks_file_sink_0 = blocks.file_sink(gr.sizeof_gr_complex*1, 'acgen.dat', False)
-        self.blocks_file_sink_0.set_unbuffered(False)
-
-
-
-        ##################################################
-        # Connections
-        ##################################################
-        self.connect((self.blocks_throttle_0, 0), (self.digital_constellation_modulator_0, 0))
-        self.connect((self.blocks_vector_source_x_0, 0), (self.blocks_throttle_0, 0))
-        self.connect((self.digital_constellation_modulator_0, 0), (self.blocks_file_sink_0, 0))
-
-
-    def get_sps(self):
-        return self.sps
-
-    def set_sps(self, sps):
-        self.sps = sps
-
-    def get_samp_rate(self):
-        return self.samp_rate
-
-    def set_samp_rate(self, samp_rate):
-        self.samp_rate = samp_rate
-        self.blocks_throttle_0.set_sample_rate(self.samp_rate)
-
-    def get_padding_zeros(self):
-        return self.padding_zeros
-
-    def set_padding_zeros(self, padding_zeros):
-        self.padding_zeros = padding_zeros
-        self.blocks_vector_source_x_0.set_data([0x00] * self.padding_zeros + self.access_code * 10, [])
-
-    def get_excess_bw(self):
-        return self.excess_bw
-
-    def set_excess_bw(self, excess_bw):
-        self.excess_bw = excess_bw
-
-    def get_const(self):
-        return self.const
-
-    def set_const(self, const):
-        self.const = const
-
-    def get_access_code(self):
-        return self.access_code
-
-    def set_access_code(self, access_code):
-        self.access_code = access_code
-        self.blocks_vector_source_x_0.set_data([0x00] * self.padding_zeros + self.access_code * 10, [])
-
-
-
-
-
-def main(top_block_cls=acgen, options=None):
-    tb = top_block_cls()
-
-    def sig_handler(sig=None, frame=None):
-        tb.stop()
-        tb.wait()
-
-        sys.exit(0)
-
-    signal.signal(signal.SIGINT, sig_handler)
-    signal.signal(signal.SIGTERM, sig_handler)
-
-    tb.start()
-
-    tb.wait()
-
-
-if __name__ == '__main__':
-    main()
diff --git a/tests/correlator/acproc.py b/tests/correlator/acproc.py
deleted file mode 100755
index 50c9a38..0000000
--- a/tests/correlator/acproc.py
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/usr/bin/env python3
-
-import numpy as np
-import matplotlib.pyplot as plt
-from acgen import acgen
-
-# parameters
-access_code_bits = [ 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, ]
-access_code = list(np.packbits([0] * 3 + access_code_bits))
-padding_zeros = 10
-
-# Create samples
-print(f"Modulating symbols for access code {access_code_bits} = {access_code} with after {padding_zeros} empty bytes")
-gen = acgen()
-gen.set_access_code(access_code)
-gen.set_padding_zeros(padding_zeros)
-
-gen.start()
-gen.wait()
-
-# Extract one sequence
-print("Extracting symbol sequence")
-
-# raw data
-data = np.fromfile("acgen.dat", dtype=np.complex64)
-plt.plot(data.real)
-plt.plot(data.imag)
-plt.title("Raw Data (time domain)")
-plt.show()
-
-# take only symbols
-symbols = data[1::gen.sps]
-
-plt.plot(symbols.real, symbols.imag)
-plt.title("Symbols only (constellation)")
-plt.show()
-
-# where ac symbols start, in symbols
-ac_start = (padding_zeros) * 8 + 3 # plus three because code is 13 bits
-ac_end = ac_start + int(np.ceil(len(access_code_bits) / 2.)) # divided by two because QPSK
-
-ac = symbols[ac_start:ac_end]
-
-print(f"Generated {len(ac)} (left padded) symbols from a {len(access_code_bits)} bit sequence")
-print(list(ac))
-
-print(f"Upsampled to {gen.sps} samples per symbos")
-print(sum([[i, i, i, i] for i in ac], []))
-
-fig, (ax1, ax2) = plt.subplots(2, 1)
-fig.tight_layout()
-
-ax1.plot(ac.real, ac.imag)
-ax1.set_title("Symbols of Access Code (constellation)")
-
-ax2.plot(ac.real, ".-")
-ax2.plot(ac.imag, ".-")
-ax2.set_title("Symbols of Access Code (time)")
-plt.show()
-
-fir = list(np.conj(ac[::-1]))
-
-# Print the symbols
-print("Reversed complex conjugate symbols (for FIR filter):")
-print(fir)
-
-# Compute cross correlation
-
-xc = np.convolve(fir, ac)
-
-plt.plot(np.abs(xc))
-plt.title("Cross correlation (FIR)")
-plt.show()
-- 
cgit v1.2.1