Giter VIP home page Giter VIP logo

marcinwachowiak / gr-aoa Goto Github PK

View Code? Open in Web Editor NEW
45.0 3.0 11.0 4.68 MB

GNU Radio package implementing MUSIC and root MUSIC angle of arrival algorithms with blocks necessary to provide phase synchronization of USRP devices

License: GNU General Public License v3.0

C++ 56.67% Python 19.12% CMake 19.69% C 4.51%
sdr aoa doa direction-of-arrival usrp gnu-radio wireless-communication beamforming music-algorithm gnuradio software-defined-radio

gr-aoa's Introduction

GNU Radio Angle of arrival estimation with USRP

GNU Radio package implementing MUSIC and root MUSIC angle of arrival algorithms with blocks necessary to provide phase synchronization of USRP devices. Implemented blocks include:

  1. MUSIC Linear Array
  2. Root-MUSIC
  3. Calculate Phase Difference
  4. Shift Phase
  5. Correlate
  6. Precise Moving Average
  7. Head with Reset

This is an updated and improved version of https://github.com/EttusResearch/gr-doa.

Implemented blocks:

implemented_blocks_img

Exemplary GR GUI:

exemplary_gr_gui_img

Installation procedure:

cd
git clone [email protected]:MarcinWachowiak/gr-aoa.git
cd gr-aoa

mkdir build
cd build
cmake ..
make -j$(nproc)

sudo make install
sudo ldconfig

Usage:

For exemplary flowcharts and use cases visit the examples directory.

gr-aoa's People

Contributors

bkerler avatar marcinwachowiak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gr-aoa's Issues

Build error

I ran into an error building this project on Windows using CMake and MSBuild. I am not sure if this is a result of me using MSBuild incorrectly or a project problem.

Error:

Project "C:\Users\smartlab\Downloads\gr-aoa\build2\ALL_BUILD.vcxproj" (3) is building "C:\Users\smartlab\Downloads\gr-aoa\build2\python\aoa\bindings\copy_bindings_for_tests.vcxproj" (7) on node 1 (default targe
ts).
PrepareForBuild:
  Structured output is enabled. The formatting of compiler diagnostics will reflect the error hierarchy. See https://aka.ms/cpp/structured-output for more details.
InitializeBuildStatus:
  Touching "x64\Debug\copy_bindings_for_tests\copy_bin.48E19502.tlog\unsuccessfulbuild".
CustomBuild:
  Error copying file "C:/Users/smartlab/Downloads/gr-aoa/build2/python/aoa/bindings/*.so" to "C:/Users/smartlab/Downloads/gr-aoa/build2/test_modules/gnuradio/aoa/".
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'C:\Users\smartlab\Downloads\gr-aoa\build2\CMakeFiles\6cf6af
02b2194bca3d1bc5fa82b0e60d\copy_bindings_for_tests.rule' exited with code 1. [C:\Users\smartlab\Downloads\gr-aoa\build2\python\aoa\bindings\copy_bindings_for_tests.vcxproj]
Done Building Project "C:\Users\smartlab\Downloads\gr-aoa\build2\python\aoa\bindings\copy_bindings_for_tests.vcxproj" (default targets) -- FAILED.

CMake command:
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_PREFIX_PATH=C:\Users\smartlab\radioconda\Library ..

I can provide more details if necessary. Any help would be appreciated.

Make error

Hi, I tried to compile on gnuradio-3.10.3 but received the error

[  0%] Built target pygen_apps_9a6dd
[  4%] Generating documentation with doxygen
[  9%] Building CXX object lib/CMakeFiles/gnuradio-aoa.dir/MUSIC_lin_array_impl.cc.o
[  9%] Built target copy_module_for_tests
[ 18%] Generating __init__.pyc, shift_phase_multiple_hier.pyc, calc_phase_diff_multiple_hier.pyc
[ 18%] Building CXX object lib/CMakeFiles/gnuradio-aoa.dir/rootMUSIC_linear_array_impl.cc.o
[ 22%] Generating __init__.pyo, shift_phase_multiple_hier.pyo, calc_phase_diff_multiple_hier.pyo
[ 22%] Built target pygen_python_aoa_bb291
[ 27%] Building CXX object lib/CMakeFiles/gnuradio-aoa.dir/shift_phase_impl.cc.o
[ 27%] Built target doxygen_target
[ 31%] Building CXX object lib/CMakeFiles/gnuradio-aoa.dir/calc_phase_diff_impl.cc.o
/home/liuxs/workarea/GR-DOA/gr-aoa/lib/shift_phase_impl.cc: In member function ‘virtual int gr::aoa::shift_phase_impl::work(int, gr_vector_const_void_star&, gr_vector_void_star&)’:
/home/liuxs/workarea/GR-DOA/gr-aoa/lib/shift_phase_impl.cc:64:28: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
   64 |       for (size_t j = 0; j < noutput_items; j++) {
      |                          ~~^~~~~~~~~~~~~~~
/home/liuxs/workarea/GR-DOA/gr-aoa/lib/calc_phase_diff_impl.cc: In member function ‘virtual int gr::aoa::calc_phase_diff_impl::work(int, gr_vector_const_void_star&, gr_vector_void_star&)’:
/home/liuxs/workarea/GR-DOA/gr-aoa/lib/calc_phase_diff_impl.cc:75:28: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
   75 |       for (size_t j = 0; j < noutput_items; j++) {
      |                          ~~^~~~~~~~~~~~~~~
[ 36%] Building CXX object lib/CMakeFiles/gnuradio-aoa.dir/precise_moving_average_impl.cc.o
[ 40%] Building CXX object lib/CMakeFiles/gnuradio-aoa.dir/head_w_rst_impl.cc.o
[ 45%] Building CXX object lib/CMakeFiles/gnuradio-aoa.dir/correlate_impl.cc.o
[ 50%] Linking CXX shared library libgnuradio-aoa.so
/usr/bin/ld: /usr/local/lib/libspdlog.a(spdlog.cpp.o): relocation R_X86_64_TPOFF32 against `_ZGVZN6spdlog7details2os9thread_idEvE3tid' can not be used when making a shared object; recompile with -fPIC
collect2: error: ld returned 1 exit status
make[2]: *** [lib/CMakeFiles/gnuradio-aoa.dir/build.make:183: lib/libgnuradio-aoa.so.1.0.0.0] Error 1
make[1]: *** [CMakeFiles/Makefile2:273: lib/CMakeFiles/gnuradio-aoa.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

It looks like the error came from spdlog.
Previously, when I ran cmake .., I was getting

CMake Error at /usr/share/cmake-3.16/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
  By not providing "Findspdlog.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "spdlog", but
  CMake did not find one.

  Could not find a package configuration file provided by "spdlog" with any
  of the following names:

    spdlogConfig.cmake
    spdlog-config.cmake

  Add the installation prefix of "spdlog" to CMAKE_PREFIX_PATH or set
  "spdlog_DIR" to a directory containing one of the above files.  If "spdlog"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/gnuradio/GnuradioConfig.cmake:13 (find_dependency)
  CMakeLists.txt:30 (find_package)

Therefore, I installed spdlog manually through their repo, I am not sure if the version we are using is the same, but CMake generate build file successfully.

-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'gmp'
--   Found gmp, version 6.2.0
-- Found GMP: /usr/lib/x86_64-linux-gnu/libgmpxx.so
-- Using GMP.
-- Found MPLIB: /usr/lib/x86_64-linux-gnu/libgmpxx.so
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.71.0") found components: date_time program_options system regex thread unit_test_framework
-- Found Volk: Volk::volk
-- User set python executable /usr/bin/python3
-- Found PythonInterp: /usr/bin/python3 (found version "3.8.10")
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so (found suitable exact version "3.8.10")
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Performing Test HAVE_VISIBILITY_HIDDEN
-- Performing Test HAVE_VISIBILITY_HIDDEN - Success
-- Performing Test HAVE_WARN_SIGN_COMPARE
-- Performing Test HAVE_WARN_SIGN_COMPARE - Success
-- Performing Test HAVE_WARN_ALL
-- Performing Test HAVE_WARN_ALL - Success
-- Performing Test HAVE_WARN_NO_UNINITIALIZED
-- Performing Test HAVE_WARN_NO_UNINITIALIZED - Success
-- Found Git: /usr/bin/git
-- Extracting version information from git describe...
fatal: No names found, cannot describe anything.
-- Eigen3 found
-- Using install prefix: /usr/local
-- Building for version: 1.0.0.0 / 1.0.0
-- No C++ unit tests... skipping
-- PYTHON and GRC components are enabled
-- Python checking for pygccxml - found
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
-- Configuring done
-- Generating done
...

(Question) 3.8 based build w/ X310 + Twin RX

When using the real_case_music_test.grc with the Twin RX everything appears to start and run properly. If i change the default center frequency to something in the 90-100MHz range, it looks as though on the MUSIC tab that things start to slow down/get laggy and eventually the Pspectrum has no graphical movement in it whatsoever. Any thing I may be doing wrong when trying to get an angle of arrival on different frequencies?

New to the project, but have always wanted to check it out and I just so happen to temporarily have the equipment to do so.

Make errors

Dear author

Which version of Ubuntu did you use? I have installed gnuradio 3.10 successfully and downloaded your gr-doa code. the cmake was also successful with no errors but the make gave me errors in the middle and did not complete successfully. I am using ubuntu 20. Also what version of dependencies have you used for the gr-doa package?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.