Sunday, April 22, 2018

Java version of QIC-24 pulse decoding - Draft 01

According to Carlos G Mendioroz, who wrote these programs:

Ok, code is not clean at all, but with a little help it should be understandable...

It read the raw dump as 0/1 for sample and makes run length codes of periods (at rising edges). There is a class for doing the timing (finding the first long preamble and then resynching at preambles) and then some utility methods to follow the block structure, decode the gcr 4/5 and calculate CRC.

The main trick ended being variating the timing when an exception occurs and retry decoding a block. it tries -2, -1, +1 and +2 reference periods, which change the 0/1/2 run length boundaries.

Let me know if you need help understanding it. There is no output yet, but having a good CRC kind of proves the decoding of the block was ok (and the block id matching :)