P25 - adds 3/4 rate convolutional decoder for confirmed packet data units.

This commit is contained in:
dennis.sheirer
2015-01-17 18:24:39 +00:00
parent a9ac26b4f8
commit 35855b08bb
4 changed files with 771 additions and 37 deletions

View File

@@ -19,6 +19,60 @@ public enum Dibit
mLowValue = lowValue;
mHighValue = highValue;
}
/**
* Allowable transition state 1 for trellis coded modulation. Indicates
* the dibit that differs from this dibit in the LSB bit position.
*/
public Dibit getAllowableTransition1()
{
switch( this )
{
case D00_PLUS_1:
return D01_PLUS_3;
case D01_PLUS_3:
return D00_PLUS_1;
case D10_MINUS_1:
return D11_MINUS_3;
case D11_MINUS_3:
return D10_MINUS_1;
default:
/* We'll never get here */
return D00_PLUS_1;
}
}
/**
* Allowable transition state 2 for trellis coded modulation. Indicates
* the dibit that differs from this dibit in the MSB bit position.
*/
public Dibit getAllowableTransition2()
{
switch( this )
{
case D00_PLUS_1:
return D10_MINUS_1;
case D01_PLUS_3:
return D11_MINUS_3;
case D10_MINUS_1:
return D00_PLUS_1;
case D11_MINUS_3:
return D01_PLUS_3;
default:
/* We'll never get here */
return D00_PLUS_1;
}
}
/**
* Indicates if the trellis coded modulation dibit is allowed to transition
* to the dibit argument.
*/
public boolean isAllowableTransition( Dibit dibit )
{
return dibit == getAllowableTransition1() ||
dibit == getAllowableTransition2();
}
public boolean getBit1()
{