mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-13 17:17:29 -05:00
P25 Phase 2 Decoder implementation.
This commit is contained in:
@@ -1,43 +1,27 @@
|
||||
/*
|
||||
*
|
||||
* * ******************************************************************************
|
||||
* * Copyright (C) 2014-2019 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;
|
||||
|
||||
/*******************************************************************************
|
||||
* SDR Trunk
|
||||
* Copyright (C) 2014 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/>
|
||||
*
|
||||
* --------------------------------------------------------------------
|
||||
* Based on Ed Fuentetaja's DSD RS decoder, May 2014, at:
|
||||
* https://github.com/szechyjs/dsd/blob/master/ReedSolomon.hpp
|
||||
* --------------------------------------------------------------------
|
||||
* Adapted from Mr. Simon Rockliff's version at: http://www.eccpage.com/rs.c
|
||||
*
|
||||
* Simon Rockliff, University of Adelaide 21/9/89
|
||||
* 26/6/91 Slight modifications to remove a compiler dependent bug which
|
||||
* hadn't previously surfaced. A few extra comments added for clarity.
|
||||
* Appears to all work fine, ready for posting to net!
|
||||
*
|
||||
* Notice
|
||||
* --------
|
||||
* This program may be freely modified and/or given to whoever wants it.
|
||||
* A condition of such distribution is that the author's contribution be
|
||||
* acknowledged by his name being left in the comments heading the program,
|
||||
* however no responsibility is accepted for any financial or other loss which
|
||||
* may result from some unforseen errors or malfunctioning of the program
|
||||
* during use.
|
||||
* Simon Rockliff, 26th June 1991
|
||||
******************************************************************************/
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
*
|
||||
* * ******************************************************************************
|
||||
* * Copyright (C) 2014-2019 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;
|
||||
|
||||
public class ReedSolomon_44_16_29 extends BerlekempMassey_63
|
||||
{
|
||||
//Hamming distance = 29, so max correctable errors = 29 / 2 = 14
|
||||
private static final int MAXIMUM_CORRECTABLE_ERRORS = 14;
|
||||
|
||||
public ReedSolomon_44_16_29()
|
||||
{
|
||||
super(MAXIMUM_CORRECTABLE_ERRORS);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
*
|
||||
* * ******************************************************************************
|
||||
* * Copyright (C) 2014-2019 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;
|
||||
|
||||
public class ReedSolomon_63_35_29 extends BerlekempMassey_63
|
||||
{
|
||||
/**
|
||||
* Reed-Solomon RS(63,35,29) decoder. This can also be used for error detection and correction of the following
|
||||
* RS codes:
|
||||
*
|
||||
* RS(46,26,21) - max 10 errors = P25P2 IEMI
|
||||
* RS(45,26,20) - max 9 errors = P25P2 SOEMI (FACCH)
|
||||
* RS(52,30,23) - max 11 errors = P25P2 IOEMI (SACCH)
|
||||
* RS(44,16,29) - max 14 errors = P25P2 ESS
|
||||
*
|
||||
* The maximum correctable errors is determined by (n-k)/2, or hamming distance divided by 2.
|
||||
*/
|
||||
public ReedSolomon_63_35_29(int maximumCorrectableErrors)
|
||||
{
|
||||
super(maximumCorrectableErrors);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user