gr-baz Package
baz_music_doa.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2011 Communications Engineering Lab, KIT
4 *
5 * This is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3, or (at your option)
8 * any later version.
9 *
10 * This software is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this software; see the file COPYING. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street,
18 * Boston, MA 02110-1301, USA.
19 */
20
21#ifndef INCLUDED_BAZ_MUSIC_DOA_H
22#define INCLUDED_BAZ_MUSIC_DOA_H
23
24#include <gnuradio/sync_block.h>
25#include <vector>
26#include <armadillo>
27#include <gnuradio/thread/thread.h>
28
29class baz_music_doa;
30typedef boost::shared_ptr<baz_music_doa> baz_music_doa_sptr;
31
32typedef std::vector<gr_complex> antenna_response_t;
33typedef std::vector<antenna_response_t> array_response_t;
34typedef std::pair<double,double> doa_t;
35
36baz_music_doa_sptr baz_make_music_doa(unsigned int m, unsigned int n, unsigned int nsamples, const array_response_t& array_response, unsigned int resolution);
37
38class baz_music_doa : public gr::sync_block
39{
40private:
41 friend baz_music_doa_sptr baz_make_music_doa(unsigned int m, unsigned int n, unsigned int nsamples, const array_response_t& array_response, unsigned int resolution);
42
43 baz_music_doa(unsigned int m, unsigned int n, unsigned int nsamples, const array_response_t& array_response, unsigned int resolution);
44
45public:
47
48 int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
49
50private:
51 unsigned int d_m;
52 unsigned int d_n;
53 unsigned int d_nsamples;
54 array_response_t d_array_response;
55 unsigned int d_resolution;
56 gr::thread::mutex d_mutex;
57
58public:
59 void set_array_response(const array_response_t& array_response);
60};
61
62#endif /* INCLUDED_BAZ_MUSIC_DOA_H */
std::pair< double, double > doa_t
Definition baz_music_doa.h:34
baz_music_doa_sptr baz_make_music_doa(unsigned int m, unsigned int n, unsigned int nsamples, const array_response_t &array_response, unsigned int resolution)
std::vector< gr_complex > antenna_response_t
Definition baz_music_doa.h:32
std::vector< antenna_response_t > array_response_t
Definition baz_music_doa.h:33
Definition baz_music_doa.h:39
friend baz_music_doa_sptr baz_make_music_doa(unsigned int m, unsigned int n, unsigned int nsamples, const array_response_t &array_response, unsigned int resolution)
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
void set_array_response(const array_response_t &array_response)