HalfDAH = DAHmS/2 // Maximum accepted value in mS for a DIT element (sloppy)ĭITDAH = DITmS + DAHmS // Maximum accepted value in mS for a DAH element (sloppy)ĭiDiDi = DITmS * 3 // Minimum mS that Key must be up to decode a character via MM QuarterDIT = DITmS/4 // Minimum accepted value in mS for a DIT element (sloppy) HalfDIT = DITmS/2 // Minimum mS that Key must be UP (quiet) before MM assignment to dot/dash WordBreak = 7 * DITmS // changed from wordSpace*2/3 Key UP time in mS for WORDBREAK (space)Įlements = Ma圎lement // International Morse is 5 characters but ProSigns are 6 characters character break is 3 counts of quiet where dah is 3 counts of tone a sliding-window is used to do the actual character decoding. Prosigns decoded: // ITU (International Morse Code) decoding: The MM matrix is decoded in 6-elements to provide for prosignsĬhar MM PROGMEM = "_EISH5ee0TNDB6-0" // 0 - 15 e = ERROR This works like a key, so the Magic Morse trainer can decode OTA, too. To test, I use a single NPN which is saturated by the output from the PC audio which I run through a small matching transformer and then through a simple RC filter to drive the transistor base. I have never taken a pre-build unit back home as someone always buys it as I price them for cost recovery only. I've also usually have one pre-built unit at the local Stone Mountain Hamfest for folks to play around with. I cannot attest to other algorithms, but Magic Morse can take any of the ARRL's sample files and reproduce them 100%. The best hardware/software solution we could develop using human inputs was about 30wpm, and even then it wasn't 100%, but enough to read it. It then starts using Farnsworth encoding, which throws the timing out the window. The ARRL sends practice code over the air on a regular basis and it is mathematically perfect.up to 18wpm. The problem with decoding is that people have different "fists", or rhythms, when sending code that doesn't follow the mathematical timing that's required. Now that we have encoding Morse pretty well nailed down, how 'bout decoding Morse code, which is a little more interesting. THIS TABLE INCLUDES ALL CHARACTERS ENCODED IN THE 'a_decode' LOOKUP TABLE 'DECODE' THIS LIST OF MORSE CHARACTER STRINGS #define NUM_ENTRIES(ARRAY) (sizeof(ARRAY) / sizeof(ARRAY)) The version encoded here is a six element encoding to include some punctuation characters. If you're interested I can post the code the generates the 'a_decode' table based on the 'morse' table which would allow you to add or remove the morse characters you wish to allow. Original thread: morse decoder problem - #9 by nickgammon - Programming Questions - Arduino ForumĮxample of decoding a morse 'C' string using a lookup table. It auto-adjusts to the sending speed after a bit of time "learning" the length of a dot and dash. (millis () - lastPulse) >= (dotLength * 2) & If (pinState = HIGH & width >= (wordLength - FUZZ_FACTOR)) If (pinState = HIGH & width >= (dashLength - FUZZ_FACTOR)) Volatile unsigned int widths īyte pinState = digitalRead (SIGNAL_PIN) Here it is from my sketches folder: // Morse code decoderĬonst int SIGNAL_COUNT = 6 // maximum number of dots/dashes in a letter I seem to remember writing a decoder a while back.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |