Remove the longer raised root cosine filter.

This commit is contained in:
Jonathan Naylor 2016-03-31 18:22:46 +01:00
parent ded92936ef
commit 7af30b7920
7 changed files with 7 additions and 36 deletions

View File

@ -19,8 +19,6 @@
#if !defined(CONFIG_H)
#define CONFIG_H
#define USE_SHORTER_DMR_FILTER
// Allow for the use of high quality external clock oscillators
// The number is the frequency of the oscillator in Hertz.
// For 12 MHz

View File

@ -20,19 +20,10 @@
#include "Globals.h"
#include "DMRSlotType.h"
#if defined(USE_SHORTER_DMR_FILTER)
// Generated using rcosdesign(0.2, 4, 10, 'sqrt') in MATLAB
static q15_t DMR_C4FSK_FILTER[] = {486, 39, -480, -1022, -1526, -1928, -2164, -2178, -1927, -1384, -548, 561, 1898, 3399, 4980, 6546, 7999, 9246, 10202, 10803, 11008, 10803, 10202, 9246,
7999, 6546, 4980, 3399, 1898, 561, -548, -1384, -1927, -2178, -2164, -1928, -1526, -1022, -480, 39, 486, 0};
const uint16_t DMR_C4FSK_FILTER_LEN = 42U;
#else
// Generated using rcosdesign(0.2, 8, 10, 'sqrt') in MATLAB
static q15_t DMR_C4FSK_FILTER[] = {283, 198, 73, -78, -240, -393, -517, -590, -599, -533, -391, -181, 79, 364, 643, 880, 1041, 1097, 1026, 819, 483, 39, -477, -1016, -1516, -1915, -2150,
-2163, -1914, -1375, -545, 557, 1886, 3376, 4946, 6502, 7946, 9184, 10134, 10731, 10935, 10731, 10134, 9184, 7946, 6502, 4946, 3376, 1886, 557, -545,
-1375, -1914, -2163, -2150, -1915, -1516, -1016, -477, 39, 483, 819, 1026, 1097, 1041, 880, 643, 364, 79, -181, -391, -533, -599, -590, -517, -393, -240,
-78, 73, 198, 283, 0};
const uint16_t DMR_C4FSK_FILTER_LEN = 82U;
#endif
q15_t DMR_A[] = { 912, 912, 912, 912, 912, 912, 912, 912, 912, 912};
q15_t DMR_B[] = { 304, 304, 304, 304, 304, 304, 304, 304, 304, 304};
@ -74,7 +65,7 @@ m_poLen(0U),
m_poPtr(0U),
m_count(0U)
{
::memset(m_modState, 0x00U, 130U * sizeof(q15_t));
::memset(m_modState, 0x00U, 90U * sizeof(q15_t));
m_modFilter.numTaps = DMR_C4FSK_FILTER_LEN;
m_modFilter.pState = m_modState;

View File

@ -52,7 +52,7 @@ public:
private:
CSerialRB m_fifo[2U];
arm_fir_instance_q15 m_modFilter;
q15_t m_modState[130U]; // NoTaps + BlockSize - 1, 82 + 40 - 1 plus some spare
q15_t m_modState[90U]; // NoTaps + BlockSize - 1, 42 + 40 - 1 plus some spare
DMRTXSTATE m_state;
uint8_t m_idle[DMR_FRAME_LENGTH_BYTES];
uint8_t m_cachPtr;

13
IO.cpp
View File

@ -24,19 +24,10 @@
#include "Globals.h"
#include "IO.h"
#if defined(USE_SHORTER_DMR_FILTER)
// Generated using rcosdesign(0.2, 4, 10, 'sqrt') in MATLAB
static q15_t C4FSK_FILTER[] = {486, 39, -480, -1022, -1526, -1928, -2164, -2178, -1927, -1384, -548, 561, 1898, 3399, 4980, 6546, 7999, 9246, 10202, 10803, 11008, 10803, 10202, 9246,
7999, 6546, 4980, 3399, 1898, 561, -548, -1384, -1927, -2178, -2164, -1928, -1526, -1022, -480, 39, 486, 0};
const uint16_t C4FSK_FILTER_LEN = 42U;
#else
// Generated using rcosdesign(0.2, 8, 10, 'sqrt') in MATLAB
static q15_t C4FSK_FILTER[] = {283, 198, 73, -78, -240, -393, -517, -590, -599, -533, -391, -181, 79, 364, 643, 880, 1041, 1097, 1026, 819, 483, 39, -477, -1016, -1516, -1915, -2150,
-2163, -1914, -1375, -545, 557, 1886, 3376, 4946, 6502, 7946, 9184, 10134, 10731, 10935, 10731, 10134, 9184, 7946, 6502, 4946, 3376, 1886, 557, -545,
-1375, -1914, -2163, -2150, -1915, -1516, -1016, -477, 39, 483, 819, 1026, 1097, 1041, 880, 643, 364, 79, -181, -391, -533, -599, -590, -517, -393, -240,
-78, 73, 198, 283, 0};
const uint16_t C4FSK_FILTER_LEN = 82U;
#endif
// Generated using gaussfir(0.5, 4, 10) in MATLAB
static q15_t GMSK_FILTER[] = {1, 4, 15, 52, 151, 380, 832, 1579, 2599, 3710, 4594, 4933, 4594, 3710, 2599, 1579, 832, 380, 151, 52, 15, 4, 1, 0};
@ -131,8 +122,8 @@ m_count(0U),
m_watchdog(0U),
m_lockout(false)
{
::memset(m_C4FSKState, 0x00U, 110U * sizeof(q15_t));
::memset(m_GMSKState, 0x00U, 50U * sizeof(q15_t));
::memset(m_C4FSKState, 0x00U, 70U * sizeof(q15_t));
::memset(m_GMSKState, 0x00U, 50U * sizeof(q15_t));
m_C4FSKFilter.numTaps = C4FSK_FILTER_LEN;
m_C4FSKFilter.pState = m_C4FSKState;

2
IO.h
View File

@ -70,7 +70,7 @@ private:
arm_fir_instance_q15 m_C4FSKFilter;
arm_fir_instance_q15 m_GMSKFilter;
q15_t m_C4FSKState[110U]; // NoTaps + BlockSize - 1, 82 + 20 - 1 plus some spare
q15_t m_C4FSKState[70U]; // NoTaps + BlockSize - 1, 42 + 20 - 1 plus some spare
q15_t m_GMSKState[50U]; // NoTaps + BlockSize - 1, 24 + 20 - 1 plus some spare
bool m_pttInvert;

View File

@ -22,19 +22,10 @@
#include "YSFDefines.h"
#if defined(USE_SHORTER_DMR_FILTER)
// Generated using rcosdesign(0.2, 4, 10, 'sqrt') in MATLAB
static q15_t YSF_C4FSK_FILTER[] = {486, 39, -480, -1022, -1526, -1928, -2164, -2178, -1927, -1384, -548, 561, 1898, 3399, 4980, 6546, 7999, 9246, 10202, 10803, 11008, 10803, 10202, 9246,
7999, 6546, 4980, 3399, 1898, 561, -548, -1384, -1927, -2178, -2164, -1928, -1526, -1022, -480, 39, 486, 0};
const uint16_t YSF_C4FSK_FILTER_LEN = 42U;
#else
// Generated using rcosdesign(0.2, 8, 10, 'sqrt') in MATLAB
static q15_t YSF_C4FSK_FILTER[] = {283, 198, 73, -78, -240, -393, -517, -590, -599, -533, -391, -181, 79, 364, 643, 880, 1041, 1097, 1026, 819, 483, 39, -477, -1016, -1516, -1915, -2150,
-2163, -1914, -1375, -545, 557, 1886, 3376, 4946, 6502, 7946, 9184, 10134, 10731, 10935, 10731, 10134, 9184, 7946, 6502, 4946, 3376, 1886, 557, -545,
-1375, -1914, -2163, -2150, -1915, -1516, -1016, -477, 39, 483, 819, 1026, 1097, 1041, 880, 643, 364, 79, -181, -391, -533, -599, -590, -517, -393, -240,
-78, 73, 198, 283, 0};
const uint16_t YSF_C4FSK_FILTER_LEN = 82U;
#endif
const uint8_t YSF_START_SYNC = 0x77U;
const uint8_t YSF_END_SYNC = 0xFFU;
@ -55,7 +46,7 @@ m_poPtr(0U),
m_txDelay(120U), // 100ms
m_count(0U)
{
::memset(m_modState, 0x00U, 130U * sizeof(q15_t));
::memset(m_modState, 0x00U, 90U * sizeof(q15_t));
m_modFilter.numTaps = YSF_C4FSK_FILTER_LEN;
m_modFilter.pState = m_modState;

View File

@ -38,7 +38,7 @@ public:
private:
CSerialRB m_buffer;
arm_fir_instance_q15 m_modFilter;
q15_t m_modState[130U]; // NoTaps + BlockSize - 1, 82 + 40 - 1 plus some spare
q15_t m_modState[90U]; // NoTaps + BlockSize - 1, 42 + 40 - 1 plus some spare
uint8_t m_poBuffer[720U];
uint16_t m_poLen;
uint16_t m_poPtr;