\doxysection{pi4cxpsk.\+h} \label{pi4cxpsk_8h_source}\index{include/osmocom/gmr1/sdr/pi4cxpsk.h@{include/osmocom/gmr1/sdr/pi4cxpsk.h}} \textbf{ Go to the documentation of this file.} \begin{DoxyCode}{0} \DoxyCodeLine{1 \textcolor{comment}{/* GMR-\/1 SDR -\/ pi2-\/CBPSK, pi4-\/CBPSK and pi4-\/CQPSK modulation support */}} \DoxyCodeLine{2 \textcolor{comment}{/* See GMR-\/1 05.004 (ETSI TS 101 376-\/5-\/4 V1.2.1) -\/ Section 5.1 \& 5.2 */}} \DoxyCodeLine{3 } \DoxyCodeLine{4 \textcolor{comment}{/* (C) 2011-\/2019 by Sylvain Munaut }} \DoxyCodeLine{5 \textcolor{comment}{ * All Rights Reserved}} \DoxyCodeLine{6 \textcolor{comment}{ *}} \DoxyCodeLine{7 \textcolor{comment}{ * This program is free software; you can redistribute it and/or modify}} \DoxyCodeLine{8 \textcolor{comment}{ * it under the terms of the GNU Affero General Public License as published by}} \DoxyCodeLine{9 \textcolor{comment}{ * the Free Software Foundation; either version 3 of the License, or}} \DoxyCodeLine{10 \textcolor{comment}{ * (at your option) any later version.}} \DoxyCodeLine{11 \textcolor{comment}{ *}} \DoxyCodeLine{12 \textcolor{comment}{ * This program is distributed in the hope that it will be useful,}} \DoxyCodeLine{13 \textcolor{comment}{ * but WITHOUT ANY WARRANTY; without even the implied warranty of}} \DoxyCodeLine{14 \textcolor{comment}{ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the}} \DoxyCodeLine{15 \textcolor{comment}{ * GNU Affero General Public License for more details.}} \DoxyCodeLine{16 \textcolor{comment}{ *}} \DoxyCodeLine{17 \textcolor{comment}{ * You should have received a copy of the GNU Affero General Public License}} \DoxyCodeLine{18 \textcolor{comment}{ * along with this program. If not, see .}} \DoxyCodeLine{19 \textcolor{comment}{ */}} \DoxyCodeLine{20 } \DoxyCodeLine{21 \textcolor{preprocessor}{\#ifndef \_\_OSMO\_GMR1\_SDR\_PI4CXPSK\_H\_\_}} \DoxyCodeLine{22 \textcolor{preprocessor}{\#define \_\_OSMO\_GMR1\_SDR\_PI4CXPSK\_H\_\_}} \DoxyCodeLine{23 } \DoxyCodeLine{33 \textcolor{preprocessor}{\#include }} \DoxyCodeLine{34 \textcolor{preprocessor}{\#include }} \DoxyCodeLine{35 \textcolor{preprocessor}{\#include }} \DoxyCodeLine{36 } \DoxyCodeLine{37 } \DoxyCodeLine{38 \textcolor{preprocessor}{\#define GMR1\_MAX\_SYM\_EBITS 2 }} \DoxyCodeLine{39 \textcolor{preprocessor}{\#define GMR1\_MAX\_SYNC 4 }} \DoxyCodeLine{40 \textcolor{preprocessor}{\#define GMR1\_MAX\_SYNC\_SYMS 32 }} \DoxyCodeLine{44 \textcolor{keyword}{struct }gmr1\_pi4cxpsk\_symbol \{} \DoxyCodeLine{45 \textcolor{keywordtype}{short} idx; } \DoxyCodeLine{46 ubit\_t data[GMR1\_MAX\_SYM\_EBITS];} \DoxyCodeLine{47 \textcolor{keywordtype}{float} mod\_phase; } \DoxyCodeLine{48 \textcolor{keywordtype}{float} complex mod\_val; } \DoxyCodeLine{49 \};} \DoxyCodeLine{50 } \DoxyCodeLine{52 \textcolor{keyword}{struct }gmr1\_pi4cxpsk\_modulation \{} \DoxyCodeLine{53 \textcolor{keywordtype}{float} rotation; } \DoxyCodeLine{54 \textcolor{keywordtype}{int} nbits; } \DoxyCodeLine{55 \textcolor{keyword}{struct }gmr1\_pi4cxpsk\_symbol *syms; } \DoxyCodeLine{56 \textcolor{keyword}{struct }gmr1\_pi4cxpsk\_symbol *bits; } \DoxyCodeLine{57 \};} \DoxyCodeLine{58 } \DoxyCodeLine{59 } \DoxyCodeLine{60 \textcolor{keyword}{extern} \textcolor{keyword}{struct }gmr1\_pi4cxpsk\_modulation gmr1\_pi2cbpsk;} \DoxyCodeLine{61 \textcolor{keyword}{extern} \textcolor{keyword}{struct }gmr1\_pi4cxpsk\_modulation gmr1\_pi4cbpsk;} \DoxyCodeLine{62 \textcolor{keyword}{extern} \textcolor{keyword}{struct }gmr1\_pi4cxpsk\_modulation gmr1\_pi4cqpsk;} \DoxyCodeLine{63 } \DoxyCodeLine{64 } \DoxyCodeLine{66 \textcolor{keyword}{struct }gmr1\_pi4cxpsk\_sync \{} \DoxyCodeLine{67 \textcolor{keywordtype}{int} pos; } \DoxyCodeLine{68 \textcolor{keywordtype}{int} len; } \DoxyCodeLine{69 uint8\_t syms[GMR1\_MAX\_SYNC\_SYMS]; } \DoxyCodeLine{70 \textcolor{keyword}{struct }osmo\_cxvec *\_ref; } \DoxyCodeLine{71 \};} \DoxyCodeLine{72 } \DoxyCodeLine{74 \textcolor{keyword}{struct }gmr1\_pi4cxpsk\_data \{} \DoxyCodeLine{75 \textcolor{keywordtype}{int} pos; } \DoxyCodeLine{76 \textcolor{keywordtype}{int} len; } \DoxyCodeLine{77 \};} \DoxyCodeLine{78 } \DoxyCodeLine{80 \textcolor{keyword}{struct }gmr1\_pi4cxpsk\_burst \{} \DoxyCodeLine{82 \textcolor{keyword}{struct }gmr1\_pi4cxpsk\_modulation *mod;} \DoxyCodeLine{83 } \DoxyCodeLine{85 \textcolor{keywordtype}{int} guard\_pre;} \DoxyCodeLine{87 \textcolor{keywordtype}{int} guard\_post;} \DoxyCodeLine{88 } \DoxyCodeLine{90 \textcolor{keywordtype}{int} len;} \DoxyCodeLine{92 \textcolor{keywordtype}{int} ebits;} \DoxyCodeLine{93 } \DoxyCodeLine{95 \textcolor{keyword}{struct }gmr1\_pi4cxpsk\_sync *sync[GMR1\_MAX\_SYNC];} \DoxyCodeLine{97 \textcolor{keyword}{struct }gmr1\_pi4cxpsk\_data *data;} \DoxyCodeLine{98 \};} \DoxyCodeLine{99 } \DoxyCodeLine{100 } \DoxyCodeLine{101 \textcolor{keywordtype}{int}} \DoxyCodeLine{102 gmr1\_pi4cxpsk\_demod(\textcolor{keyword}{struct} gmr1\_pi4cxpsk\_burst *burst\_type,} \DoxyCodeLine{103 \textcolor{keyword}{struct} osmo\_cxvec *burst\_in, \textcolor{keywordtype}{int} sps, \textcolor{keywordtype}{float} freq\_shift,} \DoxyCodeLine{104 sbit\_t *ebits,} \DoxyCodeLine{105 \textcolor{keywordtype}{int} *sync\_id\_p, \textcolor{keywordtype}{float} *toa\_p, \textcolor{keywordtype}{float} *freq\_err\_p);} \DoxyCodeLine{106 } \DoxyCodeLine{107 \textcolor{keywordtype}{int}} \DoxyCodeLine{108 gmr1\_pi4cxpsk\_detect(\textcolor{keyword}{struct} gmr1\_pi4cxpsk\_burst **burst\_types, \textcolor{keywordtype}{float} e\_toa,} \DoxyCodeLine{109 \textcolor{keyword}{struct} osmo\_cxvec *burst\_in, \textcolor{keywordtype}{int} sps, \textcolor{keywordtype}{float} freq\_shift,} \DoxyCodeLine{110 \textcolor{keywordtype}{int} *bt\_id\_p, \textcolor{keywordtype}{int} *sync\_id\_p, \textcolor{keywordtype}{float} *toa\_p);} \DoxyCodeLine{111 } \DoxyCodeLine{112 \textcolor{keywordtype}{int}} \DoxyCodeLine{113 gmr1\_pi4cxpsk\_mod\_order(\textcolor{keyword}{struct} osmo\_cxvec *burst\_in, \textcolor{keywordtype}{int} sps, \textcolor{keywordtype}{float} freq\_shift);} \DoxyCodeLine{114 } \DoxyCodeLine{115 \textcolor{keywordtype}{int}} \DoxyCodeLine{116 gmr1\_pi4cxpsk\_mod(\textcolor{keyword}{struct} gmr1\_pi4cxpsk\_burst *burst\_type,} \DoxyCodeLine{117 ubit\_t *ebits, \textcolor{keywordtype}{int} sync\_id, \textcolor{keyword}{struct} osmo\_cxvec *burst\_out);} \DoxyCodeLine{118 } \DoxyCodeLine{119 } \DoxyCodeLine{122 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* \_\_OSMO\_GMR1\_SDR\_PI4CXPSK\_H\_\_ */}\textcolor{preprocessor}{}} \end{DoxyCode}