free(fsk);
return NULL;
}
+ fsk->normalise_eye = 1;
return fsk;
}
free(fsk);
return NULL;
}
+ fsk->normalise_eye = 1;
return fsk;
}
}
}
- eye_max = 0;
- /* Normalize eye to +/- 1 */
- for(i=0; i<M*eye_traces; i++)
- for(j=0; j<neyesamp; j++)
- if(fabsf(fsk->stats->rx_eye[i][j])>eye_max)
- eye_max = fabsf(fsk->stats->rx_eye[i][j]);
-
- for(i=0; i<M*eye_traces; i++)
- for(j=0; j<neyesamp; j++)
- fsk->stats->rx_eye[i][j] = fsk->stats->rx_eye[i][j]/eye_max;
+ if (fsk->normalise_eye) {
+ eye_max = 0;
+ /* Normalize eye to +/- 1 */
+ for(i=0; i<M*eye_traces; i++)
+ for(j=0; j<neyesamp; j++)
+ if(fabsf(fsk->stats->rx_eye[i][j])>eye_max)
+ eye_max = fabsf(fsk->stats->rx_eye[i][j]);
+ for(i=0; i<M*eye_traces; i++)
+ for(j=0; j<neyesamp; j++)
+ fsk->stats->rx_eye[i][j] = fsk->stats->rx_eye[i][j]/eye_max;
+ }
+
fsk->stats->nr = 0;
fsk->stats->Nc = 0;
}
-
+void fsk_stats_normalise_eye(struct FSK *fsk, int normalise_enable) {
+ fsk->normalise_eye = normalise_enable;
+}
/* modem statistic struct */
struct MODEM_STATS *stats;
+ int normalise_eye; /* enables/disables normalisation of eye diagram */
};
/*
*/
void fsk_demod_sd(struct FSK *fsk, float rx_bits[],COMP fsk_in[]);
+/* enables/disables normalisation of eye diagram samples */
+
+void fsk_stats_normalise_eye(struct FSK *fsk, int normalise_enable);
+
#endif