diff --git a/send.py b/send.py index fb30a4f..204a104 100755 --- a/send.py +++ b/send.py @@ -61,7 +61,8 @@ def main(fname): log.info('%d bits to be send', len(data)*8) bits = list(to_bits(ecc.encode(data))) - log.info('%d bits modulated (with ECC)', len(bits)) + ecc_ratio = 1.0 - len(data)*8.0 / len(bits) + log.info('%d bits modulated (%.1f%% ECC)', len(bits), ecc_ratio * 100) modulate(fd, bits) data_size = fd.tell() - training_size log.info('%.3f seconds of data audio',