WSPR Callsign with one char prefix failed.
Hello, I did have some trouble with a one char prefix in the wspr callsign (F/PE0FKO), it was not received by the wspr systems. Did check the code for the JTEncode::wspr_encode() function and found the problem in JTEncode::wspr_bit_packing(). There, in the function line 1000, the 3 and 2 char prefix is handled, only the one char prefix is not! I fixed the code with some extra if statement for the 1 char prefix and it works (for me ;-)), maybe you update the repo for that. 73, Fred, pe0fko
Hello, I did have some trouble with a one char prefix in the wspr callsign (F/PE0FKO), it was not received by the wspr systems. Did check the code for the JTEncode::wspr_encode() function and found the problem in JTEncode::wspr_bit_packing(). There, in the function line 1000, the 3 and 2 char prefix is handled, only the one char prefix is not! I fixed the code with some extra if statement for the 1 char prefix and it works (for me ;-)), maybe you update the repo for that. 73, Fred, pe0fko
Hello Fred. Would you mind sharing your code, I have same problem decoding my M/9A3ICE callsign!
73 Ivica
Hello, I did have some trouble with a one char prefix in the wspr callsign (F/PE0FKO), it was not received by the wspr systems. Did check the code for the JTEncode::wspr_encode() function and found the problem in JTEncode::wspr_bit_packing(). There, in the function line 1000, the 3 and 2 char prefix is handled, only the one char prefix is not! I fixed the code with some extra if statement for the 1 char prefix and it works (for me ;-)), maybe you update the repo for that. 73, Fred, pe0fko
Hello Fred. Would you mind sharing your code, I have same problem decoding my M/9A3ICE callsign!
73 Ivica
For anyone currently curious this is the code snippet:
if (prefix[1] == ' ' || prefix[1] == 0) {
prefix[3] = 0;
prefix[2] = prefix[0];
prefix[1] = ' ';
prefix[0] = ' ';
} else if (prefix[2] == ' ' || prefix[2] == 0) {
prefix[3] = 0;
prefix[2] = prefix[1];
prefix[1] = prefix[0];
prefix[0] = ' ';
}
i will follow up with a propper pr when I test if I have broken anything else with this. thanks @pe0fko
Thanks Ivica, the code looks Ok and I did use it this year a lot . I hope it will be in the lib code, after change to platformio I did forget to add it :-(
73, Fred, pe0fko.
//PE0FKO : The single prefix fix.
#if 1
if(prefix[1] == ' ' || prefix[1] == 0)
{
// Right align prefix
prefix[3] = 0;
prefix[2] = prefix[0];
prefix[1] = ' ';
prefix[0] = ' ';
}
else if(prefix[2] == ' ' || prefix[2] == 0)
{
// Right align prefix
prefix[3] = 0;
prefix[2] = prefix[1];
prefix[1] = prefix[0];
prefix[0] = ' ';
}
#else
if(prefix[2] == ' ' || prefix[2] == 0)
{
// Right align prefix
prefix[3] = 0;
prefix[2] = prefix[1];
prefix[1] = prefix[0];
prefix[0] = ' ';
}
#endif
Thanks Ivica, the code looks Ok and I did use it this year a lot . I hope it will be in the lib code, after change to platformio I did forget to add it :-(
73, Fred, pe0fko.
//PE0FKO : The single prefix fix. #if 1 if(prefix[1] == ' ' || prefix[1] == 0) { // Right align prefix prefix[3] = 0; prefix[2] = prefix[0]; prefix[1] = ' '; prefix[0] = ' '; } else if(prefix[2] == ' ' || prefix[2] == 0) { // Right align prefix prefix[3] = 0; prefix[2] = prefix[1]; prefix[1] = prefix[0]; prefix[0] = ' '; } #else if(prefix[2] == ' ' || prefix[2] == 0) { // Right align prefix prefix[3] = 0; prefix[2] = prefix[1]; prefix[1] = prefix[0]; prefix[0] = ' '; } #endif
Cheers sir! I have opened a pr