[ ] test mode
[ ] get error patterns working again, both 700 and 1600
[ ] how to plot error histogram
- [ ] file sample replay at 7500Hz work OK?
- [ ] interp 7500 to 8k for spectrum plotting
+ [X] file sample replay at 7500Hz work OK?
+ [X] interp 7500 to 8k for spectrum plotting
+ [X] rotation of scatter diagram on FreeDV 700
+ [X] freq track plot
[ ] FreeDV 700 improvements
[ ] bpf filter after clipping to remove clicks
[ ] tcohpsk first, measure PAPR, impl loss
[ ] error masking
+ [ ] plotting other demod stats like ch ampl and phase ests
[ ] win32 X-compile
[ ] installer
[ ] Waterfall direction
[ ] test mode on 1600 with freedv api
+ maybe calc stats, hist
+ [ ] documenttation or use, walk through,you tube, blog posts
[ ] Web support for Presence/spotting hooks
short speechInPlotSamples[WAVEFORM_PLOT_BUF];
if (fifo_read(g_plotSpeechInFifo, speechInPlotSamples, WAVEFORM_PLOT_BUF)) {
memset(speechInPlotSamples, 0, WAVEFORM_PLOT_BUF*sizeof(short));
- fprintf(stderr, "empty!\n");
+ //fprintf(stderr, "empty!\n");
}
m_panelSpeechIn->add_new_short_samples(0, speechInPlotSamples, WAVEFORM_PLOT_BUF, 32767);
m_panelSpeechIn->Refresh();
// Toggle test frame mode at run time
- if (!g_testFrames && wxGetApp().m_testFrames) {
+ if (!g_pfreedv->test_frames && wxGetApp().m_testFrames) {
// reset stats on check box off to on transition
- g_test_frame_sync_state = 0;
- g_total_bits = 0;
- g_total_bit_errors = 0;
+ g_pfreedv->test_frames = 1;
+ g_pfreedv->test_frame_sync_state = 0;
+ g_pfreedv->total_bits = 0;
+ g_pfreedv->total_bit_errors = 0;
}
- g_testFrames = wxGetApp().m_testFrames;
+ g_pfreedv->test_frames = wxGetApp().m_testFrames;
g_channel_noise = wxGetApp().m_channel_noise;
if (g_State) {
// update stats on main page
- sprintf(bits, "Bits: %d", (int)g_total_bits); wxString bits_string(bits); m_textBits->SetLabel(bits_string);
- sprintf(errors, "Errs: %d", (int)g_total_bit_errors); wxString errors_string(errors); m_textErrors->SetLabel(errors_string);
- float b = (float)g_total_bit_errors/(1E-6+g_total_bits);
+ sprintf(bits, "Bits: %d", (int)g_pfreedv->total_bits); wxString bits_string(bits); m_textBits->SetLabel(bits_string);
+ sprintf(errors, "Errs: %d", (int)g_pfreedv->total_bit_errors); wxString errors_string(errors); m_textErrors->SetLabel(errors_string);
+ float b = (float)g_pfreedv->total_bit_errors/(1E-6+g_pfreedv->total_bits);
sprintf(ber, "BER: %4.3f", b); wxString ber_string(ber); m_textBER->SetLabel(ber_string);
+ #ifdef FIXME
// update error plots
short *error_pattern = new short[g_sz_error_pattern];
}
delete error_pattern;
+ #endif
}
// command from UDP thread that is best processed in main thread to avoid seg faults
void MainFrame::OnBerReset(wxCommandEvent& event)
{
- g_total_bits = 0;
- g_total_bit_errors = 0;
+ g_pfreedv->total_bits = 0;
+ g_pfreedv->total_bit_errors = 0;
}
#ifdef ALC
{
sfInfo.format = SF_FORMAT_RAW | SF_FORMAT_PCM_16;
sfInfo.channels = 1;
- sfInfo.samplerate = FS;
+ sfInfo.samplerate = g_pfreedv->modem_sample_rate;
}
else if(extension == wxT("wav"))
{
sfInfo.format = SF_FORMAT_WAV | SF_FORMAT_PCM_16;
sfInfo.channels = 1;
- sfInfo.samplerate = FS;
+ sfInfo.samplerate = g_pfreedv->modem_sample_rate;
} else {
wxMessageBox(wxT("Invalid file format"), wxT("Record File From Radio"), wxOK);
return;
rx_fdm[i].imag = 0.0;
}
- if (g_channel_noise) {
+ // only implemented for FreeDV 1600 at this stage
+ if (g_channel_noise && FREEDV_MODE_1600) {
fdmdv_simulate_channel(g_pfreedv->fdmdv, rx_fdm, nin, 2.0);
}
fdmdv_freq_shift(rx_fdm_offset, rx_fdm, g_RxFreqOffsetHz, &g_RxFreqOffsetPhaseRect, nin);