mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-15 01:57:39 -05:00
AM Decoder adapted to the new processing chain architecture.
This commit is contained in:
@@ -105,8 +105,8 @@ public class ComplexAutomaticGainControl implements Listener<Complex>,
|
|||||||
private static final double AGC_OUT_SCALE = 0.7;
|
private static final double AGC_OUT_SCALE = 0.7;
|
||||||
|
|
||||||
/* Keep max input and output the same */
|
/* Keep max input and output the same */
|
||||||
private static final double MAX_AMPLITUDE = 32767.0; //1.0;
|
private static final double MAX_AMPLITUDE = 1.0;
|
||||||
private static final double MAX_MANUAL_AMPLITUDE = 32767.0; //1.0;
|
private static final double MAX_MANUAL_AMPLITUDE = 1.0;
|
||||||
|
|
||||||
/* Specifies AGC manual gain in dB if AGC is not active ( 0 to 100 dB) */
|
/* Specifies AGC manual gain in dB if AGC is not active ( 0 to 100 dB) */
|
||||||
private static final double MANUAL_GAIN = 0.0;
|
private static final double MANUAL_GAIN = 0.0;
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ import module.decode.state.TrafficChannelManager;
|
|||||||
import module.decode.tait.Tait1200Decoder;
|
import module.decode.tait.Tait1200Decoder;
|
||||||
import module.decode.tait.Tait1200DecoderPanel;
|
import module.decode.tait.Tait1200DecoderPanel;
|
||||||
import module.decode.tait.Tait1200DecoderState;
|
import module.decode.tait.Tait1200DecoderState;
|
||||||
|
import module.demodulate.am.AMDemodulatorModule;
|
||||||
import module.demodulate.fm.FMDemodulatorModule;
|
import module.demodulate.fm.FMDemodulatorModule;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@@ -192,8 +193,10 @@ public class DecoderFactory
|
|||||||
switch( decodeConfig.getDecoderType() )
|
switch( decodeConfig.getDecoderType() )
|
||||||
{
|
{
|
||||||
case AM:
|
case AM:
|
||||||
|
modules.add( new AMDemodulatorModule() );
|
||||||
modules.add( new AMDecoder( decodeConfig ) );
|
modules.add( new AMDecoder( decodeConfig ) );
|
||||||
modules.add( new AlwaysUnsquelchedDecoderState( DecoderType.AM, channelName ) );
|
modules.add( new AlwaysUnsquelchedDecoderState( DecoderType.AM, channelName ) );
|
||||||
|
modules.add( new AudioModule( recordAudio, REMOVE_DC ) );
|
||||||
break;
|
break;
|
||||||
case NBFM:
|
case NBFM:
|
||||||
modules.add( new AudioModule( recordAudio, NO_REMOVE_DC ) );
|
modules.add( new AudioModule( recordAudio, NO_REMOVE_DC ) );
|
||||||
|
|||||||
@@ -27,8 +27,6 @@ public class AMDecoder extends PrimaryDecoder
|
|||||||
public AMDecoder( DecodeConfiguration config )
|
public AMDecoder( DecodeConfiguration config )
|
||||||
{
|
{
|
||||||
super( config );
|
super( config );
|
||||||
|
|
||||||
//TODO: wire in the am decoder pieces
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ package module.decode.am;
|
|||||||
|
|
||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
|
|
||||||
|
import net.miginfocom.swing.MigLayout;
|
||||||
import module.decode.state.ChangedAttribute;
|
import module.decode.state.ChangedAttribute;
|
||||||
import module.decode.state.DecoderPanel;
|
import module.decode.state.DecoderPanel;
|
||||||
import module.decode.state.DecoderState;
|
import module.decode.state.DecoderState;
|
||||||
@@ -41,7 +42,12 @@ public class AMDecoderPanel extends DecoderPanel
|
|||||||
|
|
||||||
public void init()
|
public void init()
|
||||||
{
|
{
|
||||||
|
super.init();
|
||||||
|
|
||||||
|
setLayout( new MigLayout( "insets 0 0 0 0", "[grow,fill]", "[]0[]0[]") );
|
||||||
|
|
||||||
mProtocol.setFont( mFontDecoder );
|
mProtocol.setFont( mFontDecoder );
|
||||||
|
mProtocol.setForeground( mColorLabelDecoder );
|
||||||
|
|
||||||
add( mProtocol, "wrap" );
|
add( mProtocol, "wrap" );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public class AMDemodulatorModule extends Module
|
|||||||
public AMDemodulatorModule()
|
public AMDemodulatorModule()
|
||||||
{
|
{
|
||||||
mIQFilter = new ComplexFIRFilter_CB_CB( FilterFactory.getLowPass(
|
mIQFilter = new ComplexFIRFilter_CB_CB( FilterFactory.getLowPass(
|
||||||
SAMPLE_RATE, 6500, 73, WindowType.HAMMING ), 1.0f );
|
SAMPLE_RATE, 5000, 73, WindowType.HAMMING ), 1.0f );
|
||||||
|
|
||||||
mDemodulator = new AMDemodulator_CB( 500.0f );
|
mDemodulator = new AMDemodulator_CB( 500.0f );
|
||||||
mIQFilter.setListener( mDemodulator );
|
mIQFilter.setListener( mDemodulator );
|
||||||
|
|||||||
Reference in New Issue
Block a user