mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-17 11:17:22 -05:00
Staging for DMR Improvements
Staging for DMR Improvements
This commit is contained in:
@@ -168,6 +168,7 @@ initOpts (dsd_opts * opts)
|
||||
opts->frame_nxdn48 = 0;
|
||||
opts->frame_nxdn96 = 0;
|
||||
opts->frame_dmr = 1;
|
||||
opts->frame_dpmr = 0; //borrow from LEH
|
||||
opts->frame_provoice = 0;
|
||||
opts->mod_c4fm = 1;
|
||||
opts->mod_qpsk = 1;
|
||||
@@ -190,16 +191,19 @@ initOpts (dsd_opts * opts)
|
||||
opts->rtl_bandwidth = 12; //changed recommended default to 12, 24 for ProVoice
|
||||
opts->pulse_raw_rate_in = 48000;
|
||||
opts->pulse_raw_rate_out = 48000; //doing tests with 2 channels at 24000 for 48000 audio default in pulse
|
||||
opts->pulse_digi_rate_in = 24000;
|
||||
opts->pulse_digi_rate_in = 48000;
|
||||
opts->pulse_digi_rate_out = 24000; //need to copy this to rtl type in and change rate out to 8000
|
||||
opts->pulse_raw_in_channels = 1;
|
||||
opts->pulse_raw_out_channels = 1;
|
||||
opts->pulse_digi_in_channels = 2;
|
||||
opts->pulse_digi_in_channels = 1; //2
|
||||
opts->pulse_digi_out_channels = 2;
|
||||
|
||||
opts->pulse_flush = 1; //set 0 to flush, 1 for flushed
|
||||
opts->use_ncurses_terminal = 0; //ncurses terminal disabled by default, call with -N
|
||||
opts->payload = 0; //initialize with 0 so can pass == 0 arguments
|
||||
|
||||
opts->EncryptionMode = MODE_UNENCRYPTED;
|
||||
opts->inverted_dpmr = 0;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -297,6 +301,10 @@ initState (dsd_state * state)
|
||||
state->nxdn_last_ran = -1;
|
||||
state->nxdn_last_rid = 0;
|
||||
|
||||
state->dpmr_color_code = -1;
|
||||
state->dpmr_caller_id = 0;
|
||||
state->dpmr_target_id = 0;
|
||||
|
||||
#ifdef TRACE_DSD
|
||||
state->debug_sample_index = 0;
|
||||
state->debug_label_file = NULL;
|
||||
@@ -357,11 +365,12 @@ usage ()
|
||||
fprintf (stderr," -fa Auto-detect frame type (default)\n");
|
||||
fprintf (stderr," -f1 Decode only P25 Phase 1\n");
|
||||
fprintf (stderr," -fd Decode only D-STAR\n");
|
||||
fprintf (stderr," -fr Decode only DMR/MOTOTRBO\n");
|
||||
fprintf (stderr," -fx Decode only X2-TDMA\n");
|
||||
fprintf (stderr," -fi Decode only NXDN48* (6.25 kHz) / IDAS*\n");
|
||||
fprintf (stderr," -fn Decode only NXDN96* (12.5 kHz)\n");
|
||||
fprintf (stderr," -fp Decode only ProVoice*\n");
|
||||
fprintf (stderr," -fr Decode only DMR/MOTOTRBO\n");
|
||||
fprintf (stderr," -fx Decode only X2-TDMA\n");
|
||||
fprintf (stderr," -fm Decode only dPMR*\n");
|
||||
fprintf (stderr," -l Disable DMR/MOTOTRBO and NXDN input filtering\n");
|
||||
fprintf (stderr," -ma Auto-select modulation optimizations (default)\n");
|
||||
fprintf (stderr," -mc Use only C4FM modulation optimizations\n");
|
||||
@@ -371,6 +380,7 @@ usage ()
|
||||
fprintf (stderr," -u <num> Unvoiced speech quality (default=3)\n");
|
||||
fprintf (stderr," -xx Expect non-inverted X2-TDMA signal\n");
|
||||
fprintf (stderr," -xr Expect inverted DMR/MOTOTRBO signal\n");
|
||||
fprintf (stderr," -xd Expect inverted ICOM dPMR signal\n"); //still need to do this
|
||||
fprintf (stderr,"\n");
|
||||
fprintf (stderr," * denotes frame types that cannot be auto-detected.\n");
|
||||
fprintf (stderr,"\n");
|
||||
@@ -619,6 +629,8 @@ main (int argc, char **argv)
|
||||
initOpts (&opts);
|
||||
initState (&state);
|
||||
|
||||
InitAllFecFunction(); //HERE
|
||||
|
||||
exitflag = 0;
|
||||
signal (SIGINT, sigfun);
|
||||
|
||||
@@ -807,6 +819,7 @@ main (int argc, char **argv)
|
||||
opts.frame_nxdn48 = 0; //turn it on, doesn't work due to symbol rate difference
|
||||
opts.frame_nxdn96 = 0; //causes false positives, leave on 0
|
||||
opts.frame_dmr = 1;
|
||||
opts.frame_dpmr = 0; //borrow from LEH
|
||||
opts.frame_provoice = 0; //turn it on, doesn't work due to symbol rate difference
|
||||
}
|
||||
else if (optarg[0] == 'd')
|
||||
@@ -817,6 +830,7 @@ main (int argc, char **argv)
|
||||
opts.frame_nxdn48 = 0;
|
||||
opts.frame_nxdn96 = 0;
|
||||
opts.frame_dmr = 0;
|
||||
opts.frame_dpmr = 0; //borrow from LEH
|
||||
opts.frame_provoice = 0;
|
||||
fprintf (stderr,"Decoding only D-STAR frames.\n");
|
||||
}
|
||||
@@ -828,6 +842,7 @@ main (int argc, char **argv)
|
||||
opts.frame_nxdn48 = 0;
|
||||
opts.frame_nxdn96 = 0;
|
||||
opts.frame_dmr = 0;
|
||||
opts.frame_dpmr = 0; //borrow from LEH
|
||||
opts.frame_provoice = 0;
|
||||
fprintf (stderr,"Decoding only X2-TDMA frames.\n");
|
||||
}
|
||||
@@ -839,6 +854,7 @@ main (int argc, char **argv)
|
||||
opts.frame_nxdn48 = 0;
|
||||
opts.frame_nxdn96 = 0;
|
||||
opts.frame_dmr = 0;
|
||||
opts.frame_dpmr = 0; //borrow from LEH
|
||||
opts.frame_provoice = 1;
|
||||
state.samplesPerSymbol = 5;
|
||||
state.symbolCenter = 2;
|
||||
@@ -858,6 +874,7 @@ main (int argc, char **argv)
|
||||
opts.frame_nxdn48 = 0;
|
||||
opts.frame_nxdn96 = 0;
|
||||
opts.frame_dmr = 0;
|
||||
opts.frame_dpmr = 0; //borrow from LEH
|
||||
opts.frame_provoice = 0;
|
||||
opts.mod_gfsk = 0;
|
||||
opts.mod_c4fm = 1; //Phase 1 only uses C4FM, right?
|
||||
@@ -873,6 +890,7 @@ main (int argc, char **argv)
|
||||
opts.frame_nxdn48 = 1;
|
||||
opts.frame_nxdn96 = 0;
|
||||
opts.frame_dmr = 0;
|
||||
opts.frame_dpmr = 0; //borrow from LEH
|
||||
opts.frame_provoice = 0;
|
||||
//I think I've got it to decode on proper modulation now c4fm, not really sure what the difference is in DSD, seems to work either way for some reason
|
||||
state.samplesPerSymbol = 20;
|
||||
@@ -894,6 +912,7 @@ main (int argc, char **argv)
|
||||
opts.frame_nxdn48 = 0;
|
||||
opts.frame_nxdn96 = 1;
|
||||
opts.frame_dmr = 0;
|
||||
opts.frame_dpmr = 0; //borrow from LEH
|
||||
opts.frame_provoice = 0;
|
||||
opts.mod_c4fm = 1; //was 0
|
||||
opts.mod_qpsk = 0;
|
||||
@@ -910,6 +929,7 @@ main (int argc, char **argv)
|
||||
opts.frame_nxdn48 = 0;
|
||||
opts.frame_nxdn96 = 0;
|
||||
opts.frame_dmr = 1;
|
||||
opts.frame_dpmr = 0; //borrow from LEH
|
||||
opts.frame_provoice = 0;
|
||||
opts.mod_c4fm = 1; //just a test
|
||||
opts.mod_qpsk = 0;
|
||||
@@ -917,6 +937,32 @@ main (int argc, char **argv)
|
||||
state.rf_mod = 0; //
|
||||
fprintf (stderr,"Decoding only DMR/MOTOTRBO frames.\n");
|
||||
}
|
||||
else if (optarg[0] == 'm')
|
||||
{
|
||||
opts.frame_dstar = 0;
|
||||
opts.frame_x2tdma = 0;
|
||||
opts.frame_p25p1 = 0;
|
||||
opts.frame_nxdn48 = 0;
|
||||
opts.frame_nxdn96 = 0;
|
||||
opts.frame_dmr = 0;
|
||||
opts.frame_provoice = 0;
|
||||
opts.frame_dpmr = 1;
|
||||
state.samplesPerSymbol = 20; //same as NXDN48 - 20
|
||||
state.symbolCenter = 10; //same as NXDN48 - 10
|
||||
opts.mod_c4fm = 1;
|
||||
opts.mod_qpsk = 0;
|
||||
opts.mod_gfsk = 0;
|
||||
state.rf_mod = 0;
|
||||
//opts.pulse_digi_rate_in = 48000;
|
||||
//opts.pulse_digi_rate_out = 48000; //need to copy this to rtl type in and change rate out to 8000
|
||||
//opts.pulse_digi_in_channels = 1;
|
||||
//opts.pulse_digi_out_channels = 1;
|
||||
//opts.inverted_dpmr = 1;
|
||||
fprintf(stderr, "Setting symbol rate to 2400 / second\n");
|
||||
//fprintf(stderr, "Enabling only GFSK modulation optimizations.\n");
|
||||
fprintf(stderr, "Enabling only C4FM modulation optimizations.\n");
|
||||
fprintf(stderr, "Decoding only dPMR (4800 baud frames).\n");
|
||||
}
|
||||
break;
|
||||
case 'm':
|
||||
if (optarg[0] == 'a')
|
||||
@@ -974,6 +1020,11 @@ main (int argc, char **argv)
|
||||
opts.inverted_dmr = 1;
|
||||
fprintf (stderr,"Expecting inverted DMR/MOTOTRBO signals.\n");
|
||||
}
|
||||
else if (optarg[0] == 'd')
|
||||
{
|
||||
opts.inverted_dpmr = 1;
|
||||
fprintf (stderr, "Expecting inverted ICOM dPMR signals.\n");
|
||||
}
|
||||
break;
|
||||
case 'A':
|
||||
sscanf (optarg, "%i", &opts.mod_threshold);
|
||||
|
||||
Reference in New Issue
Block a user