# How to calculate baudrate?

I'm going through this article https://www.elttam.com.au/blog/intro-sdr-and-rf-analysis/ and I find it hard to understand the following part:

However, in our case we might want to transmit this signal later and need to represent each symbol with 1’s and 0’s, for instance the short pulse symbol may be represented by 0001. For this, we will measure the shortest pulse or gap that appears. Using the shortest pulse, we get a baud of 2960.

How did he calculate this 2960 rate? And why 0 should be represented as 0001 and 1 as 0111 - why 4 bits?

The article mentions that the sequence is likely pulse duration modulation, but the RfCat library doesn't support PDM. Instead, it supports OOK. So what the author is doing is representing PDM as OOK.
In particular, the author has likely measured the length of the pulses and determined that the short pulse is 1/3 as long as the long pulse, and that the entire section is 4x as long as the short pulse. So that means that OOK with 4 symbols can be used to represent 1 PDM symbol. The OOK sequence {0, 0, 0, 1} represents the PDM symbol 0, and {0, 1, 1, 1} represents the PDM symbol 1.