示例#1
0
  public LJ1200Decoder(AliasList aliasList) {
    mDecimationFilter =
        new HalfBandFilter_RB_RB(
            Filters.FIR_HALF_BAND_31T_ONE_EIGHTH_FCO.getCoefficients(), 1.0f, true);

    mBandPassFilter =
        new RealFIRFilter_RB_RB(Filters.FIRBP_1200FSK_24000FS.getCoefficients(), 1.02f);
    mDecimationFilter.setListener(mBandPassFilter);

    mFSKDecoder = new FSK2Decoder(DECIMATED_SAMPLE_RATE, SYMBOL_RATE, Output.INVERTED);
    mBandPassFilter.setListener(mFSKDecoder);

    mFSKDecoder.setListener(mFSKDecoderBroadcaster);

    mTowerMessageFramer = new MessageFramer(SyncPattern.LJ1200.getPattern(), MESSAGE_LENGTH);
    mTransponderMessageFramer =
        new MessageFramer(SyncPattern.LJ1200_TRANSPONDER.getPattern(), MESSAGE_LENGTH);
    mFSKDecoderBroadcaster.addListener(mTowerMessageFramer);
    mFSKDecoderBroadcaster.addListener(mTransponderMessageFramer);

    mMessageProcessor = new LJ1200MessageProcessor(aliasList);
    mTowerMessageFramer.addMessageListener(mMessageProcessor);
    mTransponderMessageFramer.addMessageListener(mMessageProcessor);
    mMessageProcessor.setMessageListener(this);
  }
示例#2
0
  public void dispose() {
    super.dispose();

    mDecimationFilter.dispose();
    mBandPassFilter.dispose();
    mFSKDecoder.dispose();
    mTowerMessageFramer.dispose();
    mMessageProcessor.dispose();
  }