mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
Changed NID error detection and correction (edac) to using Berlekemp Massey 63-bit block decoder for the BCH(63,16,11) code so that we can correct up to 11 bit errors in a NID (versus previous 2).
This commit is contained in:
@@ -220,6 +220,36 @@ public class BitSetBuffer extends BitSet
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns this bitset as an array of integer ones and zeros
|
||||
*/
|
||||
public int[] toIntegerArray()
|
||||
{
|
||||
int[] values = new int[ mSize ];
|
||||
|
||||
for (int i = nextSetBit( 0 ); i >= 0 && i < mSize; i = nextSetBit( i+1 ) )
|
||||
{
|
||||
values[ i ] = 1;
|
||||
}
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns this bitset as a reversed bit order array of integer ones and zeros
|
||||
*/
|
||||
public int[] toReverseIntegerArray()
|
||||
{
|
||||
int[] values = new int[ mSize ];
|
||||
|
||||
for (int i = nextSetBit( 0 ); i >= 0 && i < mSize; i = nextSetBit( i+1 ) )
|
||||
{
|
||||
values[ mSize - i - 1 ] = 1;
|
||||
}
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a boolean array from startIndex to end of the bitset
|
||||
|
||||
Reference in New Issue
Block a user