Skip to content

Incorrect padding of short callsigns #3

@dj1yfk

Description

@dj1yfk

The code generator at https://swharden.com/software/wspr-code-generator/ produces wrong results for many call signs.

It simply pads spaces in front of the callsign until we have 6 characters:
https://github.com/swharden/WsprSharp/blob/main/src/WsprSharp/Encode.cs#L85

The encoding however demands that the third character is always a number, and only the first and the last three characters can be spaces/padding:
https://github.com/swharden/WsprSharp/blob/main/src/WsprSharp/Encode.cs#L36 ff

Therefore the padding only works correctly for 2x3 callsigns (AA0AAA - no padding needed) or 1x3 callsigns (A0AAA - single space padding in front bringing the number to position 3).

For all other callsigns, it pads incorrectly. Real life example described here https://www.qrpforum.de/forum/index.php?thread/14781-wspr-code-generator-gel%C3%B6st/ (DL3PB encoded as " DL3PB" which is not encodable, and the resulting bit pattern happens to be another valid callsign, "F0UPB")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions