Finish committing the last change.

This commit is contained in:
Jonathan Naylor 2017-04-15 10:22:56 +01:00
parent c7eb072d2f
commit a6ed1e9667
6 changed files with 83 additions and 68 deletions

View file

@ -25,18 +25,18 @@
// Generated using rcosdesign(0.2, 8, 5, 'normal') in MATLAB
// numTaps = 40, L = 5
static q15_t P25_C4FSK_FILTER[] = {-413, -751, -845, -587, 0, 740, 1348, 1520, 1063, 0, -1383, -2583, -3021, -2222, 0, 3435, 7488, 11318, 14053, 15044, 14053,
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};
const uint16_t P25_C4FSK_FILTER_PHASE_LEN = 8U; // phaseLength = numTaps/L
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);
// h2 = design(d2, 'SystemObject', true);
static q15_t P25_LP_FILTER[] = {170, 401, 340, -203, -715, -478, 281, 419, -440, -1002, -103, 1114, 528, -1389, -1520, 1108, 2674, -388, -4662,
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 P25_LP_FILTER_LEN = 44U;
const uint16_t LOWPASS_FILTER_LEN = 44U;
const q15_t P25_LEVELA = 1698;
const q15_t P25_LEVELB = 566;
@ -59,14 +59,14 @@ m_txDelay(240U) // 200ms
::memset(m_modState, 0x00U, 16U * sizeof(q15_t));
::memset(m_lpState, 0x00U, 70U * sizeof(q15_t));
m_modFilter.L = P25_RADIO_SYMBOL_LENGTH;
m_modFilter.phaseLength = P25_C4FSK_FILTER_PHASE_LEN;
m_modFilter.pCoeffs = P25_C4FSK_FILTER;
m_modFilter.pState = m_modState;
m_modFilter.L = P25_RADIO_SYMBOL_LENGTH;
m_modFilter.phaseLength = RC_0_2_FILTER_PHASE_LEN;
m_modFilter.pCoeffs = RC_0_2_FILTER;
m_modFilter.pState = m_modState;
m_lpFilter.numTaps = P25_LP_FILTER_LEN;
m_lpFilter.numTaps = LOWPASS_FILTER_LEN;
m_lpFilter.pState = m_lpState;
m_lpFilter.pCoeffs = P25_LP_FILTER;
m_lpFilter.pCoeffs = LOWPASS_FILTER;
}
void CP25TX::process()