\doxysection{DKAB bursts}
\label{group__dkab}\index{DKAB bursts@{DKAB bursts}}
\doxysubsection*{Files}
\begin{DoxyCompactItemize}
\item 
file \textbf{ dkab.\+h}
\begin{DoxyCompactList}\small\item\em Osmocom GMR-\/1 DKABs bursts header. \end{DoxyCompactList}\item 
file \textbf{ dkab.\+c}
\begin{DoxyCompactList}\small\item\em Osmocom GMR-\/1 DKABs bursts implementation. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\label{group__dkab_ga7d4e74423784b0c9e351bc8f6b34a747}} 
\#define {\bfseries GMR1\+\_\+\+DKAB\+\_\+\+SYMS}~(39$\ast$3)
\item 
\mbox{\label{group__dkab_gadd49926a91b1c3ab8c0b96d2fdd7c6e4}} 
\#define {\bfseries DKAB\+\_\+\+PWR\+\_\+\+RATIO\+\_\+\+THRESHOLD}~10.\+0f
\begin{DoxyCompactList}\small\item\em Ratio between peak power and valley power for DKAB detection. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \textbf{ gmr1\+\_\+dkab\+\_\+demod} (struct \textbf{ osmo\+\_\+cxvec} $\ast$burst\+\_\+in, int sps, float freq\+\_\+shift, int p, \textbf{ sbit\+\_\+t} $\ast$ebits, float $\ast$toa\+\_\+p)
\begin{DoxyCompactList}\small\item\em All-\/in-\/one finding and demodulation of DKAB bursts. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}


\doxysubsection{Function Documentation}
\mbox{\label{group__dkab_ga889c2d34cc3eee7b12b8d88023504e0f}} 
\index{DKAB bursts@{DKAB bursts}!gmr1\_dkab\_demod@{gmr1\_dkab\_demod}}
\index{gmr1\_dkab\_demod@{gmr1\_dkab\_demod}!DKAB bursts@{DKAB bursts}}
\doxysubsubsection{gmr1\_dkab\_demod()}
{\footnotesize\ttfamily int gmr1\+\_\+dkab\+\_\+demod (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+cxvec} $\ast$}]{burst\+\_\+in,  }\item[{int}]{sps,  }\item[{float}]{freq\+\_\+shift,  }\item[{int}]{p,  }\item[{\textbf{ sbit\+\_\+t} $\ast$}]{ebits,  }\item[{float $\ast$}]{toa\+\_\+p }\end{DoxyParamCaption})}



All-\/in-\/one finding and demodulation of DKAB bursts. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em burst\+\_\+in} & Complex signal of the burst \\
\hline
\mbox{\texttt{ in}}  & {\em sps} & Oversampling used in the input complex signal \\
\hline
\mbox{\texttt{ in}}  & {\em freq\+\_\+shift} & Frequency shift to pre-\/apply to burst\+\_\+in (rad/sym) \\
\hline
\mbox{\texttt{ in}}  & {\em p} & DKAB position \\
\hline
\mbox{\texttt{ out}}  & {\em ebits} & Encoded soft bits return array \\
\hline
\mbox{\texttt{ out}}  & {\em toa\+\_\+p} & Pointer to TOA return variable \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 for success, 1 if DKAB not found, -\/errno for fatal errors
\end{DoxyReturn}
burst\+\_\+in is expected to be longer than necessary. Any extra length will be used as \textquotesingle{}search window\textquotesingle{} to find proper alignement. Good practice is to have a few samples too much in front and a few samples after the expected TOA. 

References \textbf{ M\+\_\+\+PIf}, and \textbf{ osmo\+\_\+cxvec\+\_\+sig\+\_\+normalize()}.

