mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-21 05:05:38 -05:00
NXDN Frame Tweaks; Late Nite FS Testing III; #123
This commit is contained in:
@@ -456,8 +456,8 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
|
|||||||
{
|
{
|
||||||
//should we update min/max here? yes or no?
|
//should we update min/max here? yes or no?
|
||||||
|
|
||||||
state->max = ((state->max) + lmax) / 2;
|
// state->max = ((state->max) + lmax) / 2;
|
||||||
state->min = ((state->min) + lmin) / 2;
|
// state->min = ((state->min) + lmin) / 2;
|
||||||
|
|
||||||
goto SYNC_TEST_END;
|
goto SYNC_TEST_END;
|
||||||
}
|
}
|
||||||
@@ -1319,7 +1319,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
|
|||||||
|
|
||||||
// )
|
// )
|
||||||
// {
|
// {
|
||||||
// state->carrier = 1;
|
// //state->carrier = 1;
|
||||||
// state->offset = synctest_pos;
|
// state->offset = synctest_pos;
|
||||||
// state->max = ((state->max) + lmax) / 2;
|
// state->max = ((state->max) + lmax) / 2;
|
||||||
// state->min = ((state->min) + lmin) / 2;
|
// state->min = ((state->min) + lmin) / 2;
|
||||||
@@ -1355,7 +1355,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
|
|||||||
// // fprintf (stderr, " %s \n", synctest19);
|
// // fprintf (stderr, " %s \n", synctest19);
|
||||||
// return (29);
|
// return (29);
|
||||||
// }
|
// }
|
||||||
|
// else if (
|
||||||
if (
|
if (
|
||||||
(strcmp (synctest10, "3131331131") == 0 ) //this seems to be the most common 'correct' pattern on Type-C
|
(strcmp (synctest10, "3131331131") == 0 ) //this seems to be the most common 'correct' pattern on Type-C
|
||||||
|| (strcmp (synctest10, "3331331131") == 0 ) //this one hits on new sync but gives a bad lich code
|
|| (strcmp (synctest10, "3331331131") == 0 ) //this one hits on new sync but gives a bad lich code
|
||||||
@@ -1365,6 +1365,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
|
|||||||
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
// state->carrier = 1;
|
// state->carrier = 1;
|
||||||
state->offset = synctest_pos;
|
state->offset = synctest_pos;
|
||||||
state->max = ((state->max) + lmax) / 2;
|
state->max = ((state->max) + lmax) / 2;
|
||||||
@@ -1383,9 +1384,6 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
|
|||||||
state->lastsynctype = 28;
|
state->lastsynctype = 28;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Disabling Inverted Sync for testing -- using SDR++ or RTL Input, I only ever see positive sync pattern
|
|
||||||
//This will also further reduce any FSW false positives, but at the cost of inverted sync
|
|
||||||
|
|
||||||
else if (
|
else if (
|
||||||
|
|
||||||
(strcmp (synctest10, "1313113313") == 0 )
|
(strcmp (synctest10, "1313113313") == 0 )
|
||||||
@@ -1396,6 +1394,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
|
|||||||
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
// state->carrier = 1;
|
// state->carrier = 1;
|
||||||
state->offset = synctest_pos;
|
state->offset = synctest_pos;
|
||||||
state->max = ((state->max) + lmax) / 2;
|
state->max = ((state->max) + lmax) / 2;
|
||||||
|
|||||||
@@ -1358,7 +1358,7 @@ main (int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef AERO_BUILD
|
#ifdef AERO_BUILD
|
||||||
fprintf (stderr, "Build Version: v2.0.1-26 Win32 \n");
|
fprintf (stderr, "Build Version: v2.0.1-27 Win32 \n");
|
||||||
#else
|
#else
|
||||||
fprintf (stderr, "Build Version: %s \n", GIT_TAG);
|
fprintf (stderr, "Build Version: %s \n", GIT_TAG);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -2072,7 +2072,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
|||||||
if (opts->ncurses_compact == 1)
|
if (opts->ncurses_compact == 1)
|
||||||
{
|
{
|
||||||
printw ("------------------------------------------------------------------------------\n");
|
printw ("------------------------------------------------------------------------------\n");
|
||||||
printw ("| Digital Speech Decoder: Florida Man Edition - Aero %s \n", "v2.0.1-26 Win32");
|
printw ("| Digital Speech Decoder: Florida Man Edition - Aero %s \n", "v2.0.1-27 Win32");
|
||||||
printw ("------------------------------------------------------------------------------\n");
|
printw ("------------------------------------------------------------------------------\n");
|
||||||
}
|
}
|
||||||
#elif LIMAZULUTWEAKS
|
#elif LIMAZULUTWEAKS
|
||||||
@@ -2101,7 +2101,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
|||||||
if (i == 4) printw (" MBElib %s", versionstr);
|
if (i == 4) printw (" MBElib %s", versionstr);
|
||||||
#ifdef AERO_BUILD
|
#ifdef AERO_BUILD
|
||||||
if (i == 5) printw (" %s ", "Aero Win32");
|
if (i == 5) printw (" %s ", "Aero Win32");
|
||||||
if (i == 6) printw (" v2.0.1-26 Win32 \n");
|
if (i == 6) printw (" v2.0.1-27 Win32 \n");
|
||||||
#else
|
#else
|
||||||
if (i == 5) printw (" %s ", "zDEV BUILD");
|
if (i == 5) printw (" %s ", "zDEV BUILD");
|
||||||
// if (i == 5) printw (" %s ", "MAIN BUILD");
|
// if (i == 5) printw (" %s ", "MAIN BUILD");
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ void nxdn_deperm_facch(dsd_opts * opts, dsd_state * state, uint8_t bits[144])
|
|||||||
check = check | trellis_buf[84+i]; //80
|
check = check | trellis_buf[84+i]; //80
|
||||||
}
|
}
|
||||||
|
|
||||||
if (crc != check)
|
if (crc != check && opts->payload == 1)
|
||||||
{
|
{
|
||||||
fprintf (stderr, " FACCH1");
|
fprintf (stderr, " FACCH1");
|
||||||
fprintf (stderr, "%s", KRED);
|
fprintf (stderr, "%s", KRED);
|
||||||
@@ -254,7 +254,7 @@ void nxdn_deperm_sacch(dsd_opts * opts, dsd_state * state, uint8_t bits[60])
|
|||||||
if (crc == check) NXDN_Elements_Content_decode(opts, state, 1, nsf_sacch);
|
if (crc == check) NXDN_Elements_Content_decode(opts, state, 1, nsf_sacch);
|
||||||
else if (opts->aggressive_framesync == 0) NXDN_Elements_Content_decode(opts, state, 0, nsf_sacch);
|
else if (opts->aggressive_framesync == 0) NXDN_Elements_Content_decode(opts, state, 0, nsf_sacch);
|
||||||
|
|
||||||
if (crc != check)
|
if (crc != check && opts->payload == 1)
|
||||||
{
|
{
|
||||||
fprintf (stderr, " SACCH NSF");
|
fprintf (stderr, " SACCH NSF");
|
||||||
fprintf (stderr, "%s", KRED);
|
fprintf (stderr, "%s", KRED);
|
||||||
@@ -296,7 +296,7 @@ void nxdn_deperm_sacch(dsd_opts * opts, dsd_state * state, uint8_t bits[60])
|
|||||||
else fprintf (stderr, " ");
|
else fprintf (stderr, " ");
|
||||||
fprintf (stderr, "%s", KNRM);
|
fprintf (stderr, "%s", KNRM);
|
||||||
|
|
||||||
if (crc != check)
|
if (crc != check && opts->payload == 1)
|
||||||
{
|
{
|
||||||
fprintf (stderr, " SACCH SF%d", sf);
|
fprintf (stderr, " SACCH SF%d", sf);
|
||||||
fprintf (stderr, "%s", KRED);
|
fprintf (stderr, "%s", KRED);
|
||||||
@@ -429,7 +429,7 @@ void nxdn_deperm_facch2_udch(dsd_opts * opts, dsd_state * state, uint8_t bits[34
|
|||||||
check = check | trellis_buf[i+184];
|
check = check | trellis_buf[i+184];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (crc != check)
|
if (crc != check && opts->payload == 1)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "%s", KYEL);
|
fprintf (stderr, "%s", KYEL);
|
||||||
if (type == 0) fprintf (stderr, " UDCH");
|
if (type == 0) fprintf (stderr, " UDCH");
|
||||||
@@ -725,7 +725,7 @@ void nxdn_deperm_scch(dsd_opts * opts, dsd_state * state, uint8_t bits[60], uint
|
|||||||
|
|
||||||
//NOTE: scch has its own message format, and thus, doesn't go to content element decoding
|
//NOTE: scch has its own message format, and thus, doesn't go to content element decoding
|
||||||
//like everything else does
|
//like everything else does
|
||||||
if (crc != check)
|
if (crc != check && opts->payload == 1)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "%s", KRED);
|
fprintf (stderr, "%s", KRED);
|
||||||
fprintf (stderr, " (CRC ERR)");
|
fprintf (stderr, " (CRC ERR)");
|
||||||
@@ -834,7 +834,7 @@ void nxdn_deperm_facch3_udch2(dsd_opts * opts, dsd_state * state, uint8_t bits[2
|
|||||||
for (int i = 0; i < 12; i++) f3_udch2_bytes[i+(j*12)] = m_data[i];
|
for (int i = 0; i < 12; i++) f3_udch2_bytes[i+(j*12)] = m_data[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (crc[0] != check[0] || crc[1] != check[1])
|
if ( (crc[0] != check[0] || crc[1] != check[1]) && opts->payload == 1)
|
||||||
{
|
{
|
||||||
if (type == 0) fprintf (stderr, " UDCH2");
|
if (type == 0) fprintf (stderr, " UDCH2");
|
||||||
if (type == 1) fprintf (stderr, " FACCH3");
|
if (type == 1) fprintf (stderr, " FACCH3");
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ void nxdn_frame (dsd_opts * opts, dsd_state * state)
|
|||||||
if (opts->payload == 1)
|
if (opts->payload == 1)
|
||||||
fprintf (stderr, "L%02X - ", lich);
|
fprintf (stderr, "L%02X - ", lich);
|
||||||
}
|
}
|
||||||
else if (voice || facch || sacch || facch2 || cac)
|
else if (voice || facch || sacch || facch2 || udch || cac)
|
||||||
{
|
{
|
||||||
if (opts->frame_nxdn48 == 1)
|
if (opts->frame_nxdn48 == 1)
|
||||||
{
|
{
|
||||||
@@ -396,8 +396,8 @@ void nxdn_frame (dsd_opts * opts, dsd_state * state)
|
|||||||
|
|
||||||
#endif //end LIMAZULUTWEAKS
|
#endif //end LIMAZULUTWEAKS
|
||||||
|
|
||||||
if (opts->scanner_mode == 1)
|
if (opts->scanner_mode == 1)
|
||||||
state->last_cc_sync_time = time(NULL) + 2; //add a little extra hangtime between resuming scan
|
state->last_cc_sync_time = time(NULL) + 2; //add a little extra hangtime between resuming scan
|
||||||
|
|
||||||
//Option/Steal Flags echoed in Voice, V+F, or Data
|
//Option/Steal Flags echoed in Voice, V+F, or Data
|
||||||
if (voice && !facch) //voice only, no facch steal
|
if (voice && !facch) //voice only, no facch steal
|
||||||
@@ -468,6 +468,7 @@ if (opts->scanner_mode == 1)
|
|||||||
// if (facch & 2) nxdn_deperm_facch(opts, state, facch_bits_b);
|
// if (facch & 2) nxdn_deperm_facch(opts, state, facch_bits_b);
|
||||||
|
|
||||||
//only run facch in second slot if its not equal to the first one
|
//only run facch in second slot if its not equal to the first one
|
||||||
|
//ideally, this would work better AFTER decoding/FEC
|
||||||
if (facch & 1) nxdn_deperm_facch(opts, state, facch_bits_a);
|
if (facch & 1) nxdn_deperm_facch(opts, state, facch_bits_a);
|
||||||
if (facch & 2)
|
if (facch & 2)
|
||||||
{
|
{
|
||||||
@@ -499,6 +500,7 @@ if (opts->scanner_mode == 1)
|
|||||||
closeMbeOutFile (opts, state);
|
closeMbeOutFile (opts, state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//may need to reconsider this, due to double FACCH1 steals on some Type-C (ASSGN_DUP, etc) and Conventional Systems (random IDLE FACCH1 steal for no reason)
|
||||||
if (opts->frame_nxdn48 == 1) closeMbeOutFile (opts, state); //okay to close right away if nxdn48, no data/voice frames mixing
|
if (opts->frame_nxdn48 == 1) closeMbeOutFile (opts, state); //okay to close right away if nxdn48, no data/voice frames mixing
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user