\doxysection{iqbal.\+h}
\label{iqbal_8h_source}\index{include/osmocom/dsp/iqbal.h@{include/osmocom/dsp/iqbal.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 \textcolor{comment}{/*}}
\DoxyCodeLine{2 \textcolor{comment}{ * iqbal.h}}
\DoxyCodeLine{3 \textcolor{comment}{ *}}
\DoxyCodeLine{4 \textcolor{comment}{ * IQ balance correction / estimation utilities}}
\DoxyCodeLine{5 \textcolor{comment}{ *}}
\DoxyCodeLine{6 \textcolor{comment}{ * Copyright (C) 2013  Sylvain Munaut <tnt@246tNt.com>}}
\DoxyCodeLine{7 \textcolor{comment}{ *}}
\DoxyCodeLine{8 \textcolor{comment}{ * All Rights Reserved}}
\DoxyCodeLine{9 \textcolor{comment}{ *}}
\DoxyCodeLine{10 \textcolor{comment}{ * This program is free software; you can redistribute it and/or modify}}
\DoxyCodeLine{11 \textcolor{comment}{ * it under the terms of the GNU General Public License as published by}}
\DoxyCodeLine{12 \textcolor{comment}{ * the Free Software Foundation; either version 2 of the License, or}}
\DoxyCodeLine{13 \textcolor{comment}{ * (at your option) any later version.}}
\DoxyCodeLine{14 \textcolor{comment}{ *}}
\DoxyCodeLine{15 \textcolor{comment}{ * This program is distributed in the hope that it will be useful,}}
\DoxyCodeLine{16 \textcolor{comment}{ * but WITHOUT ANY WARRANTY; without even the implied warranty of}}
\DoxyCodeLine{17 \textcolor{comment}{ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the}}
\DoxyCodeLine{18 \textcolor{comment}{ * GNU General Public License for more details.}}
\DoxyCodeLine{19 \textcolor{comment}{ *}}
\DoxyCodeLine{20 \textcolor{comment}{ * You should have received a copy of the GNU General Public License along}}
\DoxyCodeLine{21 \textcolor{comment}{ * with this program; if not, write to the Free Software Foundation, Inc.,}}
\DoxyCodeLine{22 \textcolor{comment}{ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-\/1301 USA.}}
\DoxyCodeLine{23 \textcolor{comment}{ */}}
\DoxyCodeLine{24 }
\DoxyCodeLine{25 \textcolor{preprocessor}{\#ifndef \_\_OSMO\_DSP\_IQBAL\_H\_\_}}
\DoxyCodeLine{26 \textcolor{preprocessor}{\#define \_\_OSMO\_DSP\_IQBAL\_H\_\_}}
\DoxyCodeLine{27 }
\DoxyCodeLine{36 \textcolor{preprocessor}{\#include <complex.h>}}
\DoxyCodeLine{37 }
\DoxyCodeLine{38 \textcolor{preprocessor}{\#include <osmocom/dsp/cxvec.h>}}
\DoxyCodeLine{39 }
\DoxyCodeLine{40 }
\DoxyCodeLine{41 \textcolor{comment}{/* IQ balance correction and estimation */}}
\DoxyCodeLine{42 }
\DoxyCodeLine{43 \textcolor{keywordtype}{void} osmo\_iqbal\_fix(\textcolor{keywordtype}{float} complex *out, \textcolor{keywordtype}{float} complex *in, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} len,}
\DoxyCodeLine{44                     \textcolor{keywordtype}{float} mag, \textcolor{keywordtype}{float} phase);}
\DoxyCodeLine{45 }
\DoxyCodeLine{46 \textcolor{keyword}{struct }osmo\_cxvec *}
\DoxyCodeLine{47 osmo\_iqbal\_cxvec\_fix(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_cxvec *in, \textcolor{keywordtype}{float} mag, \textcolor{keywordtype}{float} phase,}
\DoxyCodeLine{48                      \textcolor{keyword}{struct} osmo\_cxvec *out);}
\DoxyCodeLine{49 }
\DoxyCodeLine{50 \textcolor{keywordtype}{float}}
\DoxyCodeLine{51 osmo\_iqbal\_estimate(\textcolor{keyword}{const} \textcolor{keywordtype}{float} complex *data,}
\DoxyCodeLine{52                     \textcolor{keywordtype}{int} fft\_size, \textcolor{keywordtype}{int} fft\_count);}
\DoxyCodeLine{53 }
\DoxyCodeLine{54 \textcolor{keywordtype}{float}}
\DoxyCodeLine{55 osmo\_iqbal\_cxvec\_estimate(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_cxvec *sig,}
\DoxyCodeLine{56                           \textcolor{keywordtype}{int} fft\_size, \textcolor{keywordtype}{int} fft\_count);}
\DoxyCodeLine{57 }
\DoxyCodeLine{58 }
\DoxyCodeLine{59 \textcolor{comment}{/* IQ balance optimization */} }
\DoxyCodeLine{60 }
\DoxyCodeLine{62 \textcolor{keyword}{struct }osmo\_iqbal\_opts \{}
\DoxyCodeLine{63         \textcolor{keywordtype}{int} fft\_size;           }
\DoxyCodeLine{64         \textcolor{keywordtype}{int} fft\_count;         }
\DoxyCodeLine{65         \textcolor{keywordtype}{int} max\_iter;           }
\DoxyCodeLine{66         \textcolor{keywordtype}{int} start\_at\_prev; }
\DoxyCodeLine{67 \};}
\DoxyCodeLine{68 }
\DoxyCodeLine{69 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }osmo\_iqbal\_opts osmo\_iqbal\_default\_opts;}
\DoxyCodeLine{70 }
\DoxyCodeLine{71 \textcolor{keywordtype}{int}}
\DoxyCodeLine{72 osmo\_iqbal\_cxvec\_optimize(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_cxvec *sig, \textcolor{keywordtype}{float} *mag, \textcolor{keywordtype}{float} *phase,}
\DoxyCodeLine{73                           \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_iqbal\_opts *opts);}
\DoxyCodeLine{74 }
\DoxyCodeLine{77 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* \_\_OSMO\_DSP\_IQBAL\_H\_\_ */}\textcolor{preprocessor}{}}

\end{DoxyCode}
