mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
P25 LSM decoder work in progress. Adds a CQPSK decoder based on Max's (KA1RBI) scope.py and gardner loop.
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.
This commit is contained in:
@@ -21,6 +21,8 @@ import javax.swing.JLabel;
|
||||
|
||||
import source.config.SourceConfiguration;
|
||||
import controller.ResourceManager;
|
||||
import controller.channel.Channel;
|
||||
import controller.channel.ChannelValidationException;
|
||||
|
||||
public class EmptySourceEditor extends SourceEditor
|
||||
{
|
||||
|
||||
@@ -21,14 +21,15 @@ package source;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.DefaultComboBoxModel;
|
||||
import javax.swing.JComboBox;
|
||||
|
||||
import source.config.SourceConfigFactory;
|
||||
import source.config.SourceConfiguration;
|
||||
import controller.Editor;
|
||||
import controller.channel.AbstractChannelEditor;
|
||||
import controller.channel.ChannelNode;
|
||||
import controller.channel.ChannelValidationException;
|
||||
|
||||
public class SourceComponentEditor extends AbstractChannelEditor
|
||||
{
|
||||
@@ -89,6 +90,11 @@ public class SourceComponentEditor extends AbstractChannelEditor
|
||||
|
||||
reset();
|
||||
}
|
||||
|
||||
public SourceEditor getSourceEditor()
|
||||
{
|
||||
return mEditor;
|
||||
}
|
||||
|
||||
public void reset()
|
||||
{
|
||||
|
||||
@@ -20,6 +20,8 @@ package source;
|
||||
import source.config.SourceConfiguration;
|
||||
import controller.Editor;
|
||||
import controller.ResourceManager;
|
||||
import controller.channel.Channel;
|
||||
import controller.channel.ChannelValidationException;
|
||||
|
||||
public abstract class SourceEditor extends Editor
|
||||
{
|
||||
|
||||
@@ -23,20 +23,25 @@ import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.nio.ShortBuffer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
|
||||
import javax.sound.sampled.AudioFormat;
|
||||
import javax.sound.sampled.AudioInputStream;
|
||||
import javax.sound.sampled.AudioSystem;
|
||||
import javax.sound.sampled.UnsupportedAudioFileException;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import sample.Broadcaster;
|
||||
import sample.Listener;
|
||||
import sample.complex.ComplexSample;
|
||||
|
||||
public class ComplexWaveSource extends WaveSource
|
||||
{
|
||||
private final static Logger mLog =
|
||||
LoggerFactory.getLogger( ComplexWaveSource.class );
|
||||
|
||||
private boolean mRunning = false;
|
||||
private boolean mLoop = false;
|
||||
|
||||
@@ -51,8 +56,7 @@ public class ComplexWaveSource extends WaveSource
|
||||
|
||||
private static int BUFFER_SAMPLE_SIZE = 2000;
|
||||
|
||||
private ArrayList<Listener<ComplexSample>> mListeners =
|
||||
new ArrayList<Listener<ComplexSample>>();
|
||||
private Broadcaster<ComplexSample> mBroadcaster = new Broadcaster<ComplexSample>();
|
||||
|
||||
/**
|
||||
* Single channel (mono) wave file playback source with optional looping
|
||||
@@ -223,7 +227,7 @@ public class ComplexWaveSource extends WaveSource
|
||||
|
||||
if( broadcast )
|
||||
{
|
||||
send( new ComplexSample( (float)i, (float)q ) );
|
||||
send( new ComplexSample( (float)i / 32767.0f, (float)q / 32767.0f ) );
|
||||
}
|
||||
|
||||
success = true;
|
||||
@@ -276,12 +280,7 @@ public class ComplexWaveSource extends WaveSource
|
||||
*/
|
||||
private void send( ComplexSample sample )
|
||||
{
|
||||
Iterator<Listener<ComplexSample>> it = mListeners.iterator();
|
||||
|
||||
while( it.hasNext() )
|
||||
{
|
||||
it.next().receive( sample );
|
||||
}
|
||||
mBroadcaster.broadcast( sample );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -289,12 +288,12 @@ public class ComplexWaveSource extends WaveSource
|
||||
*/
|
||||
public void addListener( Listener<ComplexSample> listener )
|
||||
{
|
||||
mListeners.add( listener );
|
||||
mBroadcaster.addListener( listener );
|
||||
}
|
||||
|
||||
public void removeListener( Listener<ComplexSample> listener )
|
||||
{
|
||||
mListeners.remove( listener );
|
||||
mBroadcaster.removeListener( listener );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user