From f0c4b0fc9879c893c2ef2ed3a641b24b5d81e687 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Mon, 29 Aug 2016 20:26:39 -0700 Subject: [PATCH] AIS: Doesn't use RRC filter -- use rect instead. --- firmware/baseband/proc_ais.hpp | 2 +- firmware/common/ais_baseband.hpp | 22 +++++++--------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/firmware/baseband/proc_ais.hpp b/firmware/baseband/proc_ais.hpp index eff71b4a..97e813ff 100644 --- a/firmware/baseband/proc_ais.hpp +++ b/firmware/baseband/proc_ais.hpp @@ -62,7 +62,7 @@ private: dsp::decimate::FIRC8xR16x24FS4Decim8 decim_0; dsp::decimate::FIRC16xR16x32Decim8 decim_1; - dsp::matched_filter::MatchedFilter mf { baseband::ais::rrc_taps_38k4_4t_p, 2 }; + dsp::matched_filter::MatchedFilter mf { baseband::ais::square_taps_38k4_1t_p, 2 }; clock_recovery::ClockRecovery clock_recovery { 19200, 9600, { 0.0555f }, diff --git a/firmware/common/ais_baseband.hpp b/firmware/common/ais_baseband.hpp index 1d7a2aa6..f8bbc0d8 100644 --- a/firmware/common/ais_baseband.hpp +++ b/firmware/common/ais_baseband.hpp @@ -32,21 +32,13 @@ namespace baseband { namespace ais { -// RRC length should be about 4 x the symbol length (4T) to do a good job of -// cleaning up ISI. - -// Translate+RRC filter -// sample=38.4k, deviation=2400, b=0.5, symbol=9600 -// Length: 16 taps, 4 symbols, 1 cycles of sinusoid -constexpr std::array, 16> rrc_taps_38k4_4t_p { { - { 1.0619794019e-02f, 0.0000000000e+00f }, { 3.5758705854e-03f, 1.4811740938e-03f }, - { -1.3274742629e-02f, -1.3274742629e-02f }, { -1.5018657262e-02f, -3.6258246051e-02f }, - { 0.0000000000e+00f, -2.6549484581e-02f }, { -1.5018657262e-02f, 3.6258246051e-02f }, - { -1.0237997393e-01f, 1.0237997393e-01f }, { -2.2527985355e-01f, 9.3313970669e-02f }, - { -2.8440842032e-01f, 0.0000000000e+00f }, { -2.2527985355e-01f, -9.3313970669e-02f }, - { -1.0237997393e-01f, -1.0237997393e-01f }, { -1.5018657262e-02f, -3.6258246051e-02f }, - { 0.0000000000e+00f, 2.6549484581e-02f }, { -1.5018657262e-02f, 3.6258246051e-02f }, - { -1.3274742629e-02f, 1.3274742629e-02f }, { 3.5758705854e-03f, -1.4811740938e-03f }, +// Translate+Rectangular window filter +// sample=38.4k, deviation=2400, symbol=9600 +// Length: 4 taps, 1 symbol, 1/4 cycle of sinusoid +// Gain: 1.0 (sinusoid / len(taps)) +constexpr std::array, 4> square_taps_38k4_1t_p { { + { 0.25000000f, 0.00000000f }, { 0.23096988f, 0.09567086f }, + { 0.17677670f, 0.17677670f }, { 0.09567086f, 0.23096988f }, } }; } /* namespace ais */