[USRP-users] Problem with N210 and start GPS time
Marcus D. Leech
mleech at ripnet.com
Wed Oct 28 11:12:14 EDT 2015
On 10/28/2015 09:37 AM, Giovanni MARINO via USRP-users wrote:
> I found some examples in order to understand how to set the time for
> starting data acquisition with a N210 at determined date and hour
> therefore I wrote the following code:
> timestamp1 = time.mktime(datetime.now().timetuple()) #in order
> to check if the epochs are the same.
> print "Timenow", timestamp1
> print "GPS time", gps_time
> start_time='28.10.2015 12:25:00' #(it has be updated)
> start_time = time.mktime(time.strptime(start_time,'%d.%m.%Y
> print "Start
> self.blocks_file_sink_0 =
> blocks.file_sink(gr.sizeof_gr_complex*1,"./Data/DatafromN210.dat", False)
> I suppose that something does not work, because I am not able to save
> the data into the file (i.e. the file does not contain data as expected).
> What's wrong with the above-mentioned code?
> Thank you in advance for your time and help.
Is that the entirety of your code, or just a piece of it?
If you want to start streaming very far in the future, I'd suggest just
using ordinary systemy things to "soak up" most of that time, like a
"sleep" or don't actually invoke your
program until close to the time you want to start streaming, and then
use the timed-streaming to do a more precise start-time.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the USRP-users