FreeCalypso > hg > gsm-net-reveng
view pathloss/fsl.c @ 98:016ecc7284ab
tfo-ut: generate hex-encoded unit tests
| author | Mychaela Falconia <falcon@freecalypso.org> | 
|---|---|
| date | Wed, 19 Mar 2025 01:00:13 +0000 | 
| parents | 599fac1b882d | 
| children | 
line wrap: on
 line source
/* * Free Space Loss calculation */ #define _GNU_SOURCE #include <math.h> #include "range_func.h" #define PI_f ((float) M_PI) float rf_range_freespace(float freq_mhz, float path_loss) { float wavelen = 300.0f / freq_mhz; return (wavelen / pow10f(path_loss / -20.0f)) / (PI_f * 4.0f); }
