mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-24 23:09:26 -05:00
Set MatchedFilter taps with separate method.
This commit is contained in:
parent
8198db768d
commit
d92c962c0c
@ -42,14 +42,19 @@ public:
|
||||
|
||||
using taps_t = std::vector<tap_t>;
|
||||
|
||||
template<size_t N>
|
||||
MatchedFilter(
|
||||
const std::array<tap_t, N>& taps,
|
||||
size_t decimation_factor = 1
|
||||
) : taps(taps.cbegin(), taps.cend()),
|
||||
decimation_factor { decimation_factor }
|
||||
) : decimation_factor { decimation_factor }
|
||||
{
|
||||
samples.assign(taps.size(), 0.0f);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void set_taps(const T& new_taps) {
|
||||
taps.assign(new_taps.cbegin(), new_taps.cend());
|
||||
taps.shrink_to_fit();
|
||||
|
||||
samples.assign(new_taps.size(), 0);
|
||||
samples.shrink_to_fit();
|
||||
}
|
||||
|
||||
bool execute_once(
|
||||
|
@ -30,6 +30,9 @@ FSKProcessor::FSKProcessor(
|
||||
MessageHandlerMap& message_handlers
|
||||
) : message_handlers(message_handlers)
|
||||
{
|
||||
mf_0.set_taps(baseband::ais::rrc_taps_8_n);
|
||||
mf_1.set_taps(baseband::ais::rrc_taps_8_p);
|
||||
|
||||
message_handlers.register_handler(Message::ID::FSKConfiguration,
|
||||
[this](const Message* const p) {
|
||||
auto m = reinterpret_cast<const FSKConfigurationMessage*>(p);
|
||||
|
@ -57,14 +57,8 @@ private:
|
||||
const fir_taps_real<64>& channel_filter_taps = taps_64_lp_031_070_tfilter;
|
||||
dsp::decimate::FIRAndDecimateBy2Complex<64> channel_filter { channel_filter_taps.taps };
|
||||
|
||||
dsp::matched_filter::MatchedFilter mf_0 {
|
||||
baseband::ais::rrc_taps_8_n,
|
||||
1
|
||||
};
|
||||
dsp::matched_filter::MatchedFilter mf_1 {
|
||||
baseband::ais::rrc_taps_8_p,
|
||||
1
|
||||
};
|
||||
dsp::matched_filter::MatchedFilter mf_0 { 1 };
|
||||
dsp::matched_filter::MatchedFilter mf_1 { 1 };
|
||||
|
||||
clock_recovery::ClockRecovery<clock_recovery::FixedErrorFilter> clock_recovery {
|
||||
static_cast<float>(sampling_rate / 4),
|
||||
|
Loading…
Reference in New Issue
Block a user