Debian Codegraph @

convert.h

raw symbols SCIP
1 // Part of dump1090, a Mode S message decoder for RTLSDR devices.
2 //
3 // convert.h: support for various IQ -> magnitude conversions
4 //
5 // Copyright (c) 2015 Oliver Jowett <[email protected]>
6 //
7 // This file is free software: you may copy, redistribute and/or modify it
8 // under the terms of the GNU General Public License as published by the
9 // Free Software Foundation, either version 2 of the License, or (at your
10 // option) any later version.
11 //
12 // This file is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20 #ifndef DUMP1090_CONVERT_H
21 #define DUMP1090_CONVERT_H
22
23 struct converter_state;
24 typedef enum { INPUT_UC8=0, INPUT_SC16, INPUT_SC16Q11 } input_format_t;
25
26 typedef void (*iq_convert_fn)(void *iq_data,
27 uint16_t *mag_data,
28 unsigned nsamples,
29 struct converter_state *state,
30 double *out_power);
31
32 iq_convert_fn init_converter(input_format_t format,
33 double sample_rate,
34 int filter_dc,
35 struct converter_state **out_state);
36
37 void cleanup_converter(struct converter_state *state);
38
39 #endif