Since srand(time(0)) is used then two machines started at the same second
will be synchronized. Normally the odds of that happening are pretty rare.
But if srand is done at the end of every schedule period than it sounds like
a whole lot of WSJT-X's could be getting synchronized to the same schedule.
Try moving the srand to the constructor in WSPRBandHopping.cpp
That way it will set when the program is started rather than resetting
constantly.
So as long as you don't start both programs at the same second no one should
be synchronized.
And really should replace srand with this so it's even less likely to
collide with anybody else.
struct timeval time;
gettimeofday(&time,NULL);
srand((time.tv_sec*1000) + (time.tv_usec/1000));
Index: WSPRBandHopping.cpp
===================================================================
--- WSPRBandHopping.cpp (revision 5709)
+++ WSPRBandHopping.cpp (working copy)
@@ -6,6 +6,7 @@
#include <QList>
#include <QSet>
#include <QtWidgets>
+#include <sys/time.h>
#include "SettingsGroup.hpp"
#include "Configuration.hpp"
@@ -118,6 +119,11 @@
main_layout->addLayout (bottom_layout);
setLayout (main_layout);
+ // init our random seed here just once and make it pretty unique
+ struct timeval time;
+ gettimeofday(&time,NULL);
+ srand((time.tv_sec*1000) + (time.tv_usec/1000));
+
}
Dialog::~Dialog ()
Index: WsprTxScheduler.cpp
===================================================================
--- WsprTxScheduler.cpp (revision 5709)
+++ WsprTxScheduler.cpp (working copy)
@@ -104,7 +104,7 @@
needed=60*(pctx/100.0)+0.5;
- srand(time(NULL));
+ //srand(time(NULL));
memset(tx,0,sizeof(char)*60);
if( pctx < 17 ) {
73
Mike W9MDB
-----Original Message-----
From: f5djl [mailto:[email protected]]
Sent: Thursday, July 09, 2015 2:33 PM
To: 'WSJT software development'
Subject: [wsjt-devel] WSPR scheduler - no band hoping behavior
Hi all ,
I believe these questions/remarks are more for Steve and Bill. As part of
testing/implementation of WSPR on VHF with a group of french hams
(1HDI,2MM,6ABJ,6BYJ) we currently test v5700 with a variety of TRX and
interfaces , always in non band-hopping mode .
My questions are related to how is supposed to work the randomization of TX
slot process and how/when exactly is the TX table recalculated ?
1/ For example if you start the application on two machines carefully time
synchronized ( ntp sync < one second) with a TX% at 20 % at a few seconds
interval but within same 2 mn slot, is it expected that TX sequence will
be the same , ie the TX slots will be synchronous on the two machines ?
I had a quickly look at the code which I believe is involved ie
create_tx_schedule (int pctx) and I saw srand(time(0)) being used , I
thought wrongly most probably that the intent was to randomize the table by
generating a seed based on delta in seconds to reference 1970 ? I must
admit , I did not fully understood the purpose of the series of if statement
on pctx and the process of filling of the tx[] array and I have some serious
doubt on the effect of the band Hoppng .
2/ I understand that TX next or disable/enable TX have no impact on the
schedule, is my understanding correct ?
3/ The table is calculated in next_tx_state function I believe at start of
application , then at the top of the hour ? BTW I saw a double TX
transmission at xx:58 and XX+1:00 today)
Thanks for your patience to explain and educate, understanding this
behavior is important to us in a small network of VHF stations (<10) as we
are trying to minimize the chance to get two stations TX simultaneously and
then long period of simultaneous silence. So far I must admit we got some
rather unexpected results as the machines are much more than expected
simultaneously transmitting/receiving when at same Tx percentage .
Best regards
Jean Louis
----------------------------------------------------------------------------
--
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/wsjt-devel
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/wsjt-devel