mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-21 13:15:40 -05:00
Added decoding and error correction on the NID fields: NAC and DUID. Making use of the IT++ library for BCH encoding/decoding.
This commit is contained in:
14
p25p1_ldu1.c
14
p25p1_ldu1.c
@@ -21,8 +21,8 @@
|
||||
void
|
||||
processLDU1 (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
// extracts IMBE frames rom LDU frame
|
||||
int i, j, k, dibit, stats, count, scount;
|
||||
// extracts IMBE frames from LDU frame
|
||||
int i, j, k, dibit, stats, scount;
|
||||
char imbe_fr[8][23];
|
||||
char lcformat[9], mfid[9], lcinfo[57], lsd1[9], lsd2[9], status[25];
|
||||
const int *w, *x, *y, *z;
|
||||
@@ -34,10 +34,8 @@ processLDU1 (dsd_opts * opts, dsd_state * state)
|
||||
lsd2[8] = 0;
|
||||
status[24] = 0;
|
||||
|
||||
skipDibit (opts, state, 3);
|
||||
status[0] = getDibit (opts, state) + 48;
|
||||
skipDibit (opts, state, 21);
|
||||
count = 57;
|
||||
// Now processing NID
|
||||
status[0] = 0;
|
||||
scount = 1;
|
||||
|
||||
if (opts->errorbars == 1)
|
||||
@@ -62,14 +60,12 @@ processLDU1 (dsd_opts * opts, dsd_state * state)
|
||||
status[scount] = getDibit (opts, state) + 48;
|
||||
scount++;
|
||||
stats = 1;
|
||||
count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
stats++;
|
||||
}
|
||||
dibit = getDibit (opts, state);
|
||||
count++;
|
||||
imbe_fr[*w][*x] = (1 & (dibit >> 1)); // bit 1
|
||||
imbe_fr[*y][*z] = (1 & dibit); // bit 0
|
||||
w++;
|
||||
@@ -102,7 +98,6 @@ processLDU1 (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
status[scount] = getDibit (opts, state) + 48;
|
||||
scount++;
|
||||
count++;
|
||||
stats = 1;
|
||||
}
|
||||
else
|
||||
@@ -110,7 +105,6 @@ processLDU1 (dsd_opts * opts, dsd_state * state)
|
||||
stats++;
|
||||
}
|
||||
skipDibit (opts, state, 1);
|
||||
count++;
|
||||
}
|
||||
|
||||
if (i == 1)
|
||||
|
||||
Reference in New Issue
Block a user