mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-15 02:07:24 -05:00
P25p2 QPSK Optimization Tweaks;
This commit is contained in:
@@ -283,7 +283,9 @@ static int digitize (dsd_opts* opts, dsd_state* state, int symbol)
|
||||
|
||||
valid = 0;
|
||||
|
||||
if (state->synctype == 1)
|
||||
//only run estimate_symbol when we aren't trunking, otherwise noise/gain levels on other rf channels may impact performance severely
|
||||
//honestly can't say I've seen any improvement when using heuristics, but is detrimental to playing back multiple p25 samples
|
||||
if (state->synctype == 1 && opts->p25_trunk == 0)
|
||||
{
|
||||
// Use the P25 heuristics if available
|
||||
//valid = estimate_symbol(state->rf_mod, &(state->inv_p25_heuristics), state->last_dibit, symbol, &dibit);
|
||||
@@ -346,7 +348,9 @@ static int digitize (dsd_opts* opts, dsd_state* state, int symbol)
|
||||
|
||||
valid = 0;
|
||||
|
||||
if (state->synctype == 0)
|
||||
//only run estimate_symbol when we aren't trunking, otherwise noise/gain levels on other rf channels may impact performance severely
|
||||
//honestly can't say I've seen any improvement when using heuristics, but is detrimental to playing back multiple p25 samples
|
||||
if (state->synctype == 0 && opts->p25_trunk == 0)
|
||||
{
|
||||
// Use the P25 heuristics if available
|
||||
//valid = estimate_symbol(state->rf_mod, &(state->p25_heuristics), state->last_dibit, symbol, &dibit);
|
||||
|
||||
@@ -322,8 +322,8 @@ initOpts (dsd_opts * opts)
|
||||
opts->inverted_x2tdma = 1; // most transmitter + scanner + sound card combinations show inverted signals for this
|
||||
opts->inverted_dmr = 0; // most transmitter + scanner + sound card combinations show non-inverted signals for this
|
||||
opts->mod_threshold = 26;
|
||||
opts->ssize = 36;
|
||||
opts->msize = 15;
|
||||
opts->ssize = 128; //36 default, max is 128, much cleaner data decodes on Phase 2 cqpsk at max
|
||||
opts->msize = 1024; //15 default, max is 1024, much cleaner data decodes on Phase 2 cqpsk at max
|
||||
opts->playfiles = 0;
|
||||
opts->delay = 0;
|
||||
opts->use_cosine_filter = 1;
|
||||
@@ -810,12 +810,11 @@ usage ()
|
||||
printf (" -mc Use only C4FM modulation optimizations\n");
|
||||
printf (" -mg Use only GFSK modulation optimizations\n");
|
||||
printf (" -mq Use only QPSK modulation optimizations\n");
|
||||
printf (" -m2 Use Phase 2 6000 sps CQPSK modulation optimizations\n");
|
||||
printf (" (4 Level, not 8 Level LSM) \n");
|
||||
printf (" -m2 Use P25p2 6000 sps CQPSK modulation optimizations\n");
|
||||
//printf (" (4 Level, not 8 Level LSM) (this is honestly unknown since I can't verify what local systems are using)\n");
|
||||
printf (" -F Relax P25 Phase 2 MAC_SIGNAL CRC Checksum Pass/Fail\n");
|
||||
printf (" Use this feature to allow MAC_SIGNAL even if bad CRC errors.\n");
|
||||
printf (" -F Enable DMR BS Stereo Passive Frame Sync\n");
|
||||
printf (" This feature will attempt to resync less often due to excessive voice errors\n");
|
||||
printf (" -F Relax DMR CACH/Burst FEC Pass/Fail - Passive Frame Sync\n");
|
||||
printf (" Use if skipping occurs, but may cause wonky audio due to loss of good sync\n");
|
||||
printf (" -Z Log MBE/Frame Payloads to console\n");
|
||||
printf ("\n");
|
||||
@@ -1735,16 +1734,13 @@ main (int argc, char **argv)
|
||||
}
|
||||
else if (optarg[0] == '2')
|
||||
{
|
||||
//opts.pulse_digi_rate_in = 96000;
|
||||
opts.mod_c4fm = 0;
|
||||
opts.mod_qpsk = 1;
|
||||
opts.mod_gfsk = 0;
|
||||
state.rf_mod = 1;
|
||||
state.samplesPerSymbol = 8;
|
||||
state.symbolCenter = 3;
|
||||
// state.samplesPerSymbol = 8*2;
|
||||
// state.symbolCenter = 3*2;
|
||||
fprintf (stderr,"Enabling 6000 sps P25 CQPSK (testing only).\n");
|
||||
fprintf (stderr,"Enabling 6000 sps P25p2 CQPSK.\n");
|
||||
}
|
||||
break;
|
||||
case 'u':
|
||||
|
||||
@@ -2098,6 +2098,11 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
}
|
||||
|
||||
printw ("--Audio Decode----------------------------------------------------------------\n");
|
||||
printw ("| Demod/Rate: ");
|
||||
if (opts->mod_qpsk == 1) printw ("[QPSK]");
|
||||
if (opts->mod_c4fm == 1) printw ("[C4FM]");
|
||||
if (opts->mod_gfsk == 1) printw ("[GFSK]");
|
||||
printw ( "[%d] \n", (48000*opts->wav_interpolator)/state->samplesPerSymbol);
|
||||
printw ("| Decoding: [%s] \n", opts->output_name);
|
||||
printw ("| In Level: [%3i%%] \n", level);
|
||||
if (opts->dmr_stereo == 0)
|
||||
@@ -2859,39 +2864,43 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
if (state->rf_mod == 0)
|
||||
{
|
||||
opts->mod_c4fm = 0;
|
||||
opts->mod_qpsk = 1;
|
||||
opts->mod_gfsk = 0;
|
||||
state->rf_mod = 1;
|
||||
state->samplesPerSymbol = 10;
|
||||
state->symbolCenter = 4;
|
||||
opts->mod_c4fm = 0;
|
||||
opts->mod_qpsk = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
opts->mod_c4fm = 1;
|
||||
opts->mod_qpsk = 0;
|
||||
opts->mod_gfsk = 0;
|
||||
state->rf_mod = 0;
|
||||
state->samplesPerSymbol = 10;
|
||||
state->symbolCenter = 4;
|
||||
opts->mod_c4fm = 1;
|
||||
opts->mod_qpsk = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (c == 77) //'M' key, toggle qpsk - phase 2
|
||||
if (c == 77) //'M' key, toggle qpsk - phase 2 6000 sps
|
||||
{
|
||||
if (state->rf_mod == 0)
|
||||
{
|
||||
opts->mod_c4fm = 0;
|
||||
opts->mod_qpsk = 1;
|
||||
opts->mod_gfsk = 0;
|
||||
state->rf_mod = 1;
|
||||
state->samplesPerSymbol = 8;
|
||||
state->symbolCenter = 3;
|
||||
opts->mod_c4fm = 0;
|
||||
opts->mod_qpsk = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
opts->mod_c4fm = 1;
|
||||
opts->mod_qpsk = 0;
|
||||
opts->mod_gfsk = 0;
|
||||
state->rf_mod = 0;
|
||||
state->samplesPerSymbol = 10;
|
||||
state->symbolCenter = 4;
|
||||
opts->mod_c4fm = 1;
|
||||
opts->mod_qpsk = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user