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 }
func NewParser(symbolLength, decimation int, fastMag bool) (p Parser) { p.Decoder = decode.NewDecoder(NewPacketConfig(symbolLength), decimation, fastMag) p.CRC = crc.NewCRC("BCH", 0, 0x6F63, 0) return }
func NewParser(symbolLength int, fastMag bool) (p Parser) { p.Decoder = decode.NewDecoder(NewPacketConfig(symbolLength), fastMag) p.CRC = crc.NewCRC("CCITT", 0xFFFF, 0x1021, 0x1D0F) return }
func NewParser(chipLength, decimation int) (p parse.Parser) { return &Parser{ decode.NewDecoder(NewPacketConfig(chipLength), decimation), crc.NewCRC("BCH", 0, 0x6F63, 0), } }
func NewParser(symbolLength, decimation int) (p parse.Parser) { return &Parser{ decode.NewDecoder(NewPacketConfig(symbolLength), decimation), crc.NewCRC("CCITT", 0xFFFF, 0x1021, 0x1D0F), } }
func NewParser(symbolLength, decimation int) (p Parser) { p.Decoder = decode.NewDecoder(NewPacketConfig(symbolLength), decimation) p.CRC = crc.NewCRC("CCITT", 0xFFFF, 0x1021, 0x1D0F) return }