How to calculate the RSSI value in Veins, the calculation method and theoretical formula look different, find the codes as follows, but did not understand, looking forward to help.
double recvPower_dBm = 10 * log10(s.getAtCenterFrequency());
I don't know what you are assuming is the "theoretical formula" to calculate RSSI. I am assuming you are asking about how Veins calculates received power based on transmit power of a signal. As of Veins 5.1, the calculations roughly follow a typical 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 , which (for alpha=2) mirrors the formula of free space path loss.