FreeCalypso > hg > gsm-net-reveng
diff pathloss/egli.c @ 68:0cfea66a15f3
pathloss: implement Egli model
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 25 Oct 2024 16:09:52 +0000 |
parents | pathloss/fsl.c@599fac1b882d |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pathloss/egli.c Fri Oct 25 16:09:52 2024 +0000 @@ -0,0 +1,18 @@ +/* + * RF range calculation per Egli model + */ + +#define _GNU_SOURCE +#include <math.h> +#include "range_func.h" + +float rf_range_egli(float freq_mhz, float path_loss, float bts_ant_m, + float ms_ant_m) +{ + float l, r, x; + + l = 20.0f * log10f(freq_mhz / 40.0f); + r = path_loss - l; + x = bts_ant_m * ms_ant_m; + return sqrtf(x / pow10f(r / -20.0f)); +}