A while ago I added S-Meter readings to WSJT-X (added the dB level to the
"Receiving" box) and experimented a bit.
Problem I ran into was rigs were pretty unstable on what they reported so I
abandoned it.
My rig was rock solid but others that helped test it were getting erratic
answers from their rigs so the general usefulness seemed limited.
Of course, having it as an option box kind of solves that problem. But
would open up many reports of "SMeter is wrong" bug reports which may not
be fixable from what I saw and would drive the maintainers nuts I think.
Plus I found quite a few rigs in hamlib not reporting standardized answers
so quite a few rigs would need to be changed to.
You can run WSJT-X through hamlib rigctld-wsjtx and do your own S-Meter
query then from rigctl-wsjtx using "l STRENGTH" while wsjt-x is running.
I may try and implement this again (something to play with over the
holidays) -- unless there's a strong opinion that it's not worth it.
Attached is a program I wrote that displays time, db, avg db, max db on a
5-second window. Used it to test antennas on the Baofeng and also for our
radio club to do an HT shootout to see who could transmit the strongest
signal from their handheld to my home system. Used TeamViewer on my phone
to connect to my computer at home and watch the dB reports on my home
computer. You'd have to modify for your rig parameters and whatever values
you want printed out.
73
Mike W9MDB
<https://www.avast.com/?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
This
email has been sent from a virus-free computer protected by Avast.
www.avast.com
<https://www.avast.com/?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Mon, Nov 23, 2015 at 2:40 AM, Игорь Ч <c_i...@inbox.ru> wrote:
> Hi Joe and all,
>
> I have been observing frequently at remote WSJT-X operation that 'white'
> noise level in urban area sometimes can jump 10..14dB up and stay there
> for hours. If AGC is off or if operator, being on remote WSJT-X control,
> can not see S-meter of the classic transceiver, with time going it is very
> easy to get lost the sense of the noise enviroment, just putting down RX
> level slider in WSJT-X.
>
> In this case operator could transmit CQ with no getting responses in the
> decoder, not taking in account the noise enviroment.
>
> May I ask to insert in the GUI some kind of the noise level calibration
> and delta noise level indication in dB, to let operators to compare current
> noise level with the some time point noise level that was measured before
> the RX level slider moved.
>
> I understand there are system level controls that can affect delta noise
> measurements, but believe it should be good option in the case where WSJT-X
> RX level slider is used to adjust the white noise level back to 30 dB.
>
> 73 Igor UA3DJY
>
>
> ------------------------------------------------------------------------------
> Go from Idea to Many App Stores Faster with Intel(R) XDK
> Give your users amazing mobile app experiences with Intel(R) XDK.
> Use one codebase in this all-in-one HTML5 development environment.
> Design, debug & build mobile apps & 2D/3D high-impact games for multiple
> OSs.
> http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
> _______________________________________________
> wsjt-devel mailing list
> wsjt-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wsjt-devel
>
>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <hamlib/rig.h>
#include <hamlib/riglist.h>
float db[5] = { 60,-60,-60,-60,-60 };
int n,i,t;
int main() {
RIG *my_rig;
char *rig_file, *info_buf, *mm;
freq_t freq;
value_t rawstrength, power, strength;
float s_meter, rig_raw2val();
int status, retcode, isz, mwpower;
rmode_t mode;
pbwidth_t width;
struct tm *mytime;
time_t ltime;
char tbuf[256];
FILE *fp=fopen("smeter.log","w");
/* Set verbosity level */
rig_set_debug(RIG_DEBUG_ERR); // errors only
/* Instantiate a rig */
my_rig = rig_init(311); // your rig model.
/* Set up serial port, baud rate */
rig_file = "com11"; // your serial device
strncpy(my_rig->state.rigport.pathname, rig_file, FILPATHLEN - 1);
my_rig->state.rigport.parm.serial.rate = 19200; // your baud rate
/* Open my rig */
retcode = rig_open(my_rig);
if (retcode != RIG_OK) {
fprintf(stderr,"Error opening rig\n");
exit(1);
}
/* Give me ID info, e.g., firmware version. */
info_buf = (char *)rig_get_info(my_rig);
printf("Rig_info: '%s'\n", info_buf);
/* Note: As a general practice, we should check to see if a given
* function is within the rig's capabilities before calling it, but
* we are simplifying here. Also, we should check each call's returned
* status in case of error. (That's an inelegant way to catch an unsupported
* operation.)
*/
/* Main VFO frequency */
status = rig_get_freq(my_rig, RIG_VFO_CURR, &freq);
printf("VFO freq. = %.1f Hz\n", freq);
/* Current mode */
status = rig_get_mode(my_rig, RIG_VFO_CURR, &mode, &width);
switch(mode) {
case RIG_MODE_USB: mm = "USB"; break;
case RIG_MODE_LSB: mm = "LSB"; break;
case RIG_MODE_CW: mm = "CW"; break;
case RIG_MODE_CWR: mm = "CWR"; break;
case RIG_MODE_AM: mm = "AM"; break;
case RIG_MODE_FM: mm = "FM"; break;
case RIG_MODE_WFM: mm = "WFM"; break;
case RIG_MODE_RTTY:mm = "RTTY"; break;
default: mm = "unrecognized"; break; /* there are more possibilities! */
}
printf("Current mode = 0x%X = %s, width = %d\n", mode, mm, width);
/* rig power output */
status = rig_get_level(my_rig, RIG_VFO_CURR, RIG_LEVEL_RFPOWER, &power);
printf("RF Power relative setting = %.3f (0.0 - 1.0)\n", power.f);
/* Convert power reading to watts */
status = rig_power2mW(my_rig, &mwpower, power.f, freq, mode);
printf("RF Power calibrated = %.1f Watts\n", mwpower/1000.);
/* Raw and calibrated S-meter values */
status = rig_get_level(my_rig, RIG_VFO_CURR, RIG_LEVEL_RAWSTR,
&rawstrength);
printf("Raw receive strength = %d\n", rawstrength.i);
isz = my_rig->caps->str_cal.size;
s_meter = rig_raw2val(rawstrength.i, &my_rig->caps->str_cal);
printf("S-meter value = %.2f dB relative to S9\n", s_meter);
/* now try using RIG_LEVEL_STRENGTH itself */
float max=-60,avg=0;
while(1) {
time(<ime);
mytime = localtime(<ime);
strftime(tbuf,sizeof(tbuf),"%H:%M:%S",mytime);
status = rig_get_strength(my_rig, RIG_VFO_CURR, &strength);
db[n] = strength.i;
for(i=0,t=0;i<5;++i) t+=db[i];
avg = t/5.0;
if (avg > max) max = avg;
if (db[n] < -59) max = db[n];
printf( "%3s, %3d, %5.1f, %5.1f\n",tbuf,strength.i,avg,max);
fprintf(fp,"%3s, %3d, %5.1f, %5.1f\n",tbuf,strength.i,avg,max);
fflush(fp);
n = (n+1) % 5;
sleep(1);
}
};
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel