mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-09-11 00:59:28 +00:00
Added tetra rx ext app (#3257)
This commit is contained in:
@@ -2070,4 +2070,20 @@ static constexpr fir_taps_complex<63> taps_1k5_LSB_channel = {
|
||||
}},
|
||||
};
|
||||
|
||||
// TETRA 25kHz filters
|
||||
// IFIR wideband pre-filter: fs=3072000, pass=90000, decim=8, fout=384000
|
||||
constexpr fir_taps_real<24> taps_25k0_tetra_decim_0 = {
|
||||
.low_frequency_normalized = -90000.0f / 3072000.0f,
|
||||
.high_frequency_normalized = 90000.0f / 3072000.0f,
|
||||
.transition_normalized = 160000.0f / 3072000.0f,
|
||||
.taps = {{55, 122, 244, 424, 666, 965, 1308, 1669, 2019, 2321, 2544, 2663, 2663, 2544, 2321, 2019, 1669, 1308, 965, 666, 424, 244, 122, 55}},
|
||||
};
|
||||
// IFIR channel filter: fs=384000, pass=15000, decim=8, fout=48000
|
||||
constexpr fir_taps_real<32> taps_25k0_tetra_decim_1 = {
|
||||
.low_frequency_normalized = -15000.0f / 384000.0f,
|
||||
.high_frequency_normalized = 15000.0f / 384000.0f,
|
||||
.transition_normalized = 25000.0f / 384000.0f,
|
||||
.taps = {{2, -18, -60, -124, -198, -259, -267, -177, 53, 448, 1003, 1677, 2398, 3068, 3585, 3868, 3868, 3585, 3068, 2398, 1677, 1003, 448, 53, -177, -267, -259, -198, -124, -60, -18, 2}},
|
||||
};
|
||||
|
||||
#endif /*__DSP_FIR_TAPS_H__*/
|
||||
|
||||
@@ -168,6 +168,8 @@ class Message {
|
||||
HunterConfig = 110,
|
||||
HunterTrigger = 111,
|
||||
HunterStop = 112,
|
||||
TetraBsch = 113,
|
||||
TetraDnb = 114,
|
||||
MAX
|
||||
};
|
||||
|
||||
@@ -2009,4 +2011,46 @@ class HunterStopMessage : public Message {
|
||||
: Message{ID::HunterStop} {}
|
||||
};
|
||||
|
||||
struct TetraBurstMessage : public Message {
|
||||
constexpr TetraBurstMessage(
|
||||
const uint8_t* bits,
|
||||
bool inv,
|
||||
uint8_t err)
|
||||
: Message(Message::ID::TetraBsch),
|
||||
inverted(inv),
|
||||
sync_errors(err),
|
||||
payload{} {
|
||||
for (size_t i = 0; i < 63; i++)
|
||||
payload[i] = bits[i];
|
||||
}
|
||||
|
||||
bool inverted;
|
||||
uint8_t sync_errors;
|
||||
|
||||
// 500 bit
|
||||
std::array<uint8_t, 63> payload;
|
||||
};
|
||||
|
||||
struct TetraDnbMessage : public Message {
|
||||
constexpr TetraDnbMessage(
|
||||
const uint8_t* bits,
|
||||
bool inv,
|
||||
uint8_t err,
|
||||
bool p_train)
|
||||
: Message(Message::ID::TetraDnb),
|
||||
inverted(inv),
|
||||
train_errors(err),
|
||||
is_p_train(p_train),
|
||||
payload{} {
|
||||
for (size_t i = 0; i < 54; i++)
|
||||
payload[i] = bits[i];
|
||||
}
|
||||
|
||||
bool inverted;
|
||||
uint8_t train_errors;
|
||||
bool is_p_train;
|
||||
|
||||
// 432 TCH type-5 bits: 216 bits before the training sequence + 216 bits after.
|
||||
std::array<uint8_t, 54> payload;
|
||||
};
|
||||
#endif /*__MESSAGE_H__*/
|
||||
|
||||
@@ -134,6 +134,7 @@ constexpr image_tag_t image_tag_vor_rx{'P', 'V', 'R', 'X'};
|
||||
constexpr image_tag_t image_tag_rttyrx{'P', 'R', 'T', 'R'};
|
||||
constexpr image_tag_t image_tag_rttytx{'P', 'R', 'T', 'T'};
|
||||
constexpr image_tag_t image_tag_tonedetect{'P', 'T', 'N', 'E'};
|
||||
constexpr image_tag_t image_tag_tetrarx{'P', 'T', 'E', 'T'};
|
||||
|
||||
constexpr image_tag_t image_tag_noop{'P', 'N', 'O', 'P'};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user