specan: cleared up terminology, accounted for decimation.

Channel spectrum decimation now accounted for when computing filter frequencies.
Renamed a bunch of variables relating to channel spectrum bandwidth and filter frequencies.
This commit is contained in:
Jared Boone 2015-07-17 22:55:18 -07:00
parent 98bd9c54e4
commit ffc50785b7
3 changed files with 36 additions and 28 deletions

View file

@ -337,7 +337,7 @@ private:
static volatile bool channel_spectrum_request_update { false };
static std::array<complex16_t, 256> channel_spectrum;
static uint32_t channel_spectrum_bandwidth { 0 };
static uint32_t channel_spectrum_sampling_rate { 0 };
class BasebandProcessor {
public:
@ -380,7 +380,7 @@ protected:
if( !channel_spectrum_request_update ) {
channel_spectrum_request_update = true;
std::copy(&data.p[0], &data.p[data.count], channel_spectrum.begin());
channel_spectrum_bandwidth = data.sampling_rate;
channel_spectrum_sampling_rate = data.sampling_rate;
events_flag(EVT_MASK_SPECTRUM);
}
}
@ -860,8 +860,8 @@ private:
/* TODO: Rename .db -> .magnitude, or something more (less!) accurate. */
spectrum_message.spectrum.db = &spectrum_db;
//spectrum_message.spectrum.db_count = 256;
spectrum_message.spectrum.bandwidth = channel_spectrum_bandwidth;
spectrum_message.spectrum.db_count = spectrum_db.size();
spectrum_message.spectrum.sampling_rate = channel_spectrum_sampling_rate;
shared_memory.application_queue.push(&spectrum_message);
}
}