Use new decimation filters in AIS processor.

This commit is contained in:
Jared Boone
2016-01-01 13:20:02 -08:00
parent 316d5d433b
commit ff05833b02
3 changed files with 32 additions and 22 deletions

View File

@@ -26,10 +26,24 @@
#include "i2s.hpp"
using namespace lpc43xx;
#include "dsp_fir_taps.hpp"
AISProcessor::AISProcessor() {
decim_0.configure(taps_11k0_decim_0.taps, 33554432);
decim_1.configure(taps_11k0_decim_1.taps, 131072);
}
void AISProcessor::execute(const buffer_c8_t& buffer) {
/* 2.4576MHz, 2048 samples */
auto decimator_out = decimator.execute(buffer);
const buffer_c16_t dst_buffer {
dst.data(),
dst.size()
};
const auto decim_0_out = decim_0.execute(buffer, dst_buffer);
const auto decim_1_out = decim_1.execute(decim_0_out, dst_buffer);
const auto decimator_out = decim_1_out;
/* 76.8kHz, 64 samples */
feed_channel_stats(decimator_out);

View File

@@ -42,11 +42,15 @@
class AISProcessor : public BasebandProcessor {
public:
AISProcessor();
void execute(const buffer_c8_t& buffer) override;
private:
ChannelDecimator decimator { ChannelDecimator::DecimationFactor::By32 };
dsp::matched_filter::MatchedFilter mf { baseband::ais::rrc_taps_76k8_4t_p, 4 };
std::array<complex16_t, 512> dst;
dsp::decimate::FIRC8xR16x24FS4Decim8 decim_0;
dsp::decimate::FIRC16xR16x32Decim8 decim_1;
dsp::matched_filter::MatchedFilter mf { baseband::ais::rrc_taps_38k4_4t_p, 2 };
clock_recovery::ClockRecovery<clock_recovery::FixedErrorFilter> clock_recovery {
19200, 9600, { 0.0555f },