M17_Implementations/SP5WWP/lib/math/rrc.c

68 wiersze
3.3 KiB
C

//--------------------------------------------------------------------
// M17 C library - math/rrc.c
//
// Wojciech Kaczmarski, SP5WWP
// M17 Project, 29 December 2023
//--------------------------------------------------------------------
#include <m17/m17.h>
//sample RRC filter for 48kHz sample rate
//alpha=0.5, span=8, sps=10, gain=sqrt(sps)
const float rrc_taps_10[8*10+1]=
{
-0.003195702904062073f, -0.002930279157647190f, -0.001940667871554463f,
-0.000356087678023658f, 0.001547011339077758f, 0.003389554791179751f,
0.004761898604225673f, 0.005310860846138910f, 0.004824746306020221f,
0.003297923526848786f, 0.000958710871218619f, -0.001749908029791816f,
-0.004238694106631223f, -0.005881783042101693f, -0.006150256456781309f,
-0.004745376707651645f, -0.001704189656473565f, 0.002547854551539951f,
0.007215575568844704f, 0.011231038205363532f, 0.013421952197060707f,
0.012730475385624438f, 0.008449554307303753f, 0.000436744366018287f,
-0.010735380379191660f, -0.023726883538258272f, -0.036498030780605324f,
-0.046500883189991064f, -0.050979050575999614f, -0.047340680079891187f,
-0.033554880492651755f, -0.008513823955725943f, 0.027696543159614194f,
0.073664520037517042f, 0.126689053778116234f, 0.182990955139333916f,
0.238080025892859704f, 0.287235637987091563f, 0.326040247765297220f,
0.350895727088112619f, 0.359452932027607974f, 0.350895727088112619f,
0.326040247765297220f, 0.287235637987091563f, 0.238080025892859704f,
0.182990955139333916f, 0.126689053778116234f, 0.073664520037517042f,
0.027696543159614194f, -0.008513823955725943f, -0.033554880492651755f,
-0.047340680079891187f, -0.050979050575999614f, -0.046500883189991064f,
-0.036498030780605324f, -0.023726883538258272f, -0.010735380379191660f,
0.000436744366018287f, 0.008449554307303753f, 0.012730475385624438f,
0.013421952197060707f, 0.011231038205363532f, 0.007215575568844704f,
0.002547854551539951f, -0.001704189656473565f, -0.004745376707651645f,
-0.006150256456781309f, -0.005881783042101693f, -0.004238694106631223f,
-0.001749908029791816f, 0.000958710871218619f, 0.003297923526848786f,
0.004824746306020221f, 0.005310860846138910f, 0.004761898604225673f,
0.003389554791179751f, 0.001547011339077758f, -0.000356087678023658f,
-0.001940667871554463f, -0.002930279157647190f, -0.003195702904062073f
};
//sample RRC filter for 24kHz sample rate
//alpha=0.5, span=8, sps=5, gain=sqrt(sps)
const float rrc_taps_5[8*5+1]=
{
-0.004519384154389f, -0.002744505321971f,
0.002187793653660f, 0.006734308458208f,
0.006823188093192f, 0.001355815246317f,
-0.005994389201970f, -0.008697733303330f,
-0.002410076268276f, 0.010204314627992f,
0.018981413448435f, 0.011949415510291f,
-0.015182045838927f, -0.051615756197679f,
-0.072094910038768f, -0.047453533621088f,
0.039168634270669f, 0.179164496628150f,
0.336694345124862f, 0.461088271869920f,
0.508340710642860f, 0.461088271869920f,
0.336694345124862f, 0.179164496628150f,
0.039168634270669f, -0.047453533621088f,
-0.072094910038768f, -0.051615756197679f,
-0.015182045838927f, 0.011949415510291f,
0.018981413448435f, 0.010204314627992f,
-0.002410076268276f, -0.008697733303330f,
-0.005994389201970f, 0.001355815246317f,
0.006823188093192f, 0.006734308458208f,
0.002187793653660f, -0.002744505321971f,
-0.004519384154389f
};