func NewParser(symbolLength, decimation int, fastMag bool) (p Parser) { p.Decoder = decode.NewDecoder(NewPacketConfig(symbolLength), decimation, fastMag) // GF of order 32, polynomial 37, generator 2. p.field = gf.NewField(32, 37, 2) p.csum = make([]float64, p.Decoder.DecCfg.BufferLength+1) p.filtered = make([][3]float64, p.Decoder.DecCfg.BufferLength) p.quantized = make([]byte, p.Decoder.DecCfg.BufferLength) return }
func NewParser(chipLength, decimation int) parse.Parser { p := new(Parser) p.Decoder = decode.NewDecoder(NewPacketConfig(chipLength), decimation) // GF of order 32, polynomial 37, generator 2. p.field = gf.NewField(32, 37, 2) p.signal = make([]float64, p.Decoder.DecCfg.BufferLength) p.csum = make([]float64, p.Decoder.DecCfg.BufferLength+1) p.filtered = make([][3]float64, p.Decoder.DecCfg.BufferLength) p.quantized = make([]byte, p.Decoder.DecCfg.BufferLength) return p }