mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
P25 - adds 3/4 rate convolutional decoder for confirmed packet data units.
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user