sb_testFrames->SetToolTip(_("Send frames of known bits instead of compressed voice"));
sbSizer_testFrames->Add(m_ckboxTestFrame, 0, wxALIGN_LEFT, 0);
+ m_ckboxChannelNoise = new wxCheckBox(this, wxID_ANY, _("Channel Noise"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE);
+ sb_testFrames->SetToolTip(_("Add simulated AWGN channel noise to received signal"));
+ sbSizer_testFrames->Add(m_ckboxChannelNoise, 0, wxALIGN_LEFT, 0);
+
bSizer30->Add(sbSizer_testFrames,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3);
//------------------------------
{
m_txtCtrlCallSign->SetValue(wxGetApp().m_callSign);
m_ckboxTestFrame->SetValue(wxGetApp().m_testFrames);
+ m_ckboxChannelNoise->SetValue(wxGetApp().m_channel_noise);
m_ckbox_events->SetValue(wxGetApp().m_events);
m_txt_spam_timer->SetValue(wxString::Format(wxT("%i"),wxGetApp().m_events_spam_timer));
{
wxGetApp().m_callSign = m_txtCtrlCallSign->GetValue();
wxGetApp().m_testFrames = m_ckboxTestFrame->GetValue();
+ wxGetApp().m_channel_noise = m_ckboxChannelNoise->GetValue();
wxGetApp().m_events = m_ckbox_events->GetValue();
long spam_timer;
wxTextCtrl *m_txtCtrlCallSign; // TODO: this should be renamed to tx_txtmsg, and rename all related incl persis strge
wxCheckBox *m_ckboxTestFrame;
+ wxCheckBox *m_ckboxChannelNoise;
wxRadioButton *m_rb_textEncoding1;
wxRadioButton *m_rb_textEncoding2;
int g_sz_error_pattern;
short *g_error_pattern;
struct FIFO *g_errorFifo;
+int g_channel_noise;
// time averaged magnitude spectrum used for waterfall and spectrum display
float g_avmag[FDMDV_NSPEC];
g_total_bit_errors = 0;
}
g_testFrames = wxGetApp().m_testFrames;
+ g_channel_noise = wxGetApp().m_channel_noise;
if (g_State) {
char bits[80], errors[80], ber[80];
rx_fdm[i].real = (float)input_buf[i] / FDMDV_SCALE;
rx_fdm[i].imag = 0.0;
}
+
+
+ if (g_channel_noise) {
+ fdmdv_simulate_channel(g_pFDMDV, rx_fdm, *nin, 2.0);
+ }
fdmdv_freq_shift(rx_fdm_offset, rx_fdm, g_RxFreqOffsetHz, &g_RxFreqOffsetPhaseRect, *nin);
fdmdv_demod(g_pFDMDV, rx_bits, &reliable_sync_bit, rx_fdm_offset, nin);