mirror of https://github.com/g4klx/MMDVM.git
TX filter coefficients for 48 kHz
This commit is contained in:
parent
e469294348
commit
551eac3140
14
DMRDMOTX.cpp
14
DMRDMOTX.cpp
|
@ -22,10 +22,16 @@
|
|||
#include "Globals.h"
|
||||
#include "DMRSlotType.h"
|
||||
|
||||
// Generated using rcosdesign(0.2, 8, 5, 'sqrt') in MATLAB
|
||||
static q15_t RRC_0_2_FILTER[] = {0, 0, 0, 0, 850, 219, -720, -1548, -1795, -1172, 237, 1927, 3120, 3073, 1447, -1431, -4544, -6442,
|
||||
-5735, -1633, 5651, 14822, 23810, 30367, 32767, 30367, 23810, 14822, 5651, -1633, -5735, -6442,
|
||||
-4544, -1431, 1447, 3073, 3120, 1927, 237, -1172, -1795, -1548, -720, 219, 850}; // numTaps = 45, L = 5
|
||||
// Generated using rcosdesign(0.2, 8, 10, 'sqrt') in MATLAB
|
||||
static q15_t RRC_0_2_FILTER[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 850, 592, 219, -234, -720, -1179,
|
||||
-1548, -1769, -1795, -1597, -1172, -544, 237, 1092, 1927, 2637,
|
||||
3120, 3286, 3073, 2454, 1447, 116, -1431, -3043, -4544, -5739,
|
||||
-6442, -6483, -5735, -4121, -1633, 1669, 5651, 10118, 14822,
|
||||
19484, 23810, 27520, 30367, 32156, 32767, 32156, 30367, 27520,
|
||||
23810, 19484, 14822, 10118, 5651, 1669, -1633, -4121, -5735,
|
||||
-6483, -6442, -5739, -4544, -3043, -1431, 116, 1447, 2454,
|
||||
3073, 3286, 3120, 2637, 1927, 1092, 237, -544, -1172, -1597,
|
||||
-1795, -1769, -1548, -1179, -720, -234, 219, 592, 850}; // numTaps = 90, L = 10
|
||||
const uint16_t RRC_0_2_FILTER_PHASE_LEN = 9U; // phaseLength = numTaps/L
|
||||
|
||||
const q15_t DMR_LEVELA = 1362;
|
||||
|
|
14
DMRTX.cpp
14
DMRTX.cpp
|
@ -22,10 +22,16 @@
|
|||
#include "Globals.h"
|
||||
#include "DMRSlotType.h"
|
||||
|
||||
// Generated using rcosdesign(0.2, 8, 5, 'sqrt') in MATLAB
|
||||
static q15_t RRC_0_2_FILTER[] = {0, 0, 0, 0, 850, 219, -720, -1548, -1795, -1172, 237, 1927, 3120, 3073, 1447, -1431, -4544, -6442,
|
||||
-5735, -1633, 5651, 14822, 23810, 30367, 32767, 30367, 23810, 14822, 5651, -1633, -5735, -6442,
|
||||
-4544, -1431, 1447, 3073, 3120, 1927, 237, -1172, -1795, -1548, -720, 219, 850}; // numTaps = 45, L = 5
|
||||
// Generated using rcosdesign(0.2, 8, 10, 'sqrt') in MATLAB
|
||||
static q15_t RRC_0_2_FILTER[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 850, 592, 219, -234, -720, -1179,
|
||||
-1548, -1769, -1795, -1597, -1172, -544, 237, 1092, 1927, 2637,
|
||||
3120, 3286, 3073, 2454, 1447, 116, -1431, -3043, -4544, -5739,
|
||||
-6442, -6483, -5735, -4121, -1633, 1669, 5651, 10118, 14822,
|
||||
19484, 23810, 27520, 30367, 32156, 32767, 32156, 30367, 27520,
|
||||
23810, 19484, 14822, 10118, 5651, 1669, -1633, -4121, -5735,
|
||||
-6483, -6442, -5739, -4544, -3043, -1431, 116, 1447, 2454,
|
||||
3073, 3286, 3120, 2637, 1927, 1092, 237, -544, -1172, -1597,
|
||||
-1795, -1769, -1548, -1179, -720, -234, 219, 592, 850}; // numTaps = 90, L = 10
|
||||
const uint16_t RRC_0_2_FILTER_PHASE_LEN = 9U; // phaseLength = numTaps/L
|
||||
|
||||
const q15_t DMR_LEVELA = 1362;
|
||||
|
|
|
@ -27,8 +27,10 @@ const uint8_t BIT_SYNC = 0xAAU;
|
|||
|
||||
const uint8_t FRAME_SYNC[] = {0xEAU, 0xA6U, 0x00U};
|
||||
|
||||
// Generated using gaussfir(0.35, 1, 5) in MATLAB
|
||||
static q15_t GAUSSIAN_0_35_FILTER[] = {0, 0, 0, 0, 1001, 3514, 9333, 18751, 28499, 32767, 28499, 18751, 9333, 3514, 1001}; // numTaps = 15, L = 5
|
||||
// Generated using gaussfir(0.35, 1, 10) in MATLAB
|
||||
static q15_t GAUSSIAN_0_35_FILTER[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 1001, 1942, 3514, 5930,
|
||||
9333, 13699, 18751, 23938, 28499, 31644, 32767, 31644,
|
||||
28499, 23938, 18751, 13699, 9333, 5930, 3514, 1942, 1001}; // numTaps = 30, L = 10
|
||||
const uint16_t GAUSSIAN_0_35_FILTER_PHASE_LEN = 3U; // phaseLength = numTaps/L
|
||||
|
||||
const q15_t DSTAR_LEVEL0 = -841;
|
||||
|
@ -196,7 +198,7 @@ m_poLen(0U),
|
|||
m_poPtr(0U),
|
||||
m_txDelay(60U) // 100ms
|
||||
{
|
||||
::memset(m_modState, 0x00U, 20U * sizeof(q15_t));
|
||||
::memset(m_modState, 0x00U, 15U * sizeof(q15_t));
|
||||
|
||||
m_modFilter.L = DSTAR_RADIO_SYMBOL_LENGTH;
|
||||
m_modFilter.phaseLength = GAUSSIAN_0_35_FILTER_PHASE_LEN;
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
private:
|
||||
CSerialRB m_buffer;
|
||||
arm_fir_interpolate_instance_q15 m_modFilter;
|
||||
q15_t m_modState[20U]; // blockSize + phaseLength - 1, 8 + 9 - 1 plus some spare
|
||||
q15_t m_modState[15U]; // blockSize + phaseLength - 1, 8 + 3 - 1 plus some spare
|
||||
uint8_t m_poBuffer[600U];
|
||||
uint16_t m_poLen;
|
||||
uint16_t m_poPtr;
|
||||
|
|
2
IO.cpp
2
IO.cpp
|
@ -23,7 +23,7 @@
|
|||
#include "IO.h"
|
||||
|
||||
// Generated using [b, a] = butter(1, 0.001) in MATLAB
|
||||
static q31_t DC_FILTER[] = {3367972, 0, 3367972, 0, 2140747704, 0}; // {b0, 0, b1, b2, -a1, -a2}
|
||||
static q31_t DC_FILTER[] = {1685306, 0, 1685306, 0, 2144113034, 0}; // {b0, 0, b1, b2, -a1, -a2}
|
||||
const uint32_t DC_FILTER_STAGES = 1U; // One Biquad stage
|
||||
|
||||
// One symbol boxcar filter
|
||||
|
|
14
P25TX.cpp
14
P25TX.cpp
|
@ -23,11 +23,15 @@
|
|||
|
||||
#include "P25Defines.h"
|
||||
|
||||
// Generated using rcosdesign(0.2, 8, 5, 'normal') in MATLAB
|
||||
// numTaps = 40, L = 5
|
||||
static q15_t RC_0_2_FILTER[] = {-897, -1636, -1840, -1278, 0, 1613, 2936, 3310, 2315, 0, -3011, -5627, -6580, -4839,
|
||||
0, 7482, 16311, 24651, 30607, 32767, 30607, 24651, 16311, 7482, 0, -4839, -6580, -5627,
|
||||
-3011, 0, 2315, 3310, 2936, 1613, 0, -1278, -1840, -1636, -897, 0}; // numTaps = 40, L = 5
|
||||
// Generated using rcosdesign(0.2, 8, 10, 'normal') in MATLAB
|
||||
static q15_t RC_0_2_FILTER[] = {-444, -897, -1311, -1636, -1825, -1840, -1659, -1278, -712, 0,
|
||||
800, 1613, 2354, 2936, 3277, 3310, 2994, 2315, 1296, 0, -1478,
|
||||
-3011, -4448, -5627, -6386, -6580, -6090, -4839, -2800, 0, 3474,
|
||||
7482, 11835, 16311, 20666, 24651, 28032, 30607, 32219, 32767,
|
||||
32219, 30607, 28032, 24651, 20666, 16311, 11835, 7482, 3474, 0,
|
||||
-2800, -4839, -6090, -6580, -6386, -5627, -4448, -3011, -1478,
|
||||
0, 1296, 2315, 2994, 3310, 3277, 2936, 2354, 1613, 800, 0, -712,
|
||||
-1278, -1659, -1840, -1825, -1636, -1311, -897, -444, 0}; // numTaps = 80, L = 10
|
||||
const uint16_t RC_0_2_FILTER_PHASE_LEN = 8U; // phaseLength = numTaps/L
|
||||
|
||||
// Generated in MATLAB using the following commands, and then normalised for unity gain
|
||||
|
|
14
YSFTX.cpp
14
YSFTX.cpp
|
@ -23,10 +23,16 @@
|
|||
|
||||
#include "YSFDefines.h"
|
||||
|
||||
// Generated using rcosdesign(0.2, 8, 5, 'sqrt') in MATLAB
|
||||
static q15_t RRC_0_2_FILTER[] = {0, 0, 0, 0, 850, 219, -720, -1548, -1795, -1172, 237, 1927, 3120, 3073, 1447, -1431, -4544, -6442,
|
||||
-5735, -1633, 5651, 14822, 23810, 30367, 32767, 30367, 23810, 14822, 5651, -1633, -5735, -6442,
|
||||
-4544, -1431, 1447, 3073, 3120, 1927, 237, -1172, -1795, -1548, -720, 219, 850}; // numTaps = 45, L = 5
|
||||
// Generated using rcosdesign(0.2, 8, 10, 'sqrt') in MATLAB
|
||||
static q15_t RRC_0_2_FILTER[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 850, 592, 219, -234, -720, -1179,
|
||||
-1548, -1769, -1795, -1597, -1172, -544, 237, 1092, 1927, 2637,
|
||||
3120, 3286, 3073, 2454, 1447, 116, -1431, -3043, -4544, -5739,
|
||||
-6442, -6483, -5735, -4121, -1633, 1669, 5651, 10118, 14822,
|
||||
19484, 23810, 27520, 30367, 32156, 32767, 32156, 30367, 27520,
|
||||
23810, 19484, 14822, 10118, 5651, 1669, -1633, -4121, -5735,
|
||||
-6483, -6442, -5739, -4544, -3043, -1431, 116, 1447, 2454,
|
||||
3073, 3286, 3120, 2637, 1927, 1092, 237, -544, -1172, -1597,
|
||||
-1795, -1769, -1548, -1179, -720, -234, 219, 592, 850}; // numTaps = 90, L = 10
|
||||
const uint16_t RRC_0_2_FILTER_PHASE_LEN = 9U; // phaseLength = numTaps/L
|
||||
|
||||
const q15_t YSF_LEVELA_HI = 1893;
|
||||
|
|
Loading…
Reference in New Issue