Hi Michael,

If you are working with metadata and timestamps, I think the gr-analysis module 
may be of use to you. As for your particular question, my understanding is that 
the 1PPS provides the timestamp information present in the metadata. So I would 
suppose the (possibly interpolated) sample with integer seconds would be on the 
PPS. But I’m not 100% confident on that so perhaps someone else can chime in 
and help us out. I will also point out the file metadata sink is not 
particularly efficient at writing metadata (although quite robust) so you may 
need something like specrec (in gr-analysis) for higher sample rates.


https://github.com/garverp/gr-analysis <https://github.com/garverp/gr-analysis>

PWG

> 
> From: Michael Skaggs <mskag...@umbc.edu>
> Subject: [Discuss-gnuradio] 1PPS Synchronization - File Meta Sink Data
> Date: April 1, 2016 at 10:49:30 AM EDT
> To: discuss-gnuradio@gnu.org
> 
> 
> Hi all,
> 
> I'm doing a simple RF recording with a B200mini synchronized to an accurate 
> GPS 1PPS. I'm attempting to determine which samples(most importantly the 
> first one) fall on a 1PPS pulse. I'm using the File Meta Sink block in GRC to 
> try and extract information from the recording. When I read the data from the 
> header, here is what is shown:
> 
> fileName: 'X:\XXXXX.dat'
> ifileName: 'X:\XXXXX.idx'
> ioType: 'r'
> totalPulseCount: 11
> sampleCount: 1000000
> startTime: [0 0.1120]
> timestamp0: '1970-01-01 00:00:00.112'
> rx_rate: 1000000
> rx_time: [0 0.1120]
> timestamp: '1970-01-01 00:00:00.112'
> rx_freq: 500000000
> sampleType: 'float'
> typeFlag: 'double'
> vBit: 1
> impediance: 50
> samples: []
> 
> So, this is a 1 MSps recording with a center frequency at 500MHz and about 11 
> seconds in length, so the extracted information is definitely correct. But a 
> couple of questions from the metadata:
> 
> The "startTime" value is 0.1120. I realize that this is the time stamp of the 
> first sample of the segment. However, does that mean that sample 112000 
> (1MSps*0.1120) is the first sample that falls on a PPS since the B200mini is 
> synced to it?
> 
> Second, the "samples" field is empty. I was attempting to populate it with 
> sample numbers that fall on a 1PPS or a header. If the header is synchronized 
> to the 1PPS, this will be fairly easy. If not, is there a way to determine 
> which samples fall on the PPS?
> 
> Thanks,
> Michael 
> 
> 
> 
> 

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to