mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
The CQPSK decoder is starting to take shape, but needs more tweaking and testing. It's not keeping a good lock on strong P25 signals. I have to add some more features to the intrumentation package to allow me to visualize the internals of the CQPSK decoder so that I can get a better sense of what needs fine tuning. The CQPSK decoder may work for anyone that wants to sync the repo and run the build script.
58 lines
1.1 KiB
Java
58 lines
1.1 KiB
Java
package test;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import dsp.filter.interpolator.QPSKInterpolator;
|
|
import sample.complex.ComplexSample;
|
|
import util.Oscillator;
|
|
|
|
public class Interp
|
|
{
|
|
private final static Logger mLog =
|
|
LoggerFactory.getLogger( Interp.class );
|
|
|
|
private Oscillator mNCO = new Oscillator( 1200, 48000 );
|
|
|
|
public Interp()
|
|
{
|
|
|
|
}
|
|
|
|
public ComplexSample next()
|
|
{
|
|
return mNCO.nextComplex();
|
|
}
|
|
|
|
public static void main( String[] args )
|
|
{
|
|
mLog.debug( "Starting" );
|
|
|
|
Interp interp = new Interp();
|
|
|
|
ComplexSample[] samples = new ComplexSample[ 10 ];
|
|
|
|
for( int x = 0; x < 10; x++ )
|
|
{
|
|
samples[ x ] = interp.next();
|
|
}
|
|
|
|
QPSKInterpolator qi = new QPSKInterpolator();
|
|
|
|
ComplexSample result = qi.filter( samples, 1, 0.25f );
|
|
|
|
|
|
for( int x = 0; x < 10; x++ )
|
|
{
|
|
System.out.println( samples[x].toString() );
|
|
// mLog.debug( "Sample " + x + ": " + samples[ x ].toString() );
|
|
}
|
|
mLog.debug( "Result: " + result.toString() );
|
|
mLog.debug( "Finished" );
|
|
}
|
|
|
|
}
|