[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Using PPS to trigger received data storage in Pyt
From: |
Yan Nie |
Subject: |
Re: [Discuss-gnuradio] Using PPS to trigger received data storage in Python |
Date: |
Mon, 28 Nov 2011 19:23:39 -0500 |
Thank you so much for your suggestions, Josh.
Your suggestion on solving the problem I met is absolutely creative. Thank you
so much!
I have more further detailed questions related:
get_time_last_pps gives a timespec representing the last pps, while how can I
obtain the stream tags from the my down stream block? Can I get the stream tags
in Python, as from a post on my gnuradio discuss list, stream tags
functionality had not pulled into mainline gr-uhd yet until this Sep.?
Then combine these two timespec together to control which samples would be
stored. I am using the file_sink block to create a data file and store the data
in. If using these timespec information to store the samples, I think it needs
to correspond the certain stream tags when pps pulse occurs (timespec given by
get_time_last_pps) to the exact sample stored in the data file created by
file_sink. Therefore, I am wondering how this stream tags correspond to data
samples in the data file, as the data file only stores data samples from my
understanding?
> Continually read get_time_last_pps(). Every time this function returns a
> different value, you know the exact time (relative to USRP) that a pulse
> event occurred.
>
> So you know:
>
> 1) the exact time for every sample thanks to stream tags
> 2) the exact time of every pulse thanks to get_time_last_pps
>
> Now you just have make some code that combines both pieces of
> information to store the samples.