nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ RSRQ_IDX_TO_DB

#define RSRQ_IDX_TO_DB ( rsrq)

#include <include/modem/modem_info.h>

Value:
((rsrq) < 0 ? \
(((float)(rsrq) - 39) * 0.5f) : \
((rsrq) < 35 ? \
(((float)(rsrq) - 40) * 0.5f) : \
(((float)(rsrq) - 41) * 0.5f)))

Converts RSRQ index value returned by the modem to dB.

The index value of RSRQ can be converted to dB with the following formula:

  • index < 0: (index – 39) / 2
  • index = 0: Not used
  • index > 0 and index < 35: (index – 40) / 2
  • index ≥ 35: (index – 41) / 2

Example values:

  • -30: RSRQ < -34.5 dB
  • -29: -34 ≤ RSRQ < -33.5 dB
  • ...
  • -2: -20.5 ≤ RSRQ < -20 dB
  • -1: -20 ≤ RSRQ < -19.5 dB
  • 0: Not used.
  • 1: -19.5 ≤ RSRQ < -19 dB
  • 2: -19 ≤ RSRQ < -18.5 dB
  • ...
  • 32: -4 ≤ RSRQ < -3.5 dB
  • 33: -3.5 ≤ RSRQ < -3 dB
  • 34: -3 ≤ RSRQ dB
  • 35: -3 ≤ RSRQ < -2.5 dB
  • 36: -2.5 ≤ RSRQ < -2 dB
  • ...
  • 45: 2 ≤ RSRQ < 2.5 dB
  • 46: 2.5 ≤ RSRQ dB

There are use cases where the index value 0 is used to represent RSRQ < −19.5 dB.

See modem AT command reference guide for more information.

Parameters
[in]rsrqRSRQ index value as 'int'.
Returns
RSRQ in dB as 'float'.