P25 - enhancement for LSM demod phase lock errors - adds new sync pattern detectors to detect Costas Loop phase lock errors and apply immediate correction to enable accurate symbol slicing.

This commit is contained in:
dennis.sheirer
2015-04-26 16:58:25 +00:00
parent c12123a81b
commit 2c4b3ab1b5
11 changed files with 376 additions and 72 deletions

View File

@@ -293,6 +293,14 @@ public class ComplexSample implements Serializable
return (float)Math.atan2( y(), x() );
}
/**
* Angle of this sample in degrees
*/
public float polarAngle()
{
return (float)Math.toDegrees( angle() );
}
/**
* Provides an approximate magnitude value for this sample.
*/
@@ -313,13 +321,18 @@ public class ComplexSample implements Serializable
public static void main( String[] args )
{
ComplexSample s1 = new ComplexSample( 0.24414134f, -0.6026385f );
ComplexSample s2 = new ComplexSample( -0.09531293f, -0.7052474f );
double SYMBOL_FREQUENCY = 2.0d * Math.PI * 4800.0d / 48000.0d;
double PHASE_CORRECTION_90_DEGREES = SYMBOL_FREQUENCY / 4.0d;
double PHASE_CORRECTION_180_DEGREES = SYMBOL_FREQUENCY / 2.0d;
double angle = Math.PI / 4;
ComplexSample s1 = new ComplexSample( (float)Math.sin( angle ), (float)Math.cos( angle ) );
ComplexSample s2 = new ComplexSample( (float)Math.sin( -angle ), (float)Math.cos( -angle ) );
ComplexSample symbol = ComplexSample.multiply( s1, s2.conjugate() );
mLog.debug( "S1 Mag:" + s1.magnitude() + " S2 Mag:" + s2.magnitude() + " SymMag:" + symbol.magnitude() );
mLog.debug( "S1:" + s1 + " S2:" + s2 + " Symbol:" + symbol );
mLog.debug( "S1:" + s1.polarAngle() + " S2:" + s2.polarAngle() + " Symbol:" + symbol.polarAngle() );
}
}