Exemplo n.º 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
}
Exemplo n.º 2
0
Arquivo: r900.go Projeto: 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
}
Exemplo n.º 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
}
Exemplo n.º 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
}
Exemplo n.º 5
0
Arquivo: scm.go Projeto: thess/rtlamr
func NewParser(chipLength, decimation int) (p parse.Parser) {
	return &Parser{
		decode.NewDecoder(NewPacketConfig(chipLength), decimation),
		crc.NewCRC("BCH", 0, 0x6F63, 0),
	}
}
Exemplo n.º 6
0
func NewParser(symbolLength, decimation int) (p parse.Parser) {
	return &Parser{
		decode.NewDecoder(NewPacketConfig(symbolLength), decimation),
		crc.NewCRC("CCITT", 0xFFFF, 0x1021, 0x1D0F),
	}
}
Exemplo n.º 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
}