discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Triggering USRP at given GPS time from GNU Radio


From: Piotr Krysik
Subject: Re: [Discuss-gnuradio] Triggering USRP at given GPS time from GNU Radio
Date: Tue, 24 Feb 2015 14:56:38 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

W dniu 24.02.2015 o 10:59, Martin pisze:
> For this application it would be helpfull if you could set the
> start_time from grc.
>
> In general it would be very helpfull if you could add your own python
> code to grc without having to edit it manually after generating.
>
> A "codeblock" in a similar way the import block is implemented would
> be very helpful. Just a block where you can add code. You should
> probably be able to choose where the code is added.
>
>   at the top of the file after all imports
>   at the beginning of the constructor of the flowgraph
>   at the end of the constructor of the flow_graph
>   as a seperate method of the flowgraph
>   at the start of main
>   at the end of main.
>
> We could make it a feature request.
> Or maybe I should just implement it. 

Martin,

The solution proposed by you would be very good to give to the user
ability to do something more sophisticated than gnuradio-companion
supports at any point in the future.

However in my opinion ability to trigger USRP at a specified time is
quite basic feature of the device. Maybe it would be better to add the
start_time parameter in gnuradio-companion UHD blocks (source and sink)
that would be parsed into appropriate python code. To keep it simple to
implement the value given could be as a float in seconds that would be
directly converted into USRP's clock value like this:

    uhd.time_spec_t(start_time)

and it would be user task to assign proper value like:

   start_time:    time.mktime(time.strptime(time_string,'%d.%m.%Y
%H:%M:%S')) #if he uses GPSDO

or

    start_time:   self.uhd_usrp_source.get_time_now()+4 #if he just to
start 4 seconds from now

The examples of how to use this parameter could be documented in the
description of the blocks so each user wouldn't have to find this out on
his own.

The other advantage of this approach - it would also give a simple way
to synchronize UHD source and sink from gnuradio-companion.

Best Regards,
Piotr Krysik



reply via email to

[Prev in Thread] Current Thread [Next in Thread]