mirror of https://github.com/markqvist/MMDVM.git
Fixing TX inverse SINC filter for P25, and change TX filters for gain=1
parent
1b48c4de1c
commit
f31cceac18
14
DMRDMOTX.cpp
14
DMRDMOTX.cpp
|
@ -23,15 +23,15 @@
|
|||
#include "DMRSlotType.h"
|
||||
|
||||
// Generated using rcosdesign(0.2, 8, 5, 'sqrt') in MATLAB
|
||||
static q15_t RRC_0_2_FILTER[] = {0, 0, 0, 0, 401, 104, -340, -731, -847, -553, 112, 909, 1472, 1450, 683, -675, -2144, -3040, -2706, -770, 2667, 6995,
|
||||
11237, 14331, 15464, 14331, 11237, 6995, 2667, -770, -2706, -3040, -2144, -675, 683, 1450, 1472, 909, 112,
|
||||
-553, -847, -731, -340, 104, 401}; // numTaps = 45, L = 5
|
||||
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
|
||||
const uint16_t RRC_0_2_FILTER_PHASE_LEN = 9U; // phaseLength = numTaps/L
|
||||
|
||||
const q15_t DMR_LEVELA = 2889;
|
||||
const q15_t DMR_LEVELB = 963;
|
||||
const q15_t DMR_LEVELC = -963;
|
||||
const q15_t DMR_LEVELD = -2889;
|
||||
const q15_t DMR_LEVELA = 1362;
|
||||
const q15_t DMR_LEVELB = 454;
|
||||
const q15_t DMR_LEVELC = -454;
|
||||
const q15_t DMR_LEVELD = -1362;
|
||||
|
||||
// The PR FILL and BS Data Sync pattern.
|
||||
const uint8_t IDLE_DATA[] =
|
||||
|
|
14
DMRTX.cpp
14
DMRTX.cpp
|
@ -23,15 +23,15 @@
|
|||
#include "DMRSlotType.h"
|
||||
|
||||
// Generated using rcosdesign(0.2, 8, 5, 'sqrt') in MATLAB
|
||||
static q15_t RRC_0_2_FILTER[] = {0, 0, 0, 0, 401, 104, -340, -731, -847, -553, 112, 909, 1472, 1450, 683, -675, -2144, -3040, -2706, -770, 2667, 6995,
|
||||
11237, 14331, 15464, 14331, 11237, 6995, 2667, -770, -2706, -3040, -2144, -675, 683, 1450, 1472, 909, 112,
|
||||
-553, -847, -731, -340, 104, 401}; // numTaps = 45, L = 5
|
||||
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
|
||||
const uint16_t RRC_0_2_FILTER_PHASE_LEN = 9U; // phaseLength = numTaps/L
|
||||
|
||||
const q15_t DMR_LEVELA = 2889;
|
||||
const q15_t DMR_LEVELB = 963;
|
||||
const q15_t DMR_LEVELC = -963;
|
||||
const q15_t DMR_LEVELD = -2889;
|
||||
const q15_t DMR_LEVELA = 1362;
|
||||
const q15_t DMR_LEVELB = 454;
|
||||
const q15_t DMR_LEVELC = -454;
|
||||
const q15_t DMR_LEVELD = -1362;
|
||||
|
||||
// The PR FILL and BS Data Sync pattern.
|
||||
const uint8_t IDLE_DATA[] =
|
||||
|
|
|
@ -28,11 +28,11 @@ 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, 212, 743, 1974, 3965, 6026, 6929, 6026, 3965, 1974, 743, 212}; // numTaps = 15, L = 5
|
||||
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
|
||||
const uint16_t GAUSSIAN_0_35_FILTER_PHASE_LEN = 3U; // phaseLength = numTaps/L
|
||||
|
||||
const q15_t DSTAR_LEVEL0 = -4000;
|
||||
const q15_t DSTAR_LEVEL1 = 4000;
|
||||
const q15_t DSTAR_LEVEL0 = -841;
|
||||
const q15_t DSTAR_LEVEL1 = 841;
|
||||
|
||||
const uint8_t BIT_MASK_TABLE[] = {0x80U, 0x40U, 0x20U, 0x10U, 0x08U, 0x04U, 0x02U, 0x01U};
|
||||
|
||||
|
|
21
P25TX.cpp
21
P25TX.cpp
|
@ -25,23 +25,22 @@
|
|||
|
||||
// Generated using rcosdesign(0.2, 8, 5, 'normal') in MATLAB
|
||||
// numTaps = 40, L = 5
|
||||
static q15_t RC_0_2_FILTER[] = {-413, -751, -845, -587, 0, 740, 1348, 1520, 1063, 0, -1383, -2583, -3021, -2222, 0, 3435, 7488, 11318, 14053, 15044, 14053,
|
||||
11318, 7488, 3435, 0, -2222, -3021, -2583, -1383, 0, 1063, 1520, 1348, 740, 0, -587, -845, -751, -413, 0};
|
||||
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
|
||||
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
|
||||
// shape2 = 'Inverse-sinc Lowpass';
|
||||
// d2 = fdesign.interpolator(2, shape2);
|
||||
// d2 = fdesign.interpolator(1, shape2);
|
||||
// h2 = design(d2, 'SystemObject', true);
|
||||
static q15_t LOWPASS_FILTER[] = {170, 401, 340, -203, -715, -478, 281, 419, -440, -1002, -103, 1114, 528, -1389, -1520, 1108, 2674, -388, -4662,
|
||||
-2132, 9168, 20241, 20241, 9168, -2132, -4662, -388, 2674, 1108, -1520, -1389, 528, 1114, -103, -1002, -440, 419,
|
||||
281, -478, -715, -203, 340, 401, 170};
|
||||
const uint16_t LOWPASS_FILTER_LEN = 44U;
|
||||
static q15_t LOWPASS_FILTER[] = {1376, -2393, 4584, -8933, 22325, 22325, -8933, 4584, -2393, 1376};
|
||||
const uint16_t LOWPASS_FILTER_LEN = 10U;
|
||||
|
||||
const q15_t P25_LEVELA = 1698;
|
||||
const q15_t P25_LEVELB = 566;
|
||||
const q15_t P25_LEVELC = -566;
|
||||
const q15_t P25_LEVELD = -1698;
|
||||
const q15_t P25_LEVELA = 1260;
|
||||
const q15_t P25_LEVELB = 420;
|
||||
const q15_t P25_LEVELC = -420;
|
||||
const q15_t P25_LEVELD = -1260;
|
||||
|
||||
const uint8_t P25_START_SYNC = 0x77U;
|
||||
|
||||
|
|
22
YSFTX.cpp
22
YSFTX.cpp
|
@ -24,20 +24,20 @@
|
|||
#include "YSFDefines.h"
|
||||
|
||||
// Generated using rcosdesign(0.2, 8, 5, 'sqrt') in MATLAB
|
||||
static q15_t RRC_0_2_FILTER[] = {0, 0, 0, 0, 401, 104, -340, -731, -847, -553, 112, 909, 1472, 1450, 683, -675, -2144, -3040, -2706, -770, 2667, 6995,
|
||||
11237, 14331, 15464, 14331, 11237, 6995, 2667, -770, -2706, -3040, -2144, -675, 683, 1450, 1472, 909, 112,
|
||||
-553, -847, -731, -340, 104, 401}; // numTaps = 45, L = 5
|
||||
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
|
||||
const uint16_t RRC_0_2_FILTER_PHASE_LEN = 9U; // phaseLength = numTaps/L
|
||||
|
||||
const q15_t YSF_LEVELA_HI = 3900;
|
||||
const q15_t YSF_LEVELB_HI = 1300;
|
||||
const q15_t YSF_LEVELC_HI = -1300;
|
||||
const q15_t YSF_LEVELD_HI = -3900;
|
||||
const q15_t YSF_LEVELA_HI = 1893;
|
||||
const q15_t YSF_LEVELB_HI = 631;
|
||||
const q15_t YSF_LEVELC_HI = -631;
|
||||
const q15_t YSF_LEVELD_HI = -1893;
|
||||
|
||||
const q15_t YSF_LEVELA_LO = 1950;
|
||||
const q15_t YSF_LEVELB_LO = 650;
|
||||
const q15_t YSF_LEVELC_LO = -650;
|
||||
const q15_t YSF_LEVELD_LO = -1950;
|
||||
const q15_t YSF_LEVELA_LO = 948;
|
||||
const q15_t YSF_LEVELB_LO = 316;
|
||||
const q15_t YSF_LEVELC_LO = -316;
|
||||
const q15_t YSF_LEVELD_LO = -948;
|
||||
|
||||
const uint8_t YSF_START_SYNC = 0x77U;
|
||||
const uint8_t YSF_END_SYNC = 0xFFU;
|
||||
|
|
Loading…
Reference in New Issue