Radiowave Propagation Modelling

Free Space Path Loss Calculator with API

View the Desktop Version

Github: https://github.com/DoctorLai/FreeSpaceCalculator

The Path Loss is often referred to the wireless attenuation (in the unit of Decibel i.e. dB) between transmitter and receiver, as shown below.

Free Space Path Loss

Free Space Path Loss Formula

To compute the Path Loss (dB), you will need the following factors:

The path loss (dB) then can be computed via the following formula:

Where is the speed of light in vacuum roughly meters per second. is the distance in the unit of meter and is the emitting frequency in the unit of Hertz.

This can be further simplified to:

Where is the distance in the unit of kilo-meter and is the emitting frequency in the unit of Mhz.

Path Loss Calculator Online

This calculator is available in the non-AMP version of this page.

Frequency (MHz):
Distance (Meter):
Transmitter Antenna Gain (dBi):
Receiver Antenna Gain (dBi):

Path Loss (dB):

Free Space Path Loss API

The Free Space Path Loss API is implemented in PHP, and the full source code is:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
https://propagationtools.com
$mhz = (float)($_GET['mhz'] ?? ($_POST['mhz'] ?? 0));
$meter = (float)($_GET['meter'] ?? ($_POST['meter'] ?? 0));
$gt = (float)($_GET['gt'] ?? ($_POST['gt'] ?? 0)); 
$gr = (float)($_GET['gr'] ?? ($_POST['gr'] ?? 0));
$data = array();
$data['err'] = array();
if ($mhz <= 0) {
  $data['err'][] = 'Frequency (MHz) Invalid';
}
if ($meter <= 0) {
  $data['err'][] = 'Distance (Meter) Invalid';
}
if (count($data['err']) == 0) {
  $data['db'] = 20.0 * log10($mhz * $meter * 0.001) + 32.44 - $gt - $gr;
}
header("Access-Control-Allow-Origin: *");  
header('Content-Type: application/json');
die(json_encode($data));  
https://propagationtools.com
$mhz = (float)($_GET['mhz'] ?? ($_POST['mhz'] ?? 0));
$meter = (float)($_GET['meter'] ?? ($_POST['meter'] ?? 0));
$gt = (float)($_GET['gt'] ?? ($_POST['gt'] ?? 0)); 
$gr = (float)($_GET['gr'] ?? ($_POST['gr'] ?? 0));
$data = array();
$data['err'] = array();
if ($mhz <= 0) {
  $data['err'][] = 'Frequency (MHz) Invalid';
}
if ($meter <= 0) {
  $data['err'][] = 'Distance (Meter) Invalid';
}
if (count($data['err']) == 0) {
  $data['db'] = 20.0 * log10($mhz * $meter * 0.001) + 32.44 - $gt - $gr;
}
header("Access-Control-Allow-Origin: *");  
header('Content-Type: application/json');
die(json_encode($data));  

For example, you can invoke the API at the following end-point:

https://propagationtools.com/api/freespace/?mhz=947&meter=234&gt=15&gr=10

and, the returned format is JSON:

{"err":[],"db":54.361316728268}

And, you could pass the parameters via the POST method:

1
2
? curl -s -X POST "https://propagationtools.com/api/freespace/" -d "mhz=947" -d "meter=234"
{"err":[],"db":79.361316728268}
? curl -s -X POST "https://propagationtools.com/api/freespace/" -d "mhz=947" -d "meter=234"
{"err":[],"db":79.361316728268}

The antenna gain values (dBi) for transmitter and receiver are optional, which are zeros by default.

Product Recommendation

View the Desktop Version
Exit mobile version