In this tutorial we will practice randomly generated callsigns.
10 Callsigns
We can generate callsigns with the callsign command. We indicate how many callsigns we require with a following number:
# callsign.rb
require 'cw'
cw do
comment "test 10 callsigns"
wpm 20
callsign 10
end
Note: The callsigns generated currently are restricted to UK callsigns. Adding further countries to the callsign database is simply a matter of adding callsign formats to data/callsign/callsign.yaml.
CQ DE callsign K
Here is a script that will generate 10 random callsigns, and wrap them with a preamble of ‘CQ DE ‘ and end with ‘K’. It will also randomize the frequency, and randomize the speed. Useful for contest practice!
# callsign_2.rb
require 'cw'
puts "cq de callsign k 5 times"
5.times do
cw do
comment 'random frequency, random wpm callsign with pre and postamble'
frequency 500 + rand(400)
wpm 25 + rand(10)
callsign
(words.unshift "cq de") << 'k'
print_letters
end
end