[Hamlib-developer] S-meter reading - flrig/IC-7300
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Philip R. <gm...@bt...> - 2024-12-04 14:45:16
|
I have noticed a discrepancy when displaying the S-meter reading read from IC-7300 using flrig and hamlib. I have looked at the code at each stage. The Icom CI-V has: Read S-meter level *(0000=S0, 0120=S9, 0241=S9+60dB) Flrig converts this into percentage full-scale deflection (S9+60) (IC7300.cxx l. 1670): mtr =(int)ceil(mtr /2.41); and the display on flrig and the actual IC-7300, as far as I can tell, look pretty much the same. Hamlib seems to interpret this (flrig.c ll.2388+) as dB above S0. case RIG_LEVEL_STRENGTH: val->i = atoi(value) - 54; //if (val->i > 0) val->i /= 10; rig_debug(RIG_DEBUG_TRACE, "%s: val.i='%s'(%d)\n", __func__, value, val->i); break; and converts this to dB above S9 per the comment in rig.h L. 1080. #define RIG_LEVEL_STRENGTH CONSTANT_64BIT_FLAG(30) /*!< \c STRENGTH -- Effective (calibrated) signal strength relative to S9, arg int (dB) */ However its not - it's out by about 10%. My app then interprets this per the hamlib definition, which seems to the only specified value and I display a version which is several dB lower then that displayed on the rig or on flrig. I couldn't find in the flrig documentation what rig.get_smeter should return. Looking at rig.get_Sunits and rig.get_DBM it looks like a value of 50 is S9, 100 is S9+60 and linearly interpolated over 0-50 and 50-100. I don't know if this is a general problem across all rigs. Is FSD on the flrig S-meter always S9+60? Or will it vary by rig? It's not a major issue in the grand scheme of things. I was just curious why I seemed to be displaying a lower value than flrig was. It's not an accurate value anyway, just wondered why it was different. 73 Phil GM3ZZA |