On 12/07/2015 02:12, Steven Franke wrote:

Hi Steve,

...
> - moved random seed initialization to WSPRBandHopping.cpp as recommended by 
> W9MDB. This should address the synchronized-transmissions issue reported by 
> Jean Louis.
I have re-factored this change by moving the pseudo RNG seeding to 
before main() is called which makes it more suitable for a C++ 
application. I have also used the Qt qsrand() as that is more portable 
and is thread safe. It also effectively seeds for rand() but I have 
switched to using qrand() where possible as that too is thread safe.
>
> Comments and suggestions welcome!
I see that wsprd makes use of rand() but doesn't appear to seed the 
pseudo RNG. This is somewhat tricky since the normal way the wsprd is 
started is on a timer and using the usual srand(time(NULL)) will not 
necessarily be valid across a global network of time synchronized 
computers. I am not a fan of spawning a process to do what is 
essentially a simple procedure call so I will leave this to you to find 
a way to seed the PRNG for wsprd. Perhaps srand(getpid()) might be better.
>
> Steve k9an
73
Bill
G4WJS.

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to