I believe it can be done with Qt using IntValidator on the TextBox input?
Alan G0TLK
On 21/10/2022 10:19, Frode Igland via wsjt-devel wrote:
Roman,
I see your point. Since the power data is manually input in the
logging window, I guess that the check for "numbers only" in the "Tx
Power" field must be made in the logging window, before the "OK" is
accepted. However, I don't know if this check can be easily
implemented. In the meanwhile, be disciplined and use numbers only. 😊
73, Frode LA6VQ
ons. 19. okt. 2022 kl. 22:08 skrev cirnod via wsjt-devel
<wsjt-devel@lists.sourceforge.net>:
Hi Frode
I agree with you that in practice many applications are tolerant
and read non-compliant ADIF files without errors. However, my
report was actually triggered by a practical problem. Concretely,
I tried to read the ADIF file created by WSJT-X using the Python
library "hamutils". This did not work and resulted in errors. Upon
further investigation, I realized that (in certain cases) WSJT-X
strictly speaking generates ADIF files that do not conform to the
specifications. After manually correcting the values of the tx_pwr
fields in the ADIF file, the processing using the "hamutils"
library works without issues. To permanently fix this issue and
prevent further similar problems in combination with other
software I would therefore welcome it if the WSJT-X software could
be adapted such that the generated ADIF file always complies with
the specifications.
Regards
Roman HB9HDN
On 19.10.22 15:05, Frode Igland via wsjt-devel wrote:
Hi, Roman.
My experience is that the ADIF format accepts more than the ADIF
specifications may indicate. I have used the "Tx power" field in
the WSJT-X logging window for most of my tens of thousands of
WSJT-X QSOs. Whether I enter "40 W", "40W" or "40", it hits my
HRD Logbook as "40", i.e. a clean number. Apparently, the ADIF
protocol is smart enough to find and understand the numbers,
leaving out the letters. However, that also means that "1kW" or
"1 kW" is transferred as "1". In the practical world, this may be
a smaller problem for WSJT-X, as I cannot see any good reason to
use 1kW for the common WSJT-X modes, except for EME QSOs. EME
operators will soon enough understand that they didn't make a QSO
with 1 W, and should be able to edit the Tx Power in their
logging software. Human interaction and thoughtful discretion is
still a good value in ham radio. 😊
I guess the issue may be solved practically by changing the field
title in the logging window from "Tx power" to "Tx power (W)" or
"Tx power (watt)", or possibly, like you suggest, make a tooltip
reminding the operator that a watt _number_ is expected, however,
I don't know if the logging window is open for tooltips, as there
are none yet.
73, Frode LA6VQ
ons. 19. okt. 2022 kl. 00:53 skrev cirnod via wsjt-devel
<wsjt-devel@lists.sourceforge.net>:
Hi
I would like to report an issue with the ADIF log
created by WSJT-X. I'm currently using v2.5.4 on
macOS 12.6.
WSJT-X offers to log QSOs by filling in a form
prompt. One of the fields of the form allows to
log the "Tx power". Apparently, the form accepts
any text string entered into this field.
Furthermore, the unmodified text string is used to
create the ADIF log of WSJT-X. This behavior
potentially leads to invalid ADIF files as they do
not conform with the ADIF specifications [1]. For
example a user could enter "10W" or "1kW".
According to the specifications, the "TX_PWR"
field should contain "the logging station's power
in Watts with a value greater than 0". In
addition, the data type of this ADIF field is
"Number", i.e. "a sequence of one or more Digits
representing a decimal number, optionally preceded
by a minus sign (ASCII code 45) and optionally
including a single decimal point (ASCII code 46) ".
I see the following points that could help fixing
the mentioned issue:
* Adding tooltip/instructions for the user to
clarify what data type and value (in what units)
should be entered in the "Tx power" field.
* User input sanitation either for the "Tx power"
field of the QSO log form prompt or before writing
the value entered by the user to the ADIF log
file. One option would be to rejecting the
submission of the form and informing the user in
case a wrong data type has been entered.
Regards
Roman HB9HDN
[1]
https://www.adif.org/313/ADIF_313.htm#QSO_Field_TX_PWR
_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel
_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel
_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel
_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel
_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel