daniestevez / gr-satellites

GNU Radio decoder for Amateur satellites
GNU General Public License v3.0
766 stars 160 forks source link

Fix RMS AGC on aarch64 systems #417

Closed daniestevez closed 1 year ago

daniestevez commented 1 year ago

See #416. When the input is zero, the RMS AGC block computes 0 / (0 + 1e-20). The 1e-20 in the denominator is added to avoid 0 / 0, which gives nan. Nevertheless, it seems that on aarch64, 0 / 1e-20 still gives nan (at least when doing the complex division).

This replaces the small number 1e-20 by 1e-19, which works correctly on aarch64, and adds a unit test for the rms_agc and the rms_agc_f so that we can catch if this problem happens in another systems.