Tweaks to NXDN FSW Tests II; #123
This commit is contained in:
parent
7ec0bf83b4
commit
fc01712132
|
|
@ -231,10 +231,10 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
|
|||
{
|
||||
t_max = 12; //based on Frame_Sync_2 pattern
|
||||
}
|
||||
//if Phase 2 (or YSF in future), then only 20
|
||||
//if Phase 2 (or YSF in future), then only 19
|
||||
else if (state->lastsynctype == 35 || state->lastsynctype == 36) //P2
|
||||
{
|
||||
t_max = 20;
|
||||
t_max = 19; //Phase 2 S-ISCH is only 19
|
||||
}
|
||||
else t_max = 24; //24 for everything else
|
||||
|
||||
|
|
@ -1279,18 +1279,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
|
|||
|
||||
#ifdef NXDNTESTSYNC //use experimental sync detection based on multiple factors
|
||||
|
||||
//NXDN FSW sync and handling - testing with more exact syncs and also inlv (state->max)
|
||||
//Theory is that pure noise is always much louder than an organized signal
|
||||
|
||||
//The state->max inlvl will hinge on the user setting an appropriate gain level
|
||||
//so, this may not entirely be ideal, loud system may still not decode properly
|
||||
//currently set to invlv 5000 or ~31% or less audio in level when dividing by 164
|
||||
|
||||
//Also, landing on other signal types will probably also
|
||||
//trigger this without squelch enabled
|
||||
|
||||
//NOTE: This test seems to work better for NXDN48 than it does for NXDN96
|
||||
|
||||
//NXDN FSW sync and handling - testing with more exact syncs patterns
|
||||
else if ((opts->frame_nxdn96 == 1) || (opts->frame_nxdn48 == 1))
|
||||
{
|
||||
strncpy (synctest10, (synctest_p - 9), 10); //FSW only
|
||||
|
|
@ -1300,86 +1289,103 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
|
|||
//error will occur due to the demodulation issues internally
|
||||
|
||||
//Preamble plus FSW, proceed right away
|
||||
if ( (strcmp (synctest19, "3131133313131331131") == 0 ) ||
|
||||
(strcmp (synctest19, "3131133313331331131") == 0 ) ||
|
||||
(strcmp (synctest19, "3131133313131331111") == 0 ) ||
|
||||
(strcmp (synctest19, "3131133313331331111") == 0 ) )
|
||||
if (
|
||||
|
||||
(strcmp (synctest19, "3131133313131331131") == 0 )
|
||||
|| (strcmp (synctest19, "3131133313331331131") == 0 )
|
||||
|| (strcmp (synctest19, "3131133313131331111") == 0 )
|
||||
|| (strcmp (synctest19, "3131133313331331111") == 0 )
|
||||
|
||||
)
|
||||
{
|
||||
state->carrier = 1;
|
||||
state->offset = synctest_pos;
|
||||
state->max = ((state->max) + lmax) / 2;
|
||||
state->min = ((state->min) + lmin) / 2;
|
||||
// state->carrier = 1;
|
||||
state->lastsynctype = 28;
|
||||
// if (opts->payload == 1) fprintf (stderr, "\n PANDF ");
|
||||
// if (opts->payload == 1) fprintf (stderr, " %s ", synctest19);
|
||||
// if (opts->payload == 1) fprintf (stderr, " maxlvl %d ", state->max / 164);
|
||||
// if (opts->payload == 1) fprintf (stderr, " minlvl %d ", state->min);
|
||||
if (state->max < 5000)
|
||||
return (28);
|
||||
}
|
||||
else if ( (strcmp (synctest19, "1313311133131331131") == 0 ) ||
|
||||
(strcmp (synctest19, "1313311133331331131") == 0 ) ||
|
||||
(strcmp (synctest19, "1313311133131331111") == 0 ) ||
|
||||
(strcmp (synctest19, "1313311133331331111") == 0 ) )
|
||||
{
|
||||
state->carrier = 1;
|
||||
|
||||
state->offset = synctest_pos;
|
||||
state->max = ((state->max) + lmax) / 2;
|
||||
state->min = ((state->min) + lmin) / 2;
|
||||
|
||||
// if (opts->payload == 1)
|
||||
// fprintf (stderr, "\n +PANDF ");
|
||||
// if (opts->payload == 1)
|
||||
// fprintf (stderr, " %s \n", synctest19);
|
||||
return (28);
|
||||
}
|
||||
else if (
|
||||
|
||||
(strcmp (synctest19, "1313311133131331131") == 0 )
|
||||
|| (strcmp (synctest19, "1313311133331331131") == 0 )
|
||||
|| (strcmp (synctest19, "1313311133131331111") == 0 )
|
||||
|| (strcmp (synctest19, "1313311133331331111") == 0 )
|
||||
|
||||
)
|
||||
{
|
||||
// state->carrier = 1;
|
||||
state->lastsynctype = 29;
|
||||
// if (opts->payload == 1) fprintf (stderr, "\n PANDF ");
|
||||
// if (opts->payload == 1) fprintf (stderr, " %s ", synctest19);
|
||||
// if (opts->payload == 1) fprintf (stderr, " maxlvl %d ", state->max / 164);
|
||||
// if (opts->payload == 1) fprintf (stderr, " minlvl %d ", state->min);
|
||||
if (state->max < 5000)
|
||||
return (29);
|
||||
|
||||
state->offset = synctest_pos;
|
||||
state->max = ((state->max) + lmax) / 2;
|
||||
state->min = ((state->min) + lmin) / 2;
|
||||
|
||||
// if (opts->payload == 1)
|
||||
// fprintf (stderr, "\n -PANDF ");
|
||||
// if (opts->payload == 1)
|
||||
// fprintf (stderr, " %s \n", synctest19);
|
||||
return (29);
|
||||
}
|
||||
|
||||
else if ( (strcmp (synctest10, "3131331131") == 0 ) ||
|
||||
(strcmp (synctest10, "3331331131") == 0 ) ||
|
||||
(strcmp (synctest10, "3131331111") == 0 ) ||
|
||||
(strcmp (synctest10, "3331331111") == 0 ) )
|
||||
else if (
|
||||
(strcmp (synctest10, "3131331131") == 0 )
|
||||
|| (strcmp (synctest10, "3331331131") == 0 )
|
||||
|| (strcmp (synctest10, "3131331111") == 0 )
|
||||
|| (strcmp (synctest10, "3331331111") == 0 )
|
||||
|
||||
)
|
||||
{
|
||||
state->carrier = 1;
|
||||
// state->carrier = 1;
|
||||
state->offset = synctest_pos;
|
||||
state->max = ((state->max) + lmax) / 2;
|
||||
state->min = ((state->min) + lmin) / 2;
|
||||
|
||||
if (state->lastsynctype == 28)
|
||||
{
|
||||
// if (opts->payload == 1) fprintf (stderr, "\n FSW ");
|
||||
// if (opts->payload == 1) fprintf (stderr, " %s ", synctest10);
|
||||
// if (opts->payload == 1) fprintf (stderr, " maxlvl %d ", state->max / 164); //see if we can get max to meet threshold first?
|
||||
// if (opts->payload == 1) fprintf (stderr, " minlvl %d ", state->min);
|
||||
if (state->max < 5000)
|
||||
return (28);
|
||||
}
|
||||
if (state->max < 5000)
|
||||
state->lastsynctype = 28;
|
||||
// if (opts->payload == 1)
|
||||
// fprintf (stderr, "\n +FSW ");
|
||||
// if (opts->payload == 1)
|
||||
// fprintf (stderr, " %s \n", synctest10);
|
||||
return (28);
|
||||
}
|
||||
|
||||
state->lastsynctype = 28;
|
||||
|
||||
|
||||
}
|
||||
|
||||
else if ( (strcmp (synctest10, "1313113313") == 0 ) ||
|
||||
(strcmp (synctest10, "1113113313") == 0 ) ||
|
||||
(strcmp (synctest10, "1313113333") == 0 ) ||
|
||||
(strcmp (synctest10, "1113113333") == 0 ) )
|
||||
else if (
|
||||
|
||||
(strcmp (synctest10, "1313113313") == 0 )
|
||||
|| (strcmp (synctest10, "1113113313") == 0 )
|
||||
|| (strcmp (synctest10, "1313113333") == 0 )
|
||||
|| (strcmp (synctest10, "1113113333") == 0 )
|
||||
|
||||
)
|
||||
{
|
||||
state->carrier = 1;
|
||||
// state->carrier = 1;
|
||||
state->offset = synctest_pos;
|
||||
state->max = ((state->max) + lmax) / 2;
|
||||
state->min = ((state->min) + lmin) / 2;
|
||||
|
||||
if (state->lastsynctype == 29)
|
||||
{
|
||||
// if (opts->payload == 1) fprintf (stderr, "\n FSW ");
|
||||
// if (opts->payload == 1) fprintf (stderr, " %s ", synctest10);
|
||||
// if (opts->payload == 1) fprintf (stderr, " maxlvl %d ", state->max / 164);
|
||||
// if (opts->payload == 1) fprintf (stderr, " minlvl %d ", state->min);
|
||||
if (state->max < 5000)
|
||||
return (29);
|
||||
}
|
||||
if (state->max < 5000)
|
||||
state->lastsynctype = 29;
|
||||
// if (opts->payload == 1)
|
||||
// fprintf (stderr, "\n -FSW ");
|
||||
// if (opts->payload == 1)
|
||||
// fprintf (stderr, " %s \n", synctest10);
|
||||
return (29);
|
||||
}
|
||||
state->lastsynctype = 29;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,18 @@ int pretty_colors()
|
|||
#include "p25p1_heuristics.h"
|
||||
#include "pa_devs.h"
|
||||
|
||||
#ifdef LIMAZULUTWEAKS
|
||||
char * FM_banner[9] = {
|
||||
" ",
|
||||
" ██████╗ ██████╗██████╗ ███╗ ███████╗",
|
||||
" ██╔══██╗██╔════╝██╔══██╗ ███║ ╚════██║",
|
||||
" ██║ ██║╚█████╗ ██║ ██║ Lima ███║ ███╔═╝",
|
||||
" ██║ ██║ ╚═══██╗██║ ██║ Zulu ███║ ██╔══╝ ",
|
||||
" ██████╔╝██████╔╝██████╔╝ Edition III ████████╗███████╗",
|
||||
" ╚═════╝ ╚═════╝ ╚═════╝ Windows 32-bit╚═══════╝╚══════╝",
|
||||
" "
|
||||
};
|
||||
#else
|
||||
char * FM_banner[9] = {
|
||||
" ",
|
||||
" ██████╗ ██████╗██████╗ ███████╗███╗ ███╗███████╗",
|
||||
|
|
@ -52,8 +64,9 @@ char * FM_banner[9] = {
|
|||
" ██║ ██║ ╚═══██╗██║ ██║ ██╔══╝ ██║╚██╔╝██║██╔══╝ ",
|
||||
" ██████╔╝██████╔╝██████╔╝ ██║ ██║ ╚═╝ ██║███████╗",
|
||||
" ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝",
|
||||
" 'Aero' Edition v2.0.0-95-g8485be9 Windows 32-bit "
|
||||
" 'Aero' Edition v2.0.0-99-ge390251 Windows 32-bit "
|
||||
};
|
||||
#endif
|
||||
|
||||
int comp (const void *a, const void *b)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -49,7 +49,19 @@ int i = 0;
|
|||
char versionstr[25];
|
||||
unsigned long long int call_matrix[33][6];
|
||||
|
||||
|
||||
#ifdef LIMAZULUTWEAKS
|
||||
char * FM_bannerN[9] = {
|
||||
" ",
|
||||
" ██████╗ ██████╗██████╗ ███╗ ███████╗",
|
||||
" ██╔══██╗██╔════╝██╔══██╗ ███║ ╚════██║",
|
||||
" ██║ ██║╚█████╗ ██║ ██║ ███║ ███╔═╝",
|
||||
" ██║ ██║ ╚═══██╗██║ ██║ Lima ███║ ██╔══╝ ",
|
||||
" ██████╔╝██████╔╝██████╔╝ Zulu ████████╗███████╗",
|
||||
" ╚═════╝ ╚═════╝ ╚═════╝ Edition III ╚═══════╝╚══════╝",
|
||||
" ",
|
||||
" "
|
||||
};
|
||||
#else
|
||||
char * FM_bannerN[9] = {
|
||||
" ",
|
||||
" ██████╗ ██████╗██████╗ ███████╗███╗ ███╗███████╗ ",
|
||||
|
|
@ -61,7 +73,7 @@ char * FM_bannerN[9] = {
|
|||
" ",
|
||||
" "
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
char * SyncTypes[44] = {
|
||||
|
|
@ -2070,11 +2082,19 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
|||
|
||||
//Start Printing Section
|
||||
erase();
|
||||
#ifdef LIMAZULUTWEAKS
|
||||
if (opts->ncurses_compact == 1)
|
||||
{
|
||||
printw ("------------------------------------------------------------------------------\n");
|
||||
printw ("| Digital Speech Decoder: Florida Man Edition - Aero %s \n", "v2.0.0-95-g8485be9 Win32");
|
||||
printw ("| Digital Speech Decoder: LimaZulu Edition - Aero %s \n", "v2.0.0-99-ge390251 Win32");
|
||||
}
|
||||
#else
|
||||
if (opts->ncurses_compact == 1)
|
||||
{
|
||||
printw ("------------------------------------------------------------------------------\n");
|
||||
printw ("| Digital Speech Decoder: Florida Man Edition - Aero %s \n", "v2.0.0-99-ge390251 Win32");
|
||||
}
|
||||
#endif
|
||||
if (opts->ncurses_compact == 0)
|
||||
{
|
||||
attron(COLOR_PAIR(6));
|
||||
|
|
@ -2085,7 +2105,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
|||
if (i == 2) printw (" 'q' to Quit ");
|
||||
if (i == 4) printw (" MBElib %s", versionstr);
|
||||
if (i == 5) printw (" %s ", "Aero Win32"); //printw (" %s \n", GIT_TAG);
|
||||
if (i == 6) printw (" %s \n", "v2.0.0-95-g8485be9"); //printw (" %s \n", GIT_TAG);
|
||||
if (i == 6) printw (" %s \n", "v2.0.0-99-ge390251"); //printw (" %s \n", GIT_TAG);
|
||||
else printw ("\n");
|
||||
}
|
||||
attroff(COLOR_PAIR(6)); //6
|
||||
|
|
|
|||
|
|
@ -49,14 +49,14 @@ static const unsigned int CNXDNConvolution_NUM_OF_STATES = 16U;
|
|||
static const uint32_t CNXDNConvolution_M = 4U;
|
||||
static const unsigned int CNXDNConvolution_K = 5U;
|
||||
|
||||
static uint16_t m_metrics1[16U] = {0};
|
||||
static uint16_t m_metrics2[16U] = {0};
|
||||
static uint64_t m_decisions[300U] = {0};
|
||||
//NOTE:
|
||||
static uint16_t m_metrics1[16U];
|
||||
static uint16_t m_metrics2[16U];
|
||||
static uint64_t m_decisions[300U]; //300
|
||||
static uint16_t * m_oldMetrics = NULL;
|
||||
static uint16_t * m_newMetrics = NULL;
|
||||
static uint64_t * m_dp = NULL;
|
||||
|
||||
|
||||
/* Functions ----------------------------------------------------------------*/
|
||||
|
||||
void CNXDNConvolution_decode(uint8_t s0, uint8_t s1)
|
||||
|
|
@ -158,13 +158,15 @@ void CNXDNConvolution_encode(const unsigned char* in, unsigned char* out, unsign
|
|||
|
||||
void CNXDNConvolution_start(void)
|
||||
{
|
||||
memset(m_metrics1, 0x00U, CNXDNConvolution_NUM_OF_STATES * sizeof(uint16_t));
|
||||
memset(m_metrics2, 0x00U, CNXDNConvolution_NUM_OF_STATES * sizeof(uint16_t));
|
||||
|
||||
m_oldMetrics = m_metrics1;
|
||||
m_newMetrics = m_metrics2;
|
||||
m_dp = m_decisions;
|
||||
|
||||
memset(m_metrics1, 0x00U, sizeof(m_metrics1));
|
||||
memset(m_metrics2, 0x00U, sizeof(m_metrics2));
|
||||
memset(m_decisions, 0x00U, sizeof(m_decisions));
|
||||
|
||||
for (int x = 0; x < 4; x++) CNXDNConvolution_decode(0U, 0U);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue