Re: [Discuss-gnuradio] Delay block controlled by input

2014-11-06 Thread Carlos Alberto Ruiz Naranjo
Now the clock runs fine (with gr::block::nitems_read). But I have another problem: I have a rate of 10.23 million samples per second and I need to delay the signal +-1ns. With the modified block delay (controlled by an input) I can delay the signal 97.75ns (1 / 10,230,000 -> + - one sample). Cou

Re: [Discuss-gnuradio] Delay block controlled by input

2014-10-08 Thread Martin Braun
On 10/08/2014 03:24 PM, Carlos Alberto Ruiz Naranjo wrote: > Really the question is: > > How can I call > gr::block::nitems_read( unsigned int/which_input/ ) > > from a block to know the nitems_read of another block? You call 'nitems_read()'? Not sure you should be ca

Re: [Discuss-gnuradio] Delay block controlled by input

2014-10-08 Thread Marcus Müller
You call another_block->nitems_read(number) with number being the number of the input stream (ie. 0 for the first, 1 for the second and so on). Remember, GNU Radio is C++, and blocks are built as classes. Greetings, Marcus On 08.10.2014 15:24, Carlos Alberto Ruiz Naranjo wrote: > Really the quest

Re: [Discuss-gnuradio] Delay block controlled by input

2014-10-08 Thread Carlos Alberto Ruiz Naranjo
Really the question is: How can I call gr::block::nitems_read (unsigned int *which_input*) from a block to know the nitems_read of another block? 2014-10-08 15:10 GMT+02:00 Carlos Alberto Ruiz Naranjo < carlosruiznara...@gmail.com>: > And a question. In: > > uint64_t >

Re: [Discuss-gnuradio] Delay block controlled by input

2014-10-08 Thread Carlos Alberto Ruiz Naranjo
And a question. In: uint64_t gr::block::nitems_read ( unsigned int *which_input*) How I know wich_input? 2014-10-08 15:08 GMT+02:00 Carlos Alberto Ruiz Naranjo < carlosruiznara...@gmail.com>: > OK !! Thank you v

Re: [Discuss-gnuradio] Delay block controlled by input

2014-10-08 Thread Carlos Alberto Ruiz Naranjo
OK !! Thank you very much for the tips. Next week I will use it in my PC of the lab. ;) The delay is in the data, not in the modulated signal. And I insert the average between the previous and the next sample. Greetings 2014-10-08 14:53 GMT+02:00 Marcus Müller : > Hi, > > On 08.10.2014 14:38, C

Re: [Discuss-gnuradio] Delay block controlled by input

2014-10-08 Thread Marcus Müller
Hi, On 08.10.2014 14:38, Carlos Alberto Ruiz Naranjo wrote: > Delay Block is controlled by Satellite Orbit and Satellite Orbit by > "simulated clock". The output of Satellite Orbit is the delay (samples). > Can I know the nitems_read of Delay Block from other block (Satellite > Orbit)? Yes. It's a

Re: [Discuss-gnuradio] Delay block controlled by input

2014-10-08 Thread Carlos Alberto Ruiz Naranjo
Delay Block is controlled by Satellite Orbit and Satellite Orbit by "simulated clock". The output of Satellite Orbit is the delay (samples). Can I know the nitems_read of Delay Block from other block (Satellite Orbit)? Maybe a solution is to introduce Orbit Satellite in Delay block, but this is re

Re: [Discuss-gnuradio] Delay block controlled by input

2014-10-08 Thread Jeff Long
If you're comparing real time (system clock) to your sample stream, you'll get jitter, not drift, using a throttle. Throttle maintains a sample rate over time, but operates on blocks, and also is running under a non-realtime operating system. If you're talking about drift between the clock on

Re: [Discuss-gnuradio] Delay block controlled by input

2014-10-08 Thread Marcus Müller
In that case, just use nitems_read() [1] in your delay block to inherently calculate "simulated time". However, I'm a bit curious about the effects of using delay to do this: Because, as long as the satellite is approaching you, you're occasionally dropping samples, whereas you're inserting zeros

Re: [Discuss-gnuradio] Delay block controlled by input

2014-10-08 Thread Carlos Alberto Ruiz Naranjo
Yes, it is not a real time clock. This "clock" tracks the current time of the signal in GNURadio. clock2 and clock1 have a drift because the number of counted samples are different. For example, if it pass 1023 samples the delay block is entering the delay in signal time = 1 second. 1 second i

Re: [Discuss-gnuradio] Delay block controlled by input

2014-10-08 Thread Martin Braun
See also http://gnuradio.org/redmine/projects/gnuradio/wiki/FAQ#What-does-sample-rate-mean-in-GNU-Radio. M On 10/08/2014 01:18 PM, Martin Braun wrote: > If you don't have hardware involved, you have no 'clock'. And as such, > it can't drift. > > M > > On 10/08/2014 12:29 PM, Carlos Alberto Ruiz

Re: [Discuss-gnuradio] Delay block controlled by input

2014-10-08 Thread Martin Braun
If you don't have hardware involved, you have no 'clock'. And as such, it can't drift. M On 10/08/2014 12:29 PM, Carlos Alberto Ruiz Naranjo wrote: > Sorry, I have explained bad: S > I have the signal saved in a file and 1023 samples are one second > (in the real world). > > In the first gra

Re: [Discuss-gnuradio] Delay block controlled by input

2014-10-08 Thread Carlos Alberto Ruiz Naranjo
Sorry, I have explained bad: S I have the signal saved in a file and 1023 samples are one second (in the real world). In the first graph I have two clocks (counters samples). When passing 102300 samples it increase 0.01 seconds. In the first watch this time controls the position of the satelli

Re: [Discuss-gnuradio] Delay block controlled by input

2014-10-08 Thread Marcus Müller
Hello Carlos, On 08.10.2014 09:10, Carlos Alberto Ruiz Naranjo wrote: > I generate the signal from a file (1023 samples/s) to a file. My > sampling clock drifts significantly :S No. Unless I misunderstood you, you have a big misconception: "sampling clock" is *not* the rate at which your sample

Re: [Discuss-gnuradio] Delay block controlled by input

2014-10-08 Thread Carlos Alberto Ruiz Naranjo
I generate the signal from a file (1023 samples/s) to a file. My sampling clock drifts significantly :S - Picture one: Counter Clock 2 is correct but Counter Clock 1 no. Then I should use the second configuration, but it is not allowed because I have a loop, right? ​ I'll try the method you

Re: [Discuss-gnuradio] Delay block controlled by input

2014-10-07 Thread Marcus Müller
Ok, you'll have to explain why you'd need throttle, as this is almost never the case, especially not when a) working in a simulation or b) working with "real" hardware, as that usually enforces a sampling rate. If you know the physical sampling rate, counting samples *must* work, unless your sampli

Re: [Discuss-gnuradio] Delay block controlled by input

2014-10-07 Thread Carlos Alberto Ruiz Naranjo
I am having problems with the clock. I need to track the real time of the signal. I have tried to get it with a sample counter and a throttle (to maintain the rate), but it doesn't work. The clock is faster or slower than the current signal time. Any idea? ;) 2014-09-23 20:13 GMT+02:00 Tom Rondea

Re: [Discuss-gnuradio] Delay block controlled by input

2014-09-23 Thread Tom Rondeau
On Tue, Sep 23, 2014 at 9:25 AM, Carlos Alberto Ruiz Naranjo < carlosruiznara...@gmail.com> wrote: > - SIGNAL: 1023 samples/s > > - CLOCK: Counter that increments +0.001 when passing 10230 samples. > > - SATELLITE ORBIT: Calculate the satellite orbit and delay. > > > ​ > Ok. My problem with t

Re: [Discuss-gnuradio] Delay block controlled by input

2014-09-23 Thread Carlos Alberto Ruiz Naranjo
- SIGNAL: 1023 samples/s - CLOCK: Counter that increments +0.001 when passing 10230 samples. - SATELLITE ORBIT: Calculate the satellite orbit and delay. ​ ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/lis

Re: [Discuss-gnuradio] Delay block controlled by input

2014-09-23 Thread Carlos Alberto Ruiz Naranjo
It simulates the signal delay of a satellite. It is updated every millisecond. The control mechanism is a block which calculates the satellite orbit every millisecond and measures the distance. 2014-09-23 14:54 GMT+02:00 Tom Rondeau : > On Tue, Sep 23, 2014 at 2:38 AM, Carlos Alberto Ruiz Naranj

Re: [Discuss-gnuradio] Delay block controlled by input

2014-09-23 Thread Tom Rondeau
On Tue, Sep 23, 2014 at 2:38 AM, Carlos Alberto Ruiz Naranjo < carlosruiznara...@gmail.com> wrote: > Hello, > > I have modified GNURadio delay block. It is a controlled delay from an > input at runtime. > > I would like to know your opinion; if the block is well designed. > > > http://pastebin.com

[Discuss-gnuradio] Delay block controlled by input

2014-09-22 Thread Carlos Alberto Ruiz Naranjo
Hello, I have modified GNURadio delay block. It is a controlled delay from an input at runtime. I would like to know your opinion; if the block is well designed. http://pastebin.com/f7Y24fin http://pastebin.com/0gKDHgwL ___ Discuss-gnuradio mailing l