diff --git a/firmware/application/apps/analog_audio_app.hpp b/firmware/application/apps/analog_audio_app.hpp index e336ab3b7..28af04d98 100644 --- a/firmware/application/apps/analog_audio_app.hpp +++ b/firmware/application/apps/analog_audio_app.hpp @@ -143,7 +143,7 @@ class WFMAMAptOptionsView : public View { }; OptionsField options_config{ {3 * 8, 0 * 16}, - 15, // Max option char length "FM+AM(NOAA Apt)" + 16, // Max option char length "80khz (NOAA Apt)" example. { // Using common messages from freqman_ui.cpp }}; diff --git a/firmware/application/freqman_db.cpp b/firmware/application/freqman_db.cpp index de7ed2200..7fa600d21 100644 --- a/firmware/application/freqman_db.cpp +++ b/firmware/application/freqman_db.cpp @@ -108,7 +108,8 @@ options_t freqman_bandwidths[6] = { }, { // WFMAM for NOAA satellites, 137 Mhz band - {"FM+AM(NOAA Apt)", 1}, // Fixed RX demod- WFM config Index 1 : FM+AM for Audio NOAA APT ones. + {"80kHz (NOAA Apt)", 0}, // Fixed RX demod- WFM config Index 1 : FM+AM for Audio NOAA APT ones. + {"38kHz (NOAA Apt)", 1}, }, }; diff --git a/firmware/application/receiver_model.cpp b/firmware/application/receiver_model.cpp index 0db3f5aaf..497f03642 100644 --- a/firmware/application/receiver_model.cpp +++ b/firmware/application/receiver_model.cpp @@ -69,8 +69,9 @@ static constexpr std::array wfm_configs{{ {taps_40k_wfm_decim_0, taps_40k_wfm_decim_1}, }}; -static constexpr std::array wfmam_configs{{ - {taps_16k0_decim_0, taps_84k_wfmam_decim_1}, +static constexpr std::array wfmam_configs{{ + {taps_16k0_decim_0, taps_80k_wfmam_decim_1}, + {taps_16k0_decim_0, taps_38k_wfmam_decim_1}, }}; } /* namespace */ diff --git a/firmware/baseband/proc_noaaapt_rx.cpp b/firmware/baseband/proc_noaaapt_rx.cpp index 938f9b418..043ba81ad 100644 --- a/firmware/baseband/proc_noaaapt_rx.cpp +++ b/firmware/baseband/proc_noaaapt_rx.cpp @@ -146,16 +146,16 @@ void NoaaAptRx::configure(const NoaaAptRxConfigureMessage& message) { // Temptatively , I splitted, in two WidebandFMAudio::configure_wfm / WidebandFMAudio::configure_wfmam and dynamically /2, /8 . (here /8) // decim_1.set().configure(message.decim_1_filter.taps); // for wfm // decim_1.set().configure(message.decim_1_filter.taps); // for wfmam - decim_1.configure(taps_84k_wfmam_decim_1.taps); // for wfmam + decim_1.configure(taps_38k_wfmam_decim_1.taps); // for wfmam size_t decim_1_output_fs = decim_1_input_fs / decim_1.decimation_factor; // wfmam, decim_1.decimation_factor() = /8 ,if applied after the line, decim_1.set().configure(message.decim_1_filter.taps); size_t demod_input_fs = decim_1_output_fs; // spectrum_interval_samples = decim_1_output_fs / spectrum_rate_hz; // spectrum_samples = 0; - channel_filter_low_f = taps_84k_wfmam_decim_1.low_frequency_normalized * decim_1_input_fs; - channel_filter_high_f = taps_84k_wfmam_decim_1.high_frequency_normalized * decim_1_input_fs; - channel_filter_transition = taps_84k_wfmam_decim_1.transition_normalized * decim_1_input_fs; + channel_filter_low_f = taps_38k_wfmam_decim_1.low_frequency_normalized * decim_1_input_fs; + channel_filter_high_f = taps_38k_wfmam_decim_1.high_frequency_normalized * decim_1_input_fs; + channel_filter_transition = taps_38k_wfmam_decim_1.transition_normalized * decim_1_input_fs; demod.configure(demod_input_fs, 17000); audio_filter.configure(taps_64_lp_1875_2166.taps); audio_output.configure(apt_audio_12k_notch_2k4_config, apt_audio_12k_lpf_2000hz_config); diff --git a/firmware/common/dsp_fir_taps.hpp b/firmware/common/dsp_fir_taps.hpp index e5f0f78da..09a35b351 100644 --- a/firmware/common/dsp_fir_taps.hpp +++ b/firmware/common/dsp_fir_taps.hpp @@ -1327,44 +1327,88 @@ constexpr fir_taps_real<16> taps_40k_wfm_decim_1 = { // WFMAM decimation filters //////////////////////////////////////////////// // Used for NOAA 137 Mhz APT sat demod. -// IFIR prototype filter: fs=768000, pass=42000, stop=95000, decim=8, fout=96000 -constexpr fir_taps_real<32> taps_84k_wfmam_decim_1 = { - .low_frequency_normalized = -42000.0f / 768000.0f, - .high_frequency_normalized = 42000.0f / 768000.0f, +// IFIR prototype filter: fs=768000, pass=40000, stop=95000, decim=8, fout=96000 +constexpr fir_taps_real<32> taps_80k_wfmam_decim_1 = { + .low_frequency_normalized = -40000.0f / 768000.0f, + .high_frequency_normalized = 40000.0f / 768000.0f, .transition_normalized = 53000.0f / 768000.0f, .taps = {{ - 13, - -6, - -47, - -116, - -207, - -294, - -332, - -266, - -39, - 386, - 1012, - 1795, - 2648, - 3452, - 4079, - 4423, - 4423, - 4079, - 3452, - 2648, - 1795, - 1012, - 386, - -39, - -266, - -332, - -294, - -207, - -116, - -47, - -6, - 13, + 5, + -37, + -120, + -248, + -397, + -519, + -535, + -354, + 106, + 896, + 2006, + 3355, + 4797, + 6136, + 7171, + 7736, + 7736, + 7171, + 6136, + 4797, + 3355, + 2006, + 896, + 106, + -354, + -535, + -519, + -397, + -248, + -120, + -37, + 5, + + }}, +}; + +// WFMAM decimation filters //////////////////////////////////////////////// +// Used for NOAA 137 Mhz APT sat demod. +// IFIR prototype filter: fs=768000, pass=19000, stop=68000, decim=8, fout=96000 +constexpr fir_taps_real<32> taps_38k_wfmam_decim_1 = { + .low_frequency_normalized = -19000.0f / 768000.0f, + .high_frequency_normalized = 19000.0f / 768000.0f, + .transition_normalized = 49000.0f / 768000.0f, + .taps = {{ + 49, + 91, + 175, + 303, + 483, + 724, + 1028, + 1391, + 1805, + 2253, + 2712, + 3158, + 3560, + 3891, + 4127, + 4250, + 4250, + 4127, + 3891, + 3560, + 3158, + 2712, + 2253, + 1805, + 1391, + 1028, + 724, + 483, + 303, + 175, + 91, + 49, }}, };