FreeCalypso > hg > gsm-net-reveng
comparison 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 |
comparison
equal
deleted
inserted
replaced
67:d8ccdccd8b2b | 68:0cfea66a15f3 |
---|---|
1 /* | |
2 * RF range calculation per Egli model | |
3 */ | |
4 | |
5 #define _GNU_SOURCE | |
6 #include <math.h> | |
7 #include "range_func.h" | |
8 | |
9 float rf_range_egli(float freq_mhz, float path_loss, float bts_ant_m, | |
10 float ms_ant_m) | |
11 { | |
12 float l, r, x; | |
13 | |
14 l = 20.0f * log10f(freq_mhz / 40.0f); | |
15 r = path_loss - l; | |
16 x = bts_ant_m * ms_ant_m; | |
17 return sqrtf(x / pow10f(r / -20.0f)); | |
18 } |