FreeCalypso > hg > gsm-net-reveng
comparison pathloss/main.c @ 66:599fac1b882d
pathloss: implement FSL
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 25 Oct 2024 08:12:28 +0000 |
parents | b3f04535eb14 |
children | 0cfea66a15f3 |
comparison
equal
deleted
inserted
replaced
65:b3f04535eb14 | 66:599fac1b882d |
---|---|
6 #include <ctype.h> | 6 #include <ctype.h> |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <string.h> | 9 #include <string.h> |
10 #include <strings.h> | 10 #include <strings.h> |
11 #include "range_func.h" | |
11 | 12 |
12 #define MAX_FIELDS 5 | 13 #define MAX_FIELDS 5 |
13 static char linebuf[256], *fields[MAX_FIELDS]; | 14 static char linebuf[256], *fields[MAX_FIELDS]; |
14 static unsigned nfields; | 15 static unsigned nfields; |
15 | 16 |
267 /* do the math */ | 268 /* do the math */ |
268 path_loss_dl = bts_power + bts_ant_gain - ms_rxs - misc_loss; | 269 path_loss_dl = bts_power + bts_ant_gain - ms_rxs - misc_loss; |
269 path_loss_ul = ms_power + bts_ant_gain - bts_rxs - misc_loss; | 270 path_loss_ul = ms_power + bts_ant_gain - bts_rxs - misc_loss; |
270 printf("Path loss budget: %.2f dB DL, %.2f dB UL\n", path_loss_dl, | 271 printf("Path loss budget: %.2f dB DL, %.2f dB UL\n", path_loss_dl, |
271 path_loss_ul); | 272 path_loss_ul); |
272 /* distance calculations will go here */ | 273 /* distance per various models */ |
274 printf("FSL: %.2f m DL, %.2f m UL\n", | |
275 rf_range_freespace(freq_dl, path_loss_dl), | |
276 rf_range_freespace(freq_ul, path_loss_ul)); | |
277 /* Egli and Hata coming next */ | |
273 exit(0); | 278 exit(0); |
274 } | 279 } |