Example #1
0
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
}
Example #2
0
File: r900.go Project: thess/rtlamr
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
}
Example #3
0
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
}
Example #4
0
func NewParser(symbolLength int, fastMag bool) (p Parser) {
	p.Decoder = decode.NewDecoder(NewPacketConfig(symbolLength), fastMag)
	p.CRC = crc.NewCRC("CCITT", 0xFFFF, 0x1021, 0x1D0F)
	return
}
Example #5
0
File: scm.go Project: thess/rtlamr
func NewParser(chipLength, decimation int) (p parse.Parser) {
	return &Parser{
		decode.NewDecoder(NewPacketConfig(chipLength), decimation),
		crc.NewCRC("BCH", 0, 0x6F63, 0),
	}
}
Example #6
0
func NewParser(symbolLength, decimation int) (p parse.Parser) {
	return &Parser{
		decode.NewDecoder(NewPacketConfig(symbolLength), decimation),
		crc.NewCRC("CCITT", 0xFFFF, 0x1021, 0x1D0F),
	}
}
Example #7
0
func NewParser(symbolLength, decimation int) (p Parser) {
	p.Decoder = decode.NewDecoder(NewPacketConfig(symbolLength), decimation)
	p.CRC = crc.NewCRC("CCITT", 0xFFFF, 0x1021, 0x1D0F)
	return
}