My lousy typing has messed me up again...
Ignore previous attachment
diff -ruN freetel-code-orig/codec2-dev/src/fdmdv.c
freetel-code-new/codec2-dev/src/fdmdv.c
--- freetel-code-orig/codec2-dev/src/fdmdv.c 2014-11-17 08:50:17.912563270
-0600
+++ freetel-code-new/codec2-dev/src/fdmdv.c 2014-11-17 10:20:41.104403032
-0600
@@ -666,8 +666,8 @@
\*---------------------------------------------------------------------------*/
-void generate_pilot_fdm(COMP *pilot_fdm, int *bit, float *symbol,
- float *filter_mem, COMP *phase, COMP *freq)
+void generate_pilot_fdm(COMP *pilot_fdm, int *bit, char *symbol,
+ char *filter_mem, COMP *phase, COMP *freq)
{
int i,j,k;
float tx_baseband[M];
@@ -675,17 +675,13 @@
/* +1 -1 +1 -1 DBPSK sync carrier, once filtered becomes (roughly)
two spectral lines at +/- RS/2 */
- if (*bit)
- *symbol = -*symbol;
-
- if (*bit)
- *bit = 0;
- else
- *bit = 1;
+ *symbol = (*bit) ? -*symbol : *symbol;
+ *bit = !*bit;
/* filter DPSK symbol to create M baseband samples */
- filter_mem[NFILTER-1] = (sqrtf(2)/2) * *symbol;
+ filter_mem[NFILTER-1] = *symbol;
+
for(i=0; i<M; i++) {
tx_baseband[i] = 0.0;
for(j=M-1,k=M-i-1; j<NFILTER; j+=M,k+=M)
@@ -698,7 +694,7 @@
filter_mem[i] = filter_mem[i+M];
for(i=NFILTER-M; i<NFILTER; i++)
- filter_mem[i] = 0.0;
+ filter_mem[i] = 0;
/* upconvert */
@@ -723,15 +719,15 @@
void generate_pilot_lut(COMP pilot_lut[], COMP *pilot_freq)
{
- int pilot_rx_bit = 0;
- float pilot_symbol = sqrtf(2.0);
COMP pilot_phase = {1.0, 0.0};
- float pilot_filter_mem[NFILTER];
COMP pilot[M];
- int i,f;
+ int pilot_rx_bit = 0;
+ int i, f;
+ char pilot_symbol = 1;
+ char pilot_filter_mem[NFILTER];
for(i=0; i<NFILTER; i++)
- pilot_filter_mem[i] = 0.0;
+ pilot_filter_mem[i] = 0;
/* discard first 4 symbols as filter memory is filling, just keep
last four symbols */
diff -ruN freetel-code-orig/codec2-dev/src/fdmdv_internal.h
freetel-code-new/codec2-dev/src/fdmdv_internal.h
--- freetel-code-orig/codec2-dev/src/fdmdv_internal.h 2014-11-17
08:50:16.888563300 -0600
+++ freetel-code-new/codec2-dev/src/fdmdv_internal.h 2014-11-17
10:25:16.212394904 -0600
@@ -170,7 +170,7 @@
void tx_filter_and_upconvert(COMP tx_fdm[], int Nc, COMP tx_symbols[],
COMP tx_filter_memory[NC+1][NSYM],
COMP phase_tx[], COMP freq[], COMP *fbb_phase,
COMP fbb_rect);
-void generate_pilot_fdm(COMP *pilot_fdm, int *bit, float *symbol, float
*filter_mem, COMP *phase, COMP *freq);
+void generate_pilot_fdm(COMP *pilot_fdm, int *bit, char *symbol, char
*filter_mem, COMP *phase, COMP *freq);
void generate_pilot_lut(COMP pilot_lut[], COMP *pilot_freq);
float rx_est_freq_offset(struct FDMDV *f, COMP rx_fdm[], int nin, int do_fft);
void lpf_peak_pick(float *foff, float *max, COMP pilot_baseband[], COMP
pilot_lpf[], kiss_fft_cfg fft_pilot_cfg, COMP S[], int nin, int do_fft);
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Freetel-codec2 mailing list
Freetel-codec2@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freetel-codec2