Obtaining date/time from the Kiwi's GPS [fixed in v1.417]
A number of us are building Kiwi + Pi running wsprdaemon systems which will be solar powered and located at remote locations where there is no, or only intermittent, connection to the Internet.
In those installations the Pi's ntp service will have no notion of the current date and time.
Since the Pi has no hardware clock nor, I believe, does the Kiwi, we need a way for wsprdaemon running the Pi to accurately learn the time after a cold start.
I wonder if the GPS section of the Kiwi has or could learn the time from the GPS signal so the kiwirecorder recordings can be synchronized with the 2 minute WSPR cycle.
Of course there are hardware clock accessories for the Pi, but it would be very elegant and almost certainly more accurate if there where a way to obtain the time from the Kiwi GPS system.
In those installations the Pi's ntp service will have no notion of the current date and time.
Since the Pi has no hardware clock nor, I believe, does the Kiwi, we need a way for wsprdaemon running the Pi to accurately learn the time after a cold start.
I wonder if the GPS section of the Kiwi has or could learn the time from the GPS signal so the kiwirecorder recordings can be synchronized with the 2 minute WSPR cycle.
Of course there are hardware clock accessories for the Pi, but it would be very elegant and almost certainly more accurate if there where a way to obtain the time from the Kiwi GPS system.
Comments
But I now realize that the date/time of the cycle is part of each spot posted.
I'm sure I can work around that limitation, and there is always the Pi hat approach.
Here are some notes regarding decoding WWV time code http://don.fed.wiki.org/view/decode-wwv
Craig, W6DRZ
However the extension cannot currently set the Kiwi date/time and there is no automation, i.e. an admin setting that would cause the extension to run automatically occasionally (like WSPR autorun). But these things could be added. I'd have some interest in doing this.
This may or may not make sense depending on where the Kiwis are located. The timecode extension is more of a demo and is not optimized for weak signal reception, error correction etc.
Uploading the time I could understand because there might be a delay between when the spot was observed and when it was successfully uploaded. I suppose that argument could apply to the date as well if wsprnet.org were down for a period of time (which has happened).
Of course, the (remoted) RPI3 still had no idea when or where it was so that system date/time still had to be manually set in order for wsprdaemon to correctly frame wspr time slots and properly upload the correct ones to wsprnet.org and wsprdaemon.org. As John, suggests, date and time must be included in those uploads in order to qualify and properly add unique time stamps to the incoming data. I didn't try the on-board KiwiSDR WSPR extension but I have every reason to believe that it too would operate correctly off-Internet.
I'm awaiting arrival of a real-time-clock add-on for the RPI so that the whole system can operate correctly without so much operator intervention (and usual screw-up!).
Thanks John!
Glenn n6gn
Fort Collins, CO
It is unclear to me what validation wsprnet.org applies to uploaded spots. The wsprnet API I use to scrape their site returns lists with gaps of up to 250 raw spot IDs, so they appear to be dropping some spots. In WD batch uploads, sometimes a few of the spots are rejected for reasons unclear to me.
In any case, in this portable, battery-powered, Internet-connectionless application I will need the Pi running WD have a reasonably good idea of the current date/time to the second. Getting the minute/seconds accurate is the most difficult, and John's change in 410 addresses that well. I can work around getting the date from the user or other source.
I can run 'ssh root@kiwi.local date', but I'll need to set up the WD user on the Pi to auto-ssh-login to the root account on the Kiwi.
It appears to work correctly in the absence of any (functioning) RTC.
Only a GPS antenna is required to properly decode WSPR though of course, to get it uploaded to wsprnet or wsprdaemon at a later time is another matter entirely.
Even if/when wsprnet.org does acquire the data, only the map/table display reveals it since the API does not work properly. I haven't checked but I suppose it will also exist in the archive if one can wait for it.
Data uploaded to wsprdaemon.org OTOH does seem to be available after the fact and the available tool sets that use that database can work on delayed data.
Glenn n6gn
So in the log you might see something like this which shows a date/time update via PRN-N02 (Navstar) from Oct 25 00:01:40 to Oct 30 04:56:07