如何计算静脉中的 RSSI

how to calculate RSSI in Veins

如何计算Veins中的RSSI值,计算方法和理论公式看起来不一样,找到代码如下,没看懂,期待帮助。

double recvPower_dBm = 10 * log10(s.getAtCenterFrequency());

我不知道你假设的是计算 RSSI 的“理论公式”。我假设您在询问 Veins 如何根据信号的发射功率计算接收功率。从 Veins 5.1 开始,计算大致遵循典型的 link budget equation, taking into account transmit power, antenna gains, as well as various loss effects. One of these is path loss; the most simple path loss model, free space path loss, is being modeled by its SimplePathlossModel: Here, the attenuation is computed as \left(\frac{\lambda}{4 \pi}\right)^2 d^{-\alpha}, which (for alpha=2) mirrors the formula of free space path loss.