More on the crazy ITA2 encodingβ¦
So, this morning, I was trying to test my understanding of the ITA2 code used in amateur radio teletype communications. I wrote up an encoder, generated some test audio files, and tried decoding them with fldigi. It mostly worked, but I had some difficulty with certain punctuation marks. I was curious what the problem should be, so I dug into the code in fldigi that does this stuff. I found this interesting chunk of code:
[sourcecode lang=βcppβ]
#if 0
/*
- ITA-2 version of the figures case.
/
static unsigned char figures[32] = {
β\0β, β3β, β\nβ, β-β, β β, β”, β8β, β7β,
β\rβ, β\xb7β, β4β, β\aβ, β,β, β\xb7β, β:β, β(β,
β5β, β+β, β)β, β2β, β\xb7β, β6β, β0β, β1β,
β9β, β?β, β\xb7β, β\xb7β, β.β, β/β, β=β, β\xb7β
};
#endif
#if 1
/ - U.S. version of the figures case.
/
static unsigned char figures[32] = {
β\0β, β3β, β\nβ, β-β, β β, β\aβ, β8β, β7β,
β\rβ, β$β, β4β, β”, β,β, β!β, β:β, β(β,
β5β, β"β, β)β, β2β, β#β, β6β, β0β, β1β,
β9β, β?β, β&β, β\xb7β, β.β, β/β, β;β, β\xb7β
};
#endif
#if 0
/ - A mix of the two. This is what seems to be what people actually use.
*/
static unsigned char figures[32] = {
β\0β, β3β, β\nβ, β-β, β β, β”, β8β, β7β,
β\rβ, β$β, β4β, β\aβ, β,β, β!β, β:β, β(β,
β5β, β+β, β)β, β2β, β#β, β6β, β0β, β1β,
β9β, β?β, β&β, β\xb7β, β.β, β/β, β=β, β\xb7β
};
#endif
[/sourcecode]
Odd. It seems to differ significantly from the βofficialβ ITA2 code. So, I modified my RTTY encoder to use the same encoding. I also discovered that fldigi implements βunshift-on-spaceβ, regardless of what mode you are in, sending a space drops you back into the letter mode. This caused some things to decode improperly until I fixed it.
Now, it seems to work. If you are bored, you could download this overly long and verbose RTTY message (note, you may have to reverse mark and space frequencies, Iβm not sure I got that right yet).