MTK手机信号显示计算
从底层物理信号参数,到上层信号格显示的流程大致是:
Modem底层信号数据 → modem L4中转化为signal_level → 在AP端将signal_level映射成信号格数。
下面分别介绍mtk提供的默认信号格算法:
1、GSM网络
a. modem底层上报信号参数RSSI给modem L4
b. 在modem L4中,用RSSI经过计算,得到上报给上层的asu值,asu的范围是0-31,计算公式为:
asu = (113 + RSSI) / 2
c. 在AP端将asu值转化为信号格数。
2、 WCDMA网络
a. modem底层上报信号参数RSCP与Ec/No两个参数给modem L4
b. 在modem L4中,经过计算得到上报给上层的signal_level,也即asu,asu的范围是0-31,计算公式为:
signal_level = (Ec/N0 + 25) + (RSCP + 120) / 8
还要加上约束条件:
file:///C:/Users/LIUJIA~1/AppData/Local/Temp/msohtmlCLIp1/01/clip_image002.jpg
3、 TD-SCDMA网络
a. modem底层上报信号参数RSCP参数给modem L4
b. 在modem L4中,经过计算得到上报给上层的level,也即asu,asu的范围是0-31,计算公式为:
file:///C:/Users/LIUJIA~1/AppData/Local/Temp/msohtmlclip1/01/clip_image004.jpg
上面计算所得的level即为asu。
file:///C:/Users/LIUJIA~1/AppData/Local/Temp/msohtmlclip1/01/clip_image005.jpg
c. 在AP端将asu值转化为信号格数。
4.LTE网络
a.modem底层上报信号参数给modem L4
b.在modem L4中,根据各type计算出signal_level,然后上报给上层的level(即:RSSI或RSCP或RSRQ或RSRP值(单位:qdbm值)),计算公式为:
{
kal_uint8 signal_level;
//kal_int32 raw_in_dbm = (raw_in_qdbm / 4);
if (type == L4_GERAN_RXLEVEL)
{
if (raw_in_qdbm == 1)
{
signal_level = 99;
}
else if (raw_in_qdbm < -440)
{
signal_level = 0;
}
else if (raw_in_qdbm >= -192)
{
signal_level = 63;
}
else
{
signal_level = (raw_in_qdbm + 444) >> 2;
}
}
else if (type == L4_GERAN_BER)
{
if (raw_in_qdbm >= 0 && raw_in_qdbm <= 7)
{
signal_level = raw_in_qdbm;
}
else
{
signal_level = 99;
}
}
else if (type == L4_UTRA_RSCP)
{
if (raw_in_qdbm == 1)
{
signal_level = 255;
}
else if (raw_in_qdbm < -480)
{
signal_level = 0;
}
else if (raw_in_qdbm >= -100)
{
signal_level = 96;
}
else
{
signal_level = (raw_in_qdbm + 484) >> 2;
}
}
else if (type == L4_UTRA_ECNO)
{
if (raw_in_qdbm == 1)
{
signal_level = 255;
}
else if (raw_in_qdbm < -96)
{
signal_level = 0;
}
else if (raw_in_qdbm >= 0)
{
signal_level = 49;
}
else
{
signal_level = (raw_in_qdbm >> 1) + 49;
}
}
else if (type == L4_EUTRA_RSRQ)
{
if (raw_in_qdbm == 1)
{
signal_level = 255;
}
else if (raw_in_qdbm < -78)
{
signal_level = 0;
}
else if (raw_in_qdbm >= -12)
{
signal_level = 34;
}
else
{
signal_level = (raw_in_qdbm >> 1) + 40;
}
}
else if (type == L4_EUTRA_RSRP)
{
if (raw_in_qdbm == 1)
{
signal_level = 255;
}
else if (raw_in_qdbm < -560)
{
signal_level = 0;
}
else if (raw_in_qdbm >= -176)
{
signal_level = 97;
}
else
{
signal_level = (raw_in_qdbm + 564) >> 2;
}
}
return signal_level;
}
//针对CESQ指令,signal_level的计算方法:
kal_uint8 custom_signal_strength_raw_to_cesq_level(l4_cesq_param_enumtype, kal_int32 raw_in_qdbm)
{
kal_uint8 signal_level;
//kal_int32 raw_in_dbm = (raw_in_qdbm / 4);
if (type == L4_GERAN_RXLEVEL)
{
if (raw_in_qdbm == 1)
{
signal_level = 99;
}
else if (raw_in_qdbm < -440)
{
signal_level = 0;
}
else if (raw_in_qdbm >= -192)
{
signal_level = 63;
}
else
{
signal_level = (raw_in_qdbm + 444) >> 2;
}
}
else if (type == L4_GERAN_BER)
{
if (raw_in_qdbm >= 0 && raw_in_qdbm <=7)
{
signal_level = raw_in_qdbm;
}
else
{
signal_level = 99;
}
}
else if (type == L4_UTRA_RSCP)
{
if (raw_in_qdbm == 1)
{
signal_level = 255;
}
else if (raw_in_qdbm < -480)
{
signal_level = 0;
}
else if (raw_in_qdbm >= -100)
{
signal_level = 96;
}
else
{
signal_level = (raw_in_qdbm + 484) >> 2;
}
}
else if (type == L4_UTRA_ECNO)
{
if (raw_in_qdbm == 1)
{
signal_level = 255;
}
else if (raw_in_qdbm < -96)
{
signal_level = 0;
}
else if (raw_in_qdbm >= 0)
{
signal_level = 49;
}
else
{
signal_level = (raw_in_qdbm >> 1) + 49;
}
}
else if (type == L4_EUTRA_RSRQ)
{
if (raw_in_qdbm == 1)
{
signal_level = 255;
}
else if (raw_in_qdbm < -78)
{
signal_level = 0;
}
else if (raw_in_qdbm >= -12)
{
signal_level = 34;
}
else
{
signal_level = (raw_in_qdbm >> 1) + 40;
}
}
else if (type == L4_EUTRA_RSRP)
{
if (raw_in_qdbm == 1)
{
signal_level = 255;
}
else if (raw_in_qdbm < -560)
{
signal_level = 0;
}
else if (raw_in_qdbm >= -176)
{
signal_level = 97;
}
else
{
signal_level = (raw_in_qdbm + 564) >> 2;
}
}
return signal_level;
}
c. 在AP端将level值转化为信号格数。
信号物理参数说明
Ø RSSI:2G网络信号强度
Ø RCSP:3G网络信号强度
Ø Ec/No:WCDMA网络信号噪音比,反映了有用信号所占比重。
modem底层信号数据怎么才能获取?有获取的API吗?
* 每天自己主题被回复3次可获得额外3RD币奖励。
* 每天回复他人主题2次可获得额外5RD币的奖励。
* 奖励每天都可领取,一定要多参与论坛讨论哦。
* 同一主题的重复回复不计。请不要为了获取奖励而纯灌水,否则管理员或者小编会对其警告一次,第二次禁言,第三次禁止访问