Work in progress

This commit is contained in:
denny
2015-09-14 21:31:26 -04:00
parent 732d478502
commit c7227ca780
42 changed files with 978 additions and 1356 deletions

View File

@@ -19,6 +19,7 @@ package dsp.fsk;
import instrument.Instrumentable;
import instrument.tap.Tap;
import instrument.tap.TapGroup;
import instrument.tap.stream.SymbolEventTap;
import java.util.ArrayList;
@@ -58,7 +59,7 @@ public class FSK2Decoder implements Instrumentable, Listener<RealBuffer>
/* Instrumentation taps */
private static final String INSTRUMENT_DECISION =
"Tap Point: FSK2 Symbol Decision";
private ArrayList<Tap> mAvailableTaps;
private List<TapGroup> mAvailableTaps;
private ArrayList<SymbolEventTap> mTaps = new ArrayList<SymbolEventTap>();
private Listener<Boolean> mListener;
@@ -257,13 +258,16 @@ public class FSK2Decoder implements Instrumentable, Listener<RealBuffer>
* Get instrumentation taps
*/
@Override
public List<Tap> getTaps()
public List<TapGroup> getTapGroups()
{
if( mAvailableTaps == null )
{
mAvailableTaps = new ArrayList<Tap>();
mAvailableTaps.add(
new SymbolEventTap( INSTRUMENT_DECISION, 0, .025f ) );
mAvailableTaps = new ArrayList<TapGroup>();
TapGroup tapGroup = new TapGroup( "FSK2 Decoder" );
tapGroup.add( new SymbolEventTap( INSTRUMENT_DECISION, 0, .025f ) );
mAvailableTaps.add( tapGroup );
}
return mAvailableTaps;
@@ -273,7 +277,7 @@ public class FSK2Decoder implements Instrumentable, Listener<RealBuffer>
* Add instrumentation tap
*/
@Override
public void addTap( Tap tap )
public void registerTap( Tap tap )
{
if( tap instanceof SymbolEventTap && !mTaps.contains( tap ) )
{
@@ -285,7 +289,7 @@ public class FSK2Decoder implements Instrumentable, Listener<RealBuffer>
* Remove instrumentation tap
*/
@Override
public void removeTap( Tap tap )
public void unregisterTap( Tap tap )
{
mTaps.remove( tap );
}

View File

@@ -19,6 +19,7 @@ package dsp.fsk;
import instrument.Instrumentable;
import instrument.tap.Tap;
import instrument.tap.TapGroup;
import instrument.tap.stream.BinaryTap;
import instrument.tap.stream.FloatTap;
import instrument.tap.stream.SymbolEventTap;
@@ -50,7 +51,7 @@ public class LTRFSKDecoder implements Listener<RealBuffer>, Instrumentable
private LTRPulseShapingFilter mPulseShaper;
private Slicer mSlicer;
private List<Tap> mAvailableTaps;
private List<TapGroup> mAvailableTaps;
private final String TAP_F1_F2 = "LTR FSK Demod Filter1 >< Filter2";
private final String TAP_F2_F3 = "LTR FSK Demod Filter2 >< Filter3";
private final String TAP_F3_F4 = "LTR FSK Demod Filter3 >< Filter4";
@@ -124,28 +125,33 @@ public class LTRFSKDecoder implements Listener<RealBuffer>, Instrumentable
}
@Override
public List<Tap> getTaps()
public List<TapGroup> getTapGroups()
{
if( mAvailableTaps == null )
{
mAvailableTaps = new ArrayList<Tap>();
mAvailableTaps.add( new FloatTap( TAP_F1_F2, 0, 1.0f ) );
mAvailableTaps.add( new FloatTap( TAP_F2_F3, 8, 0.5f ) );
mAvailableTaps.add( new FloatTap( TAP_F3_F4, 12, 0.25f ) );
mAvailableTaps.add( new FloatTap( TAP_F4_F5, 14, 0.125f ) );
mAvailableTaps.add( new FloatTap( TAP_F5_F6, 15, 0.0625f ) );
mAvailableTaps.add( new FloatTap( TAP_F6_DT, 31, 0.0625f ) );
mAvailableTaps.add( new FloatTap( TAP_DT_SF1, 31, 0.0625f ) );
mAvailableTaps.add( new BinaryTap( TAP_SF1_PS, 33, 0.0625f ) );
mAvailableTaps.add( new BinaryTap( TAP_PS_SLICER, 33, 0.0625f ) );
mAvailableTaps.add( new SymbolEventTap( TAP_SYMBOL_EVENT, 7, 0.0125f ) );
mAvailableTaps = new ArrayList<TapGroup>();
TapGroup group = new TapGroup( "LTR FSK Decoder" );
group.add( new FloatTap( TAP_F1_F2, 0, 1.0f ) );
group.add( new FloatTap( TAP_F2_F3, 8, 0.5f ) );
group.add( new FloatTap( TAP_F3_F4, 12, 0.25f ) );
group.add( new FloatTap( TAP_F4_F5, 14, 0.125f ) );
group.add( new FloatTap( TAP_F5_F6, 15, 0.0625f ) );
group.add( new FloatTap( TAP_F6_DT, 31, 0.0625f ) );
group.add( new FloatTap( TAP_DT_SF1, 31, 0.0625f ) );
group.add( new BinaryTap( TAP_SF1_PS, 33, 0.0625f ) );
group.add( new BinaryTap( TAP_PS_SLICER, 33, 0.0625f ) );
group.add( new SymbolEventTap( TAP_SYMBOL_EVENT, 7, 0.0125f ) );
mAvailableTaps.add( group );
}
return mAvailableTaps;
}
@Override
public void addTap( Tap tap )
public void registerTap( Tap tap )
{
switch( tap.getName() )
{
@@ -192,7 +198,7 @@ public class LTRFSKDecoder implements Listener<RealBuffer>, Instrumentable
}
@Override
public void removeTap( Tap tap )
public void unregisterTap( Tap tap )
{
switch( tap.getName() )
{

View File

@@ -32,6 +32,7 @@ package dsp.psk;
import instrument.Instrumentable;
import instrument.tap.Tap;
import instrument.tap.TapGroup;
import instrument.tap.stream.EyeDiagramData;
import instrument.tap.stream.EyeDiagramDataTap;
@@ -51,17 +52,19 @@ import dsp.filter.interpolator.RealInterpolator;
import dsp.symbol.Dibit;
/**
* Implements a LSM (CQPSK) demodulator using a Gardner Detector to determine
* Implements a LSM (Pi/4) demodulator using a Gardner Detector to determine
* optimal sampling timing and a Costas Loop as a phase locked loop synchronized
* with the incoming signal carrier frequency.
*
* Sample Rate: 48000
* Symbol Rate: 4800
*/
public class CQPSKDemodulator implements Instrumentable, ComplexSampleListener
public class LSMDemodulator implements Instrumentable, ComplexSampleListener
{
private final static Logger mLog =
LoggerFactory.getLogger( CQPSKDemodulator.class );
LoggerFactory.getLogger( LSMDemodulator.class );
private List<TapGroup> mAvailableTaps;
/* 45 degree rotation angle */
public static final float THETA = (float)( Math.PI / 4.0d );
@@ -80,7 +83,7 @@ public class CQPSKDemodulator implements Instrumentable, ComplexSampleListener
private EyeDiagramDataTap mEyeDiagramDataTap;
public CQPSKDemodulator()
public LSMDemodulator()
{
}
@@ -556,17 +559,24 @@ public class CQPSKDemodulator implements Instrumentable, ComplexSampleListener
}
@Override
public List<Tap> getTaps()
public List<TapGroup> getTapGroups()
{
List<Tap> taps = new ArrayList<Tap>();
if( mAvailableTaps == null )
{
mAvailableTaps = new ArrayList<>();
TapGroup group = new TapGroup( "LSM Demodulator" );
group.add( new EyeDiagramDataTap( "Eye Diagram", 0, 4800 ) );
mAvailableTaps.add( group );
}
taps.add( new EyeDiagramDataTap( "Eye Diagram", 0, 4800 ) );
return taps;
return mAvailableTaps;
}
@Override
public void addTap( Tap tap )
public void registerTap( Tap tap )
{
if( tap instanceof EyeDiagramDataTap )
{
@@ -575,7 +585,7 @@ public class CQPSKDemodulator implements Instrumentable, ComplexSampleListener
}
@Override
public void removeTap( Tap tap )
public void unregisterTap( Tap tap )
{
if( tap instanceof EyeDiagramDataTap )
{

View File

@@ -32,6 +32,7 @@ package dsp.psk;
import instrument.Instrumentable;
import instrument.tap.Tap;
import instrument.tap.TapGroup;
import instrument.tap.stream.EyeDiagramData;
import instrument.tap.stream.EyeDiagramDataTap;
@@ -53,18 +54,20 @@ import dsp.filter.interpolator.RealInterpolator;
import dsp.symbol.Dibit;
/**
* Implements a CQPSK demodulator using an early/late symbol timing error detector
* and a Costas Loop as a phase locked loop synchronized with the incoming
* signal carrier frequency.
* Implements an LSM (Pi/4) demodulator using an early/late symbol timing error
* detector and a Costas Loop as a phase locked loop synchronized with the
* incoming signal carrier frequency.
*
* Sample Rate: 48000
* Symbol Rate: 4800
*/
public class CQPSKDemodulator2 implements Instrumentable, ComplexSampleListener,
public class LSMDemodulator2 implements Instrumentable, ComplexSampleListener,
Provider<Complex>
{
private List<TapGroup> mAvailableTaps;
private final static Logger mLog =
LoggerFactory.getLogger( CQPSKDemodulator2.class );
LoggerFactory.getLogger( LSMDemodulator2.class );
/* 45 degree rotation angle */
public static final float THETA = (float)( Math.PI / 4.0d );
@@ -85,7 +88,7 @@ public class CQPSKDemodulator2 implements Instrumentable, ComplexSampleListener,
private EyeDiagramDataTap mEyeDiagramDataTap;
public CQPSKDemodulator2()
public LSMDemodulator2()
{
}
@@ -534,17 +537,23 @@ public class CQPSKDemodulator2 implements Instrumentable, ComplexSampleListener,
}
@Override
public List<Tap> getTaps()
public List<TapGroup> getTapGroups()
{
List<Tap> taps = new ArrayList<Tap>();
taps.add( new EyeDiagramDataTap( "Eye Diagram", 0, 4800 ) );
return taps;
if( mAvailableTaps == null )
{
mAvailableTaps = new ArrayList<>();
TapGroup group = new TapGroup( "LSM Demodulator 2" );
group.add( new EyeDiagramDataTap( "Eye Diagram", 0, 4800 ) );
mAvailableTaps.add( group );
}
return mAvailableTaps;
}
@Override
public void addTap( Tap tap )
public void registerTap( Tap tap )
{
if( tap instanceof EyeDiagramDataTap )
{
@@ -553,7 +562,7 @@ public class CQPSKDemodulator2 implements Instrumentable, ComplexSampleListener,
}
@Override
public void removeTap( Tap tap )
public void unregisterTap( Tap tap )
{
if( tap instanceof EyeDiagramDataTap )
{