I am running a VANET simulation and need the Signal to Noise Ratio (SNR) seen by the receivers when receiving control/data packets. Are there APIs to get this information?
The API to calculate SNR in IEEE802.11 module can be found in ErrorModel.h file calculate_snr(double dReceivedPower/*in dBm*/,double bandwidth/*In MHz*/) For Example, calculate_snr(pdbm, phy->dChannelBandwidth); Some more information is available in https://support.tetcos.com/en/support/solutions/articles/14000095868-how-can-i-get-plots-for-snr-in-netsim-
SNR for every packet received cannot be got from the results window. That only gives aggregate results. You would need to add code to print the SNR to a log file. I don’t think an API is required since the SNR is anyway being calculated. It just needs to be printed out.
In the most recent NetSim release, v13.3, radio measurements can be recorded simply by enabling the corresponding checkbox. After simulation, the CSV log file, which can be opened with Excel, will contain a detailed record of the Signal-to-Interference-plus-Noise Ratios (SINRs) for various User Equipment (UEs) from different gNBs.
You can also check this discussion https://www.researchgate.net/post/How_to_obtain_the_Channel_State_information_between_various_transmitters_and_receivers_in_a_wireless_network_in_NetSim