mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-21 05:05:38 -05:00
Symbol Sample Edge; YSF/DMR Edge Tweak; RTL Tweak;
This commit is contained in:
@@ -499,24 +499,25 @@ getSymbol (dsd_opts * opts, dsd_state * state, int have_sync)
|
|||||||
if (state->rf_mod == 0)
|
if (state->rf_mod == 0)
|
||||||
{
|
{
|
||||||
// 0: C4FM modulation
|
// 0: C4FM modulation
|
||||||
if ((opts->frame_p25p1 == 1) && (i >= state->symbolCenter - 2) && (i <= state->symbolCenter + 2))
|
|
||||||
{
|
//EXPERIMENTAL: manipulate the left edge depending on sync type
|
||||||
sum += sample;
|
//TODO: See if we can manipulate this a bit more based on AFC or similar type function
|
||||||
count++;
|
int l_edge = 2;
|
||||||
}
|
int r_edge = 2;
|
||||||
//testing dmr may be slightly off compared to P25, particularly wav recording at narrower bandwidth?
|
|
||||||
else if ((opts->frame_dmr == 1) && (i >= state->symbolCenter - 1) && (i <= state->symbolCenter + 2))
|
if (state->synctype == 30 || state->synctype == 31) l_edge = 1; //YSF (need to test with new recordings at BW:12000)
|
||||||
{
|
else if ((state->lastsynctype >= 10 && state->lastsynctype <= 13) || state->lastsynctype == 32 || state->lastsynctype == 33) l_edge = 1;
|
||||||
sum += sample;
|
else l_edge = 2; //P25 and NXDN96 perform better, DMR doesn't seem to care too much, but may favor 1 and not 2
|
||||||
count++;
|
|
||||||
}
|
if ((i >= state->symbolCenter - l_edge) && (i <= state->symbolCenter + r_edge))
|
||||||
//anything else
|
|
||||||
else if ((i >= state->symbolCenter - 2) && (i <= state->symbolCenter + 2))
|
|
||||||
{
|
{
|
||||||
sum += sample;
|
sum += sample;
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//debug: show what was selected for the left edge
|
||||||
|
// fprintf (stderr, " L:%d", l_edge);
|
||||||
|
|
||||||
#ifdef TRACE_DSD
|
#ifdef TRACE_DSD
|
||||||
if (i == state->symbolCenter - 1) {
|
if (i == state->symbolCenter - 1) {
|
||||||
state->debug_sample_left_edge = state->debug_sample_index - 1;
|
state->debug_sample_left_edge = state->debug_sample_index - 1;
|
||||||
|
|||||||
@@ -1003,7 +1003,7 @@ void open_rtlsdr_stream(dsd_opts *opts)
|
|||||||
//this needs to be initted first, then we set the parameters
|
//this needs to be initted first, then we set the parameters
|
||||||
dongle_init(&dongle);
|
dongle_init(&dongle);
|
||||||
//init with low pass if decoding P25 or EDACS/Provoice
|
//init with low pass if decoding P25 or EDACS/Provoice
|
||||||
if (opts->frame_p25p1 == 1 || opts->frame_provoice == 1)
|
if (opts->frame_p25p1 == 1 || opts->frame_p25p2 == 1 || opts->frame_provoice == 1)
|
||||||
demod_init_ro2(&demod);
|
demod_init_ro2(&demod);
|
||||||
else demod_init(&demod);
|
else demod_init(&demod);
|
||||||
output_init(&output);
|
output_init(&output);
|
||||||
|
|||||||
Reference in New Issue
Block a user