mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-13 00:57:31 -05:00
#2166 DMR adds RS(12,9) error detection and correction on link control. Enhances DMR CRC mask manager to process CSBK and link control messages to improve handling of RAS enabled systems when the user has not opted to ignore CRC checksums. Fixes issue with CapMax voice channels not resolving to frequency. Fixes issue in playlist editor where DMR LCN description values were not updating correctly. (#2200)
Co-authored-by: Dennis Sheirer <dsheirer@github.com>
This commit is contained in:
@@ -78,8 +78,8 @@ public abstract class BCH
|
||||
/**
|
||||
* Lookup tables. Note: naming convention is from the original C++ implementation.
|
||||
*/
|
||||
private int[] a_pow_tab;
|
||||
private int[] a_log_tab;
|
||||
public int[] a_pow_tab;
|
||||
public int[] a_log_tab;
|
||||
private int[] xi_tab;
|
||||
|
||||
/**
|
||||
|
||||
46
src/main/java/io/github/dsheirer/edac/bch/BCH_255.java
Normal file
46
src/main/java/io/github/dsheirer/edac/bch/BCH_255.java
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* *****************************************************************************
|
||||
* Copyright (C) 2014-2025 Dennis Sheirer
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
* ****************************************************************************
|
||||
*/
|
||||
|
||||
package io.github.dsheirer.edac.bch;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public class BCH_255 extends BCH
|
||||
{
|
||||
public static final int M = 8;
|
||||
|
||||
/**
|
||||
* Constructs an instance
|
||||
* @param k data bits size
|
||||
* @param t error detection and correction capacity of the generator polynomial used to create the codewords.
|
||||
*/
|
||||
public BCH_255(int k, int t)
|
||||
{
|
||||
// super(M, k, t, PRIMITIVE_POLYNOMIAL_GF_255);
|
||||
super(M, k, t, 0x12D);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
BCH_255 b = new BCH_255(M, 1);
|
||||
|
||||
System.out.println("ALOG: " + Arrays.toString(b.a_log_tab));
|
||||
System.out.println("APOW: " + Arrays.toString(b.a_pow_tab));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user