From 9bba1f9e7888f512a587f76179b9dd8f389c7ae8 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Thu, 16 Feb 2017 18:09:19 -0500 Subject: Start collecting data. Getting closer to having a full cal stack. --- src/survive_cal.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/survive_cal.h') diff --git a/src/survive_cal.h b/src/survive_cal.h index 6653a84..b9d4b11 100644 --- a/src/survive_cal.h +++ b/src/survive_cal.h @@ -22,7 +22,7 @@ #include "survive_internal.h" void survive_cal_install( struct SurviveContext * ctx ); -int survive_cal_get_status( struct SurviveContext * ctx, char * description, int max_data ); +int survive_cal_get_status( struct SurviveContext * ctx, char * description, int description_length ); //void survive_cal_teardown( struct SurviveContext * ctx ); @@ -30,6 +30,9 @@ int survive_cal_get_status( struct SurviveContext * ctx, char * description, int void survive_cal_light( struct SurviveObject * so, int sensor_id, int acode, int timeinsweep, uint32_t timecode, uint32_t length ); void survive_cal_angle( struct SurviveObject * so, int sensor_id, int acode, uint32_t timecode, FLT length, FLT angle ); +#define MAX_TO_CAL 96 +#define DRPTS 512 + struct SurviveCalData { //Stage: @@ -37,9 +40,17 @@ struct SurviveCalData // 1: Collecting OOTX data. int stage; - //OOTX Data is sync'd off of + //OOTX Data is sync'd off of the sync pulses coming from the lighthouses. ootx_decoder_context ootx_decoders[NUM_LIGHTHOUSES]; + + //For statistics-gathering phase. + FLT all_lengths[MAX_TO_CAL][NUM_LIGHTHOUSES][2][DRPTS]; + FLT all_angles[MAX_TO_CAL][NUM_LIGHTHOUSES][2][DRPTS]; + int16_t all_counts[MAX_TO_CAL][NUM_LIGHTHOUSES][2]; + int peak_counts; }; + + #endif -- cgit v1.2.3