summaryrefslogtreecommitdiff
path: root/gr-noaa/lib
diff options
context:
space:
mode:
Diffstat (limited to 'gr-noaa/lib')
-rw-r--r--gr-noaa/lib/Makefile.am8
-rw-r--r--gr-noaa/lib/noaa_hrpt_pll_cf.cc (renamed from gr-noaa/lib/noaa_hrpt_pll_cc.cc)24
-rw-r--r--gr-noaa/lib/noaa_hrpt_pll_cf.h (renamed from gr-noaa/lib/noaa_hrpt_pll_cc.h)20
-rw-r--r--gr-noaa/lib/noaa_hrpt_sync_ff.cc (renamed from gr-noaa/lib/noaa_hrpt_sync_cc.cc)32
-rw-r--r--gr-noaa/lib/noaa_hrpt_sync_ff.h (renamed from gr-noaa/lib/noaa_hrpt_sync_cc.h)20
5 files changed, 52 insertions, 52 deletions
diff --git a/gr-noaa/lib/Makefile.am b/gr-noaa/lib/Makefile.am
index 2690ddb54..913638783 100644
--- a/gr-noaa/lib/Makefile.am
+++ b/gr-noaa/lib/Makefile.am
@@ -29,8 +29,8 @@ lib_LTLIBRARIES = \
libgnuradio-noaa.la
libgnuradio_noaa_la_SOURCES = \
- noaa_hrpt_pll_cc.cc \
- noaa_hrpt_sync_cc.cc
+ noaa_hrpt_pll_cf.cc \
+ noaa_hrpt_sync_ff.cc
libgnuradio_noaa_la_LIBADD = \
$(GNURADIO_CORE_LA)
@@ -38,5 +38,5 @@ libgnuradio_noaa_la_LIBADD = \
libgnuradio_noaa_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0
grinclude_HEADERS = \
- noaa_hrpt_pll_cc.h \
- noaa_hrpt_sync_cc.h
+ noaa_hrpt_pll_cf.h \
+ noaa_hrpt_sync_ff.h
diff --git a/gr-noaa/lib/noaa_hrpt_pll_cc.cc b/gr-noaa/lib/noaa_hrpt_pll_cf.cc
index 46fe24da4..08ab1d15f 100644
--- a/gr-noaa/lib/noaa_hrpt_pll_cc.cc
+++ b/gr-noaa/lib/noaa_hrpt_pll_cf.cc
@@ -24,23 +24,23 @@
#include "config.h"
#endif
-#include <noaa_hrpt_pll_cc.h>
+#include <noaa_hrpt_pll_cf.h>
#include <gr_io_signature.h>
#include <gr_math.h>
#include <gr_sincos.h>
#define M_TWOPI (2*M_PI)
-noaa_hrpt_pll_cc_sptr
-noaa_make_hrpt_pll_cc(float alpha, float beta, float max_offset)
+noaa_hrpt_pll_cf_sptr
+noaa_make_hrpt_pll_cf(float alpha, float beta, float max_offset)
{
- return gnuradio::get_initial_sptr(new noaa_hrpt_pll_cc(alpha, beta, max_offset));
+ return gnuradio::get_initial_sptr(new noaa_hrpt_pll_cf(alpha, beta, max_offset));
}
-noaa_hrpt_pll_cc::noaa_hrpt_pll_cc(float alpha, float beta, float max_offset)
- : gr_sync_block("noaa_hrpt_pll_cc",
+noaa_hrpt_pll_cf::noaa_hrpt_pll_cf(float alpha, float beta, float max_offset)
+ : gr_sync_block("noaa_hrpt_pll_cf",
gr_make_io_signature(1, 1, sizeof(gr_complex)),
- gr_make_io_signature(1, 1, sizeof(gr_complex))),
+ gr_make_io_signature(1, 1, sizeof(float))),
d_alpha(alpha), d_beta(beta), d_max_offset(max_offset),
d_phase(0.0), d_freq(0.0)
{
@@ -58,12 +58,12 @@ phase_wrap(float phase)
}
int
-noaa_hrpt_pll_cc::work(int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items)
+noaa_hrpt_pll_cf::work(int noutput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
{
const gr_complex *in = (const gr_complex *) input_items[0];
- gr_complex *out = (gr_complex *) output_items[0];
+ float *out = (float *) output_items[0];
for (int i = 0; i < noutput_items; i++) {
@@ -75,7 +75,7 @@ noaa_hrpt_pll_cc::work(int noutput_items,
// Generate and mix out carrier
float re, im;
gr_sincosf(d_phase, &im, &re);
- out[i] = in[i]*gr_complex(re, -im);
+ out[i] = (in[i]*gr_complex(re, -im)).imag();
}
return noutput_items;
diff --git a/gr-noaa/lib/noaa_hrpt_pll_cc.h b/gr-noaa/lib/noaa_hrpt_pll_cf.h
index 810454406..507d47fe7 100644
--- a/gr-noaa/lib/noaa_hrpt_pll_cc.h
+++ b/gr-noaa/lib/noaa_hrpt_pll_cf.h
@@ -20,21 +20,21 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef INCLUDED_NOAA_HRPT_PLL_CC_H
-#define INCLUDED_NOAA_HRPT_PLL_CC_H
+#ifndef INCLUDED_NOAA_HRPT_PLL_CF_H
+#define INCLUDED_NOAA_HRPT_PLL_CF_H
#include <gr_sync_block.h>
-class noaa_hrpt_pll_cc;
-typedef boost::shared_ptr<noaa_hrpt_pll_cc> noaa_hrpt_pll_cc_sptr;
+class noaa_hrpt_pll_cf;
+typedef boost::shared_ptr<noaa_hrpt_pll_cf> noaa_hrpt_pll_cf_sptr;
-noaa_hrpt_pll_cc_sptr
-noaa_make_hrpt_pll_cc(float alpha, float beta, float max_offset);
+noaa_hrpt_pll_cf_sptr
+noaa_make_hrpt_pll_cf(float alpha, float beta, float max_offset);
-class noaa_hrpt_pll_cc : public gr_sync_block
+class noaa_hrpt_pll_cf : public gr_sync_block
{
- friend noaa_hrpt_pll_cc_sptr noaa_make_hrpt_pll_cc(float alpha, float beta, float max_offset);
- noaa_hrpt_pll_cc(float alpha, float beta, float max_offset);
+ friend noaa_hrpt_pll_cf_sptr noaa_make_hrpt_pll_cf(float alpha, float beta, float max_offset);
+ noaa_hrpt_pll_cf(float alpha, float beta, float max_offset);
float d_alpha; // 1st order loop constant
float d_beta; // 2nd order loop constant
@@ -52,4 +52,4 @@ class noaa_hrpt_pll_cc : public gr_sync_block
void set_max_offset(float max_offset) { d_max_offset = max_offset; }
};
-#endif /* INCLUDED_NOAA_HRPT_PLL_CC_H */
+#endif /* INCLUDED_NOAA_HRPT_PLL_CF_H */
diff --git a/gr-noaa/lib/noaa_hrpt_sync_cc.cc b/gr-noaa/lib/noaa_hrpt_sync_ff.cc
index 46cc277bd..f17ad54dc 100644
--- a/gr-noaa/lib/noaa_hrpt_sync_cc.cc
+++ b/gr-noaa/lib/noaa_hrpt_sync_ff.cc
@@ -24,7 +24,7 @@
#include "config.h"
#endif
-#include <noaa_hrpt_sync_cc.h>
+#include <noaa_hrpt_sync_ff.h>
#include <gr_io_signature.h>
inline int signum(float f)
@@ -32,16 +32,16 @@ inline int signum(float f)
return f >= 0.0 ? 1 : -1;
}
-noaa_hrpt_sync_cc_sptr
-noaa_make_hrpt_sync_cc(float alpha, float beta, float sps, float max_offset)
+noaa_hrpt_sync_ff_sptr
+noaa_make_hrpt_sync_ff(float alpha, float beta, float sps, float max_offset)
{
- return gnuradio::get_initial_sptr(new noaa_hrpt_sync_cc(alpha, beta, sps, max_offset));
+ return gnuradio::get_initial_sptr(new noaa_hrpt_sync_ff(alpha, beta, sps, max_offset));
}
-noaa_hrpt_sync_cc::noaa_hrpt_sync_cc(float alpha, float beta, float sps, float max_offset)
- : gr_block("noaa_hrpt_sync_cc",
- gr_make_io_signature(1, 1, sizeof(gr_complex)),
- gr_make_io_signature(1, 1, sizeof(gr_complex))),
+noaa_hrpt_sync_ff::noaa_hrpt_sync_ff(float alpha, float beta, float sps, float max_offset)
+ : gr_block("noaa_hrpt_sync_ff",
+ gr_make_io_signature(1, 1, sizeof(float)),
+ gr_make_io_signature(1, 1, sizeof(float))),
d_alpha(alpha), d_beta(beta),
d_sps(sps), d_max_offset(max_offset),
d_phase(0.0), d_freq(1.0/sps),
@@ -50,18 +50,18 @@ noaa_hrpt_sync_cc::noaa_hrpt_sync_cc(float alpha, float beta, float sps, float m
}
int
-noaa_hrpt_sync_cc::general_work(int noutput_items,
- gr_vector_int &ninput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items)
+noaa_hrpt_sync_ff::general_work(int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
{
int ninputs = ninput_items[0];
- const gr_complex *in = (const gr_complex *) input_items[0];
- gr_complex *out = (gr_complex *) output_items[0];
+ const float *in = (const float *) input_items[0];
+ float *out = (float *) output_items[0];
int i = 0, j = 0;
while (i < ninputs && j < noutput_items) {
- float sample = in[i++].imag();
+ float sample = in[i++];
int sign = signum(sample);
d_phase += d_freq;
@@ -77,7 +77,7 @@ noaa_hrpt_sync_cc::general_work(int noutput_items,
}
if (d_phase > 1.0) {
- out[j++] = in[i];
+ out[j++] = -sample; // Invert sense, -68 degrees=1
d_phase -= 1.0;
}
}
diff --git a/gr-noaa/lib/noaa_hrpt_sync_cc.h b/gr-noaa/lib/noaa_hrpt_sync_ff.h
index 6abbcad48..51502698b 100644
--- a/gr-noaa/lib/noaa_hrpt_sync_cc.h
+++ b/gr-noaa/lib/noaa_hrpt_sync_ff.h
@@ -20,21 +20,21 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef INCLUDED_NOAA_HRPT_SYNC_CC_H
-#define INCLUDED_NOAA_HRPT_SYNC_CC_H
+#ifndef INCLUDED_NOAA_HRPT_SYNC_FF_H
+#define INCLUDED_NOAA_HRPT_SYNC_FF_H
#include <gr_sync_block.h>
-class noaa_hrpt_sync_cc;
-typedef boost::shared_ptr<noaa_hrpt_sync_cc> noaa_hrpt_sync_cc_sptr;
+class noaa_hrpt_sync_ff;
+typedef boost::shared_ptr<noaa_hrpt_sync_ff> noaa_hrpt_sync_ff_sptr;
-noaa_hrpt_sync_cc_sptr
-noaa_make_hrpt_sync_cc(float alpha, float beta, float sps, float max_offset);
+noaa_hrpt_sync_ff_sptr
+noaa_make_hrpt_sync_ff(float alpha, float beta, float sps, float max_offset);
-class noaa_hrpt_sync_cc : public gr_block
+class noaa_hrpt_sync_ff : public gr_block
{
- friend noaa_hrpt_sync_cc_sptr noaa_make_hrpt_sync_cc(float alpha, float beta, float sps, float max_offset);
- noaa_hrpt_sync_cc(float alpha, float beta, float sps, float max_offset);
+ friend noaa_hrpt_sync_ff_sptr noaa_make_hrpt_sync_ff(float alpha, float beta, float sps, float max_offset);
+ noaa_hrpt_sync_ff(float alpha, float beta, float sps, float max_offset);
float d_alpha; // 1st order loop constant
float d_beta; // 2nd order loop constant
@@ -55,4 +55,4 @@ class noaa_hrpt_sync_cc : public gr_block
void set_max_offset(float max_offset) { d_max_offset = max_offset; }
};
-#endif /* INCLUDED_NOAA_HRPT_SYNC_CC_H */
+#endif /* INCLUDED_NOAA_HRPT_SYNC_FF_H */