Skip to content
DeepForgeby svx
All problems
MediumInformation Theoryinfo-191

Link Budget

Problem

Return the received power of a radio link in dBm:

tx_dbm + tx_gain_db + rx_gain_db - path_loss_db

Hint

All terms are already in decibels, so they simply add and subtract.

Test cases

case 1
in: [30,10,5,100]
expected: -55
case 2
in: [20,0,0,0]
expected: 20
case 3
in: [10,3,3,20]
expected: -4
case 4
in: [0,0,0,50]
expected: -50
Starter codePython
def link_budget(tx_dbm, tx_gain_db, rx_gain_db, path_loss_db):
    # Your code here
    pass

4 test cases · run your code against them in the editor