diff --git a/CMakeLists.txt b/CMakeLists.txt index 05ad4b9..79898ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,16 +61,14 @@ find_package(fmt REQUIRED) find_package(nlohmann_json REQUIRED) find_package(prometheus-cpp CONFIG REQUIRED) find_package(cpr REQUIRED) -find_package(Armadillo REQUIRED) -include_directories(${ARMADILLO_INCLUDE_DIRS}) include_directories(${CMAKE_SOURCE_DIR}/include) if (NOT NIX_BUILD) target_link_libraries(tetra-decoder-library cxxopts::cxxopts) endif() -target_link_libraries(tetra-decoder-library ZLIB::ZLIB fmt::fmt nlohmann_json::nlohmann_json viterbi prometheus-cpp::pull cpr::cpr ${ARMADILLO_LIBRARIES}) +target_link_libraries(tetra-decoder-library ZLIB::ZLIB fmt::fmt nlohmann_json::nlohmann_json viterbi prometheus-cpp::pull cpr::cpr) target_link_libraries(tetra-decoder tetra-decoder-library) target_link_libraries(tetra-viterbi viterbi) diff --git a/derivation.nix b/derivation.nix index 7bac3d4..e33acd3 100644 --- a/derivation.nix +++ b/derivation.nix @@ -8,7 +8,6 @@ , prometheus-cpp , curlFull , libcpr -, armadillo }: clangStdenv.mkDerivation { name = "tetra-decoder"; @@ -24,7 +23,6 @@ clangStdenv.mkDerivation { curlFull prometheus-cpp libcpr - armadillo ]; cmakeFlags = [ "-DNIX_BUILD=ON" ]; diff --git a/src/iq_stream_decoder.cpp b/src/iq_stream_decoder.cpp index cb875f1..0e644ea 100644 --- a/src/iq_stream_decoder.cpp +++ b/src/iq_stream_decoder.cpp @@ -9,7 +9,6 @@ #include "iq_stream_decoder.hpp" #include "l2/lower_mac.hpp" -#include #include IQStreamDecoder::IQStreamDecoder( @@ -95,19 +94,6 @@ std::vector> IQStreamDecoder::channel_estimation(std::vector return stream; } -static auto solve_channel(const std::vector>& pilots, - const FixedQueue, 300>& signal_queue, const std::size_t signal_offset) - -> arma::cx_fvec { - auto arma_pilots = arma::cx_fvec(pilots); - auto arma_signal = arma::cx_fvec(pilots.size()); - for (auto i = 0; i < arma_signal.size(); i++) { - arma_signal[i] = signal_queue[signal_offset + i]; - } - auto arma_conj_pilots = arma::conj(arma_pilots); - auto h_vec = arma::solve(arma_conj_pilots * arma_pilots, arma_conj_pilots * arma::conj(arma_signal)); - return h_vec; -} - void IQStreamDecoder::process_complex(std::complex symbol) noexcept { if (is_uplink_) { float detectedN; @@ -137,9 +123,6 @@ void IQStreamDecoder::process_complex(std::complex symbol) noexcept { if (detectedX >= SEQUENCE_DETECTION_THRESHOLD) { // std::cout << "Potential CUB found" << std::endl; - auto channel = solve_channel(training_seq_x_, symbol_buffer_hard_decision_, 44); - std::cout << channel << std::endl; - auto len = 103; std::vector bits(len * 2);