[Discuss-gnuradio] Clock block slow in position satellite calculation

2014-06-10 Thread caruiz.ext

Hello,

I have this flowgraph in GNURadio: 
http://i1281.photobucket.com/albums/a515/Carlos_Alberto_Ruiz_Naranjo/esque_zpsd89166da.png


- Green: calculates the signal delay of a satellite.
- Yellow: a clock with a second precision.

If I run the clock separately I can see in the WX GUI Number Sink that 
it works. (0,1,2,3,4... each second)
But if I run the entire flowgraph I can see in the WX GUI Number Sink 
that clock becomes very slow. (0,1,2,3,4... each 2 second approximately)



Why is this? Any solution?

Thank you ;)


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


Re: [Discuss-gnuradio] Clock block slow in position satellite calculation

2014-06-10 Thread Marcus Müller
Hi!
You shouldn't use so many throttles in one flow graph; throttle limits
the number of samples going through in a given time, and as soon as the
upstream blocks have filled their output buffer, they will be limited
in throughput, too.
So I guess this is the effect of throttles blocking each other; however,
I don't really understand what's happening inside your flowgraph, so
this is a lot of guesswork.

Greetings,
Marcus
On 10.06.2014 09:23, caruiz.ext wrote:
 Hello,

 I have this flowgraph in GNURadio:
 http://i1281.photobucket.com/albums/a515/Carlos_Alberto_Ruiz_Naranjo/esque_zpsd89166da.png

 - Green: calculates the signal delay of a satellite.
 - Yellow: a clock with a second precision.

 If I run the clock separately I can see in the WX GUI Number Sink that
 it works. (0,1,2,3,4... each second)
 But if I run the entire flowgraph I can see in the WX GUI Number Sink
 that clock becomes very slow. (0,1,2,3,4... each 2 second approximately)


 Why is this? Any solution?

 Thank you ;)


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


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


Re: [Discuss-gnuradio] Clock block slow in position satellite calculation

2014-06-10 Thread caruiz.ext

Hi!


 RetardoSat:
1.Come three samples (method work)
- X: X position of receiver.
- Y: Y position of receiver.
- Z: Z position of receiver.
- ClK: seconds.

2. With Kepler paremeters calculates the satellite position, the 
distance between the satellite and the receiver and the signal delay.


3. Send to the output (t) the calculated delay.




float *out = (float*)output_items[0];
const float *inx = (const float *) input_items[0];
const float *iny = (const float *) input_items[1];
const float *inz = (const float *) input_items[2];
const float *inTOW = (const float *) input_items[3];



for(int i=0;inoutput_items;++i){
...
...
}











 Reloj:

*Precision = tiempo inicial
**Tasa = sample rate



++

namespace gr {
  namespace howto {

reloj_ff::sptr
reloj_ff::make(int tasa, int precision)
{
  return gnuradio::get_initial_sptr
(new reloj_ff_impl(tasa, precision));
}

/*
 * The private constructor
 */
reloj_ff_impl::reloj_ff_impl(int tasa, int precision)
  : gr::block(reloj_ff,
   gr::io_signature::make(1,1,sizeof(float)),
   gr::io_signature::make(1, 1, sizeof(float)))
{
this-d_tasa=tasa;
this-d_precision=(float)precision;
this-posicion=0;
}

/*
 * Our virtual destructor.
 */
reloj_ff_impl::~reloj_ff_impl()
{
}

void
reloj_ff_impl::forecast (int noutput_items, gr_vector_int 
ninput_items_required)

{
ninput_items_required[0] = noutput_items;
}

int
reloj_ff_impl::general_work (int noutput_items,
   gr_vector_int ninput_items,
   gr_vector_const_void_star input_items,
   gr_vector_void_star output_items)
{
float *out = (float*)output_items[0];
const float *in = (const float *) input_items[0];

for(int i=0;inoutput_items;++i){
if(posicion!=d_tasa){
out[i]=d_precision;
++posicion;
}
else{
d_precision=d_precision+1;
posicion=0;
out[i]=d_precision;
}
}

return noutput_items;
}

  } /* namespace howto */
} /* namespace gr */





++





#ifndef INCLUDED_HOWTO_RELOJ_FF_IMPL_H
#define INCLUDED_HOWTO_RELOJ_FF_IMPL_H

#include howto/reloj_ff.h

namespace gr {
  namespace howto {

class reloj_ff_impl : public reloj_ff
{
 private:
  // Nothing to declare in this block.

 public:
  reloj_ff_impl(int tasa, int precision);
  ~reloj_ff_impl();

int d_tasa;
float d_precision;
int posicion;

  // Where all the action really happens
  void forecast (int noutput_items, gr_vector_int 
ninput_items_required);


  int general_work(int noutput_items,
   gr_vector_int ninput_items,
   gr_vector_const_void_star input_items,
   gr_vector_void_star output_items);
};

  } // namespace howto
} // namespace gr

#endif /* INCLUDED_HOWTO_RELOJ_FF_IMPL_H */





;)



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