Hello
I've added a very crude pseudo AFC to float_to_bits. It uses an averaging filter on the input values, and compensates for any fixed offset it finds in the input data (if all bit combinations are equally likely to appear in the input stream, then a long-term average should be 0).
This helps a bit when decoding a mistuned signal (due to receiver frequency drift etc). From a quick test yesterday normally the receiver works when the signal is mistuned from -1.6 to 1.3kHz, with the -a option the receiver works when the signal is mistuned from -2.8 to 2kHz.
Diff included, or source here: https://github.com/sq5bpf/osmo-tetra-sq5bpf/blob/master/src/float_to_bits.c
Jacek