mirror of https://github.com/g4klx/MMDVM.git
Remove the optional wide filters for C4FSK modes.
This commit is contained in:
parent
9386fb2e11
commit
caa73c6c4a
5
Config.h
5
Config.h
|
@ -60,11 +60,6 @@
|
||||||
// Use separate mode pins to switch external filters/bandwidth for example
|
// Use separate mode pins to switch external filters/bandwidth for example
|
||||||
// #define STM32F4_NUCLEO_MODE_PINS
|
// #define STM32F4_NUCLEO_MODE_PINS
|
||||||
|
|
||||||
// To use wider C4FSK filters for DMR, System Fusion and P25 on transmit
|
|
||||||
// #define WIDE_C4FSK_FILTERS_TX
|
|
||||||
// To use wider C4FSK filters for DMR, System Fusion and P25 on receive
|
|
||||||
// #define WIDE_C4FSK_FILTERS_RX
|
|
||||||
|
|
||||||
// Pass RSSI information to the host
|
// Pass RSSI information to the host
|
||||||
// #define SEND_RSSI_DATA
|
// #define SEND_RSSI_DATA
|
||||||
|
|
||||||
|
|
|
@ -22,18 +22,11 @@
|
||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
#include "DMRSlotType.h"
|
#include "DMRSlotType.h"
|
||||||
|
|
||||||
#if defined(WIDE_C4FSK_FILTERS_TX)
|
|
||||||
// Generated using rcosdesign(0.2, 4, 5, 'sqrt') in MATLAB
|
|
||||||
static q15_t DMR_C4FSK_FILTER[] = {0, 0, 0, 0, 688, -680, -2158, -3060, -2724, -775, 2684, 7041, 11310, 14425, 15565, 14425,
|
|
||||||
11310, 7041, 2684, -775, -2724, -3060, -2158, -680, 688}; // numTaps = 25, L = 5
|
|
||||||
const uint16_t DMR_C4FSK_FILTER_PHASE_LEN = 5U; // phaseLength = numTaps/L
|
|
||||||
#else
|
|
||||||
// Generated using rcosdesign(0.2, 8, 5, 'sqrt') in MATLAB
|
// Generated using rcosdesign(0.2, 8, 5, 'sqrt') in MATLAB
|
||||||
static q15_t DMR_C4FSK_FILTER[] = {0, 0, 0, 0, 401, 104, -340, -731, -847, -553, 112, 909, 1472, 1450, 683, -675, -2144, -3040, -2706, -770, 2667, 6995,
|
static q15_t DMR_C4FSK_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,
|
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
|
-553, -847, -731, -340, 104, 401}; // numTaps = 45, L = 5
|
||||||
const uint16_t DMR_C4FSK_FILTER_PHASE_LEN = 9U; // phaseLength = numTaps/L
|
const uint16_t DMR_C4FSK_FILTER_PHASE_LEN = 9U; // phaseLength = numTaps/L
|
||||||
#endif
|
|
||||||
|
|
||||||
const q15_t DMR_LEVELA = 2889;
|
const q15_t DMR_LEVELA = 2889;
|
||||||
const q15_t DMR_LEVELB = 963;
|
const q15_t DMR_LEVELB = 963;
|
||||||
|
|
|
@ -22,18 +22,11 @@
|
||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
#include "DMRSlotType.h"
|
#include "DMRSlotType.h"
|
||||||
|
|
||||||
#if defined(WIDE_C4FSK_FILTERS_TX)
|
|
||||||
// Generated using rcosdesign(0.2, 4, 5, 'sqrt') in MATLAB
|
|
||||||
static q15_t DMR_C4FSK_FILTER[] = {0, 0, 0, 0, 688, -680, -2158, -3060, -2724, -775, 2684, 7041, 11310, 14425, 15565, 14425,
|
|
||||||
11310, 7041, 2684, -775, -2724, -3060, -2158, -680, 688}; // numTaps = 25, L = 5
|
|
||||||
const uint16_t DMR_C4FSK_FILTER_PHASE_LEN = 5U; // phaseLength = numTaps/L
|
|
||||||
#else
|
|
||||||
// Generated using rcosdesign(0.2, 8, 5, 'sqrt') in MATLAB
|
// Generated using rcosdesign(0.2, 8, 5, 'sqrt') in MATLAB
|
||||||
static q15_t DMR_C4FSK_FILTER[] = {0, 0, 0, 0, 401, 104, -340, -731, -847, -553, 112, 909, 1472, 1450, 683, -675, -2144, -3040, -2706, -770, 2667, 6995,
|
static q15_t DMR_C4FSK_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,
|
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
|
-553, -847, -731, -340, 104, 401}; // numTaps = 45, L = 5
|
||||||
const uint16_t DMR_C4FSK_FILTER_PHASE_LEN = 9U; // phaseLength = numTaps/L
|
const uint16_t DMR_C4FSK_FILTER_PHASE_LEN = 9U; // phaseLength = numTaps/L
|
||||||
#endif
|
|
||||||
|
|
||||||
const q15_t DMR_LEVELA = 2889;
|
const q15_t DMR_LEVELA = 2889;
|
||||||
const q15_t DMR_LEVELB = 963;
|
const q15_t DMR_LEVELB = 963;
|
||||||
|
|
7
IO.cpp
7
IO.cpp
|
@ -22,18 +22,11 @@
|
||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
#include "IO.h"
|
#include "IO.h"
|
||||||
|
|
||||||
#if defined(WIDE_C4FSK_FILTERS_RX)
|
|
||||||
// Generated using rcosdesign(0.2, 4, 5, 'sqrt') in MATLAB
|
|
||||||
static q15_t C4FSK_FILTER[] = {688, -680, -2158, -3060, -2724, -775, 2684, 7041, 11310, 14425, 15565, 14425,
|
|
||||||
11310, 7041, 2684, -775, -2724, -3060, -2158, -680, 688, 0};
|
|
||||||
const uint16_t C4FSK_FILTER_LEN = 22U;
|
|
||||||
#else
|
|
||||||
// Generated using rcosdesign(0.2, 8, 5, 'sqrt') in MATLAB
|
// Generated using rcosdesign(0.2, 8, 5, 'sqrt') in MATLAB
|
||||||
static q15_t C4FSK_FILTER[] = {401, 104, -340, -731, -847, -553, 112, 909, 1472, 1450, 683, -675, -2144, -3040, -2706, -770, 2667, 6995,
|
static q15_t C4FSK_FILTER[] = {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,
|
11237, 14331, 15464, 14331, 11237, 6995, 2667, -770, -2706, -3040, -2144, -675, 683, 1450, 1472, 909, 112,
|
||||||
-553, -847, -731, -340, 104, 401, 0};
|
-553, -847, -731, -340, 104, 401, 0};
|
||||||
const uint16_t C4FSK_FILTER_LEN = 42U;
|
const uint16_t C4FSK_FILTER_LEN = 42U;
|
||||||
#endif
|
|
||||||
|
|
||||||
// Generated using gaussfir(0.5, 4, 5) in MATLAB
|
// Generated using gaussfir(0.5, 4, 5) in MATLAB
|
||||||
static q15_t GMSK_FILTER[] = {8, 104, 760, 3158, 7421, 9866, 7421, 3158, 760, 104, 8, 0};
|
static q15_t GMSK_FILTER[] = {8, 104, 760, 3158, 7421, 9866, 7421, 3158, 760, 104, 8, 0};
|
||||||
|
|
|
@ -23,18 +23,11 @@
|
||||||
|
|
||||||
#include "P25Defines.h"
|
#include "P25Defines.h"
|
||||||
|
|
||||||
#if defined(WIDE_C4FSK_FILTERS_TX)
|
|
||||||
// Generated using rcosdesign(0.2, 4, 5, 'normal') in MATLAB
|
|
||||||
// numTaps = 20, L = 5
|
|
||||||
static q15_t P25_C4FSK_FILTER[] = {-1392, -2602, -3043, -2238, 0, 3460, 7543, 11400, 14153, 15152, 14153, 11400, 7543, 3460, 0, -2238, -3043, -2602, -1392, 0};
|
|
||||||
const uint16_t P25_C4FSK_FILTER_PHASE_LEN = 4U; // phaseLength = numTaps/L
|
|
||||||
#else
|
|
||||||
// Generated using rcosdesign(0.2, 8, 5, 'normal') in MATLAB
|
// Generated using rcosdesign(0.2, 8, 5, 'normal') in MATLAB
|
||||||
// numTaps = 40, L = 5
|
// 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 P25_C4FSK_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};
|
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 P25_C4FSK_FILTER_PHASE_LEN = 8U; // phaseLength = numTaps/L
|
||||||
#endif
|
|
||||||
|
|
||||||
// Generated in MATLAB using the following commands, and then normalised for unity gain
|
// Generated in MATLAB using the following commands, and then normalised for unity gain
|
||||||
// shape2 = 'Inverse-sinc Lowpass';
|
// shape2 = 'Inverse-sinc Lowpass';
|
||||||
|
|
|
@ -23,18 +23,11 @@
|
||||||
|
|
||||||
#include "YSFDefines.h"
|
#include "YSFDefines.h"
|
||||||
|
|
||||||
#if defined(WIDE_C4FSK_FILTERS_TX)
|
|
||||||
// Generated using rcosdesign(0.2, 4, 5, 'sqrt') in MATLAB
|
|
||||||
static q15_t YSF_C4FSK_FILTER[] = {0, 0, 0, 0, 688, -680, -2158, -3060, -2724, -775, 2684, 7041, 11310, 14425, 15565, 14425,
|
|
||||||
11310, 7041, 2684, -775, -2724, -3060, -2158, -680, 688}; // numTaps = 25, L = 5
|
|
||||||
const uint16_t YSF_C4FSK_FILTER_PHASE_LEN = 5U; // phaseLength = numTaps/L
|
|
||||||
#else
|
|
||||||
// Generated using rcosdesign(0.2, 8, 5, 'sqrt') in MATLAB
|
// Generated using rcosdesign(0.2, 8, 5, 'sqrt') in MATLAB
|
||||||
static q15_t YSF_C4FSK_FILTER[] = {0, 0, 0, 0, 401, 104, -340, -731, -847, -553, 112, 909, 1472, 1450, 683, -675, -2144, -3040, -2706, -770, 2667, 6995,
|
static q15_t YSF_C4FSK_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,
|
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
|
-553, -847, -731, -340, 104, 401}; // numTaps = 45, L = 5
|
||||||
const uint16_t YSF_C4FSK_FILTER_PHASE_LEN = 9U; // phaseLength = numTaps/L
|
const uint16_t YSF_C4FSK_FILTER_PHASE_LEN = 9U; // phaseLength = numTaps/L
|
||||||
#endif
|
|
||||||
|
|
||||||
const q15_t YSF_LEVELA_HI = 3900;
|
const q15_t YSF_LEVELA_HI = 3900;
|
||||||
const q15_t YSF_LEVELB_HI = 1300;
|
const q15_t YSF_LEVELB_HI = 1300;
|
||||||
|
|
Loading…
Reference in New Issue