POCSAG RX now runs at 3.072MHz, like NFM audio

This commit is contained in:
furrtek 2017-02-01 11:40:01 +00:00
parent 8662ed4024
commit 394331ebd2
4 changed files with 15 additions and 12 deletions

View File

@ -32,15 +32,15 @@
//TEST: Imperial in whipcalc
//TEST: Numbers
//TEST: Jammer
//TODO: Script engine ?
//TODO: Morse coder for foxhunts
//TODO: Close Call multiple slices (buggy)
//TODO: Finish EPAR tx
//TODO: IQ replay
//TODO: Wav visualizer
//TODO: File browser ?
//TODO: File browser view ?
//TODO: Mousejack ?
//TODO: Move frequencykeypad from ui_receiver to ui_widget (used everywhere)
//TODO: ADS-B draw trajectory + GPS coordinates + scale, and playback
@ -51,7 +51,6 @@
//TODO: Show address/data bit fields in OOK TX
//TODO: Scan for OOK TX
//TODO: Check more OOK encoders
//TODO: POCSAG 512 and 2400 (all 3 at the same time, or parameter ?)
//TODO: Use msgpack for settings, lists... on sd card
//Multimon-style stuff:
@ -65,7 +64,6 @@
//TODO: LCR full message former (see norm)
//TODO: AFSK NRZI
//TODO: TX power setting
//TODO: Playdead amnesia and login
//TODO: Setup: Play dead by default ? Enable/disable ?

View File

@ -65,7 +65,7 @@ public:
private:
static constexpr uint32_t initial_target_frequency = 466175000;
static constexpr uint32_t sampling_rate = 1536000;
static constexpr uint32_t sampling_rate = 3072000;
static constexpr uint32_t baseband_bandwidth = 1750000;
bool logging { false };

View File

@ -37,17 +37,18 @@
#define POCSAG_BATCH_LENGTH (9 * 32)
void POCSAGProcessor::execute(const buffer_c8_t& buffer) {
// Samplerate is 1.536MHz, gets 2048 samples, called at 750Hz
// This is called at 1500Hz
if (!configured) return;
// Get 24kHz audio
const auto decim_0_out = decim_0.execute(buffer, dst_buffer);
const auto decim_1_out = decim_1.execute(decim_0_out, dst_buffer);
auto audio = demod.execute(decim_1_out, audio_buffer);
const auto channel_out = channel_filter.execute(decim_1_out, dst_buffer);
auto audio = demod.execute(channel_out, audio_buffer);
// End up with 32 samples
for (uint32_t c = 0; c < 32; c++) {
// End up with 16 samples
for (uint32_t c = 0; c < 16; c++) {
const int32_t audio_sample = audio.p[c] * 32768.0f;
//const int32_t audio_sample = __SSAT(sample_int, 16);
@ -168,11 +169,15 @@ void POCSAGProcessor::configure(const POCSAGConfigureMessage& message) {
constexpr size_t decim_1_input_fs = decim_0_output_fs;
constexpr size_t decim_1_output_fs = decim_1_input_fs / decim_1.decimation_factor;
constexpr size_t channel_filter_input_fs = decim_1_output_fs;
const size_t channel_filter_output_fs = channel_filter_input_fs / 2;
const size_t demod_input_fs = decim_1_output_fs;
const size_t demod_input_fs = channel_filter_output_fs;
decim_0.configure(taps_11k0_decim_0.taps, 33554432);
decim_1.configure(taps_11k0_decim_1.taps, 131072);
channel_filter.configure(taps_11k0_channel.taps, 2);
demod.configure(demod_input_fs, 4500);
bitrate = message.bitrate;

View File

@ -57,7 +57,7 @@ private:
//END_OF_MESSAGE = 69
};
static constexpr size_t baseband_fs = 1536000;
static constexpr size_t baseband_fs = 3072000;
BasebandThread baseband_thread { baseband_fs, this, NORMALPRIO + 20, baseband::Direction::Receive };
RSSIThread rssi_thread { NORMALPRIO + 10 };
@ -75,7 +75,7 @@ private:
dsp::decimate::FIRC8xR16x24FS4Decim8 decim_0 { };
dsp::decimate::FIRC16xR16x32Decim8 decim_1 { };
dsp::decimate::FIRAndDecimateComplex channel_filter { };
dsp::demodulate::FM demod { };
uint32_t sync_timeout { 0 };