implement WFM with the new chain elements
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
from csdr.chain import Chain
|
||||
from pycsdr.modules import FmDemod, Limit, NfmDeemphasis, Agc, Convert
|
||||
from pycsdr.modules import FmDemod, Limit, NfmDeemphasis, Agc, WfmDeemphasis, FractionalDecimator
|
||||
from pycsdr.types import Format, AgcProfile
|
||||
|
||||
|
||||
class Fm(Chain):
|
||||
class NFm(Chain):
|
||||
def __init__(self, sampleRate: int):
|
||||
agc = Agc(Format.FLOAT)
|
||||
agc.setProfile(AgcProfile.SLOW)
|
||||
@ -15,3 +15,14 @@ class Fm(Chain):
|
||||
agc,
|
||||
]
|
||||
super().__init__(*workers)
|
||||
|
||||
|
||||
class WFm(Chain):
|
||||
def __init__(self, sampleRate: int, tau: float):
|
||||
workers = [
|
||||
FmDemod(),
|
||||
Limit(),
|
||||
FractionalDecimator(Format.FLOAT, 200000.0 / sampleRate, prefilter=True),
|
||||
WfmDeemphasis(sampleRate, tau),
|
||||
]
|
||||
super().__init__(*workers)
|
||||
|
Reference in New Issue
Block a user