#1633 DMR Decoder redesign. Uses new DQPSK vector/scalar demodulator implementations and soft sync detectors for more accurate detections and symbol timing and symbol period calculations. Includes two new calibrations with scalar and vector implementations for DQPSK demodulator and Interpolator. Enhances DMR error detection and correction algorithms, specifically the block product turbo code algorithms. (#2115)

Co-authored-by: Dennis Sheirer <dsheirer@github.com>
This commit is contained in:
Denny Sheirer
2024-12-24 06:53:58 -05:00
committed by GitHub
parent 11abb87177
commit 9ffa02e2e5
188 changed files with 8066 additions and 3192 deletions

View File

@@ -1,47 +1,61 @@
/*
* *****************************************************************************
* Copyright (C) 2014-2024 Dennis Sheirer
*
* * ******************************************************************************
* * Copyright (C) 2014-2020 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/>
* * *****************************************************************************
* 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.dsp.symbol;
public enum Dibit
{
D01_PLUS_3(false, true, 1, 4, 1),
D00_PLUS_1(false, false, 0, 0, 0),
D10_MINUS_1(true, false, 2, 8, 2),
D11_MINUS_3(true, true, 3, 12, 3);
D01_PLUS_3(false, true, 1, 4, 1, (float)(Math.PI / 4 * 3), (float)-Math.sin(Math.toRadians(45)), (float)Math.sin(Math.toRadians(45))),
D00_PLUS_1(false, false, 0, 0, 0, (float)(Math.PI / 4.0), (float)Math.sin(Math.toRadians(45)), (float)Math.sin(Math.toRadians(45))),
D10_MINUS_1(true, false, 2, 8, 2, (float)(Math.PI / -4.0), (float)Math.sin(Math.toRadians(45)), (float)-Math.sin(Math.toRadians(45))),
D11_MINUS_3(true, true, 3, 12, 3, (float)(Math.PI / 4 * -3), (float)-Math.sin(Math.toRadians(45)), (float)-Math.sin(Math.toRadians(45)));
private boolean mBit1;
private boolean mBit2;
private int mLowValue;
private int mHighValue;
private int mValue;
private float mPhase;
private float mIdealI;
private float mIdealQ;
private Dibit(boolean bit1, boolean bit2, int lowValue, int highValue, int value)
/**
* Dibit constructor.
* @param bit1 boolean value
* @param bit2 boolean value
* @param lowValue integer value of the low order bit
* @param highValue integer value of the high order bit
* @param value integer value combined of both bits.
* @param phase optimal phase value for this symbol when transmitted.
* @param idealI ideal inphase value for this symbol when transmitted.
* @param idealQ ideal quadrature value for this symbol when transmitted.
*/
Dibit(boolean bit1, boolean bit2, int lowValue, int highValue, int value, float phase, float idealI, float idealQ)
{
mBit1 = bit1;
mBit2 = bit2;
mLowValue = lowValue;
mHighValue = highValue;
mValue = value;
mPhase = phase;
mIdealI = idealI;
mIdealQ = idealQ;
}
/**
@@ -52,6 +66,33 @@ public enum Dibit
return mValue;
}
/**
* Ideal phase angle when this symbol is transmitted.
* @return ideal phase angle in radians.
*/
public float getIdealPhase()
{
return mPhase;
}
/**
* Ideal inphase value when this symbol is transmitted.
* @return ideal I
*/
public float getIdealI()
{
return mIdealI;
}
/**
* Ideal quadrature value when this symbol is transmitted.
* @return ideal Q
*/
public float getIdealQ()
{
return mIdealQ;
}
/**
* Allowable transition state 1 for trellis coded modulation. Indicates
* the dibit that differs from this dibit in the LSB bit position.