Would it be good/better if the next hop choice was random order amongst your bands instead of just a continuously random band? This way you'd be guaranteed to visit each band in an N-transmit * N-bands period instead of Las Vegas odds where you can get bad runs and never touch a band for quite a while. I would think the permutations of desired bands would be more than enough randomness.
In other words rather than this: int target_index = static_cast<int> (qrand () % num_bands); // random choice Do this: int target_index = next_band(num_bands, false); // next in randomized available list auto WSPRBandHopping::next_band(int num_bands, bool reset) { static int saved_bands; static std::queue<int> bandlist; if (reset || num_bands != saved_bands || bandlist.size() == 0) { saved_bands = num_bands; for(auto i=0;i<num_bands;++i) { bandlist.push(qrand () % num_bands); } } int idx = bandlist.front(); bandlist.pop(); return idx; } I put a reset flag in just for grins if needed. I also notice that qsrand is done twice. I assume that's a boo-boo? Modulator.cpp: qsrand (QDateTime::currentMSecsSinceEpoch()); // Initialize random seed psk_reporter.cpp: qsrand(QDateTime::currentDateTime().toTime_t()); 73 Mike W9MDB ------------------------------------------------------------------------------ _______________________________________________ wsjt-devel mailing list wsjt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wsjt-devel