aboutsummaryrefslogtreecommitdiff
path: root/src/survive_cal.h
diff options
context:
space:
mode:
authorcnlohr <lohr85@gmail.com>2017-02-16 18:09:19 -0500
committercnlohr <lohr85@gmail.com>2017-02-16 18:09:19 -0500
commit9bba1f9e7888f512a587f76179b9dd8f389c7ae8 (patch)
tree1960c57e9caff29bd23dd5fca3b6cc91bac28168 /src/survive_cal.h
parent32fbccbd7d90f1e456d1e477eab2128aaf88df93 (diff)
downloadlibsurvive-9bba1f9e7888f512a587f76179b9dd8f389c7ae8.tar.gz
libsurvive-9bba1f9e7888f512a587f76179b9dd8f389c7ae8.tar.bz2
Start collecting data. Getting closer to having a full cal stack.
Diffstat (limited to 'src/survive_cal.h')
-rw-r--r--src/survive_cal.h15
1 files changed, 13 insertions, 2 deletions
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