packet encoder RF packets by using LPF for determining if it's zero or one I'm transmitting RF packets with frequency 868MHZ ,
symbol rate (it's the same as bit rate) is 50KBaud , and Im sampling them by a dongle (fs=20480KHZ) to capture those RF packets, the captured samples are IQ RAW DATA and I save them into a file , by matlab Im using this file and plot all the captured data(packets), I see the RF packets as peaks where there's packet found, otherwise noise.
I have built demodulator which the output of its values ranges between 1 and -1 , so I have arrived to a file that has values that ranges between 1 and -1 , this demodulated IQ samples I want to convert them to binary 0 or 1 , so Im trying to build encoder in Matlab code by using LPF , how could I do that? for more clarification I want to input to my LPF the demodulated IQ samples and then the output would be something like:

I want this because if I have the output of LPF then I can walk through that output and decide where I have &quot;zero-Crossing&quot; this means when there's a step (zero-crossing) then the value would be changed from zero to 1 or 1 to zero (depend on the value what was before) ,
how can I do that? the cutoff frequency of my LPF  must be my bit rate frequency right? how can I also do LPF in matlab? thanks alot !!!!
second question, lets assume I have the output of my LPF , then how can I walk through the output in order to decide zero/one (deciding zero crossing-high to low or low to high-), this part called FLOW ESTIMATION , how can I do that?
If the constellation at the tarsmitter is symmetric about 0 on the real line then you can simply threshold the output between -1 and +1 with 0 as the threshold. So anything above zero is a logical 1 and everything below zero is a logical 0.
This detection is rule is optimal when the noise is additive.