From 5a11716edeb85bc01c38bfc4ce174d101cac0a06 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Tue, 21 Feb 2017 01:59:08 -0500 Subject: Working on it, not quite tested. --- src/survive_cal.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/survive_cal.h') diff --git a/src/survive_cal.h b/src/survive_cal.h index 42ff1ee..dd69b57 100644 --- a/src/survive_cal.h +++ b/src/survive_cal.h @@ -30,20 +30,22 @@ 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 MAX_SENSORS_TO_CAL 96 #define DRPTS 512 struct SurviveCalData { + struct SurviveContext * ctx; //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]; + FLT all_lengths[MAX_SENSORS_TO_CAL][NUM_LIGHTHOUSES][2][DRPTS]; + FLT all_angles[MAX_SENSORS_TO_CAL][NUM_LIGHTHOUSES][2][DRPTS]; + int16_t all_counts[MAX_SENSORS_TO_CAL][NUM_LIGHTHOUSES][2]; int16_t peak_counts; int8_t found_common; + int8_t times_found_common; //Stage: // 0: Idle -- cgit v1.2.3 From 93873b616394b24fefb0ce17ae0e302ff2697d14 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Tue, 21 Feb 2017 02:54:42 -0500 Subject: making progress --- src/survive_cal.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/survive_cal.h') diff --git a/src/survive_cal.h b/src/survive_cal.h index dd69b57..bf6161d 100644 --- a/src/survive_cal.h +++ b/src/survive_cal.h @@ -32,14 +32,14 @@ void survive_cal_angle( struct SurviveObject * so, int sensor_id, int acode, uin #define MAX_SENSORS_TO_CAL 96 #define DRPTS 512 - +#define MAX_CAL_PT_DAT (MAX_SENSORS_TO_CAL*NUM_LIGHTHOUSES*2) struct SurviveCalData { struct SurviveContext * ctx; //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. + //For statistics-gathering phase. (Stage 2/3) FLT all_lengths[MAX_SENSORS_TO_CAL][NUM_LIGHTHOUSES][2][DRPTS]; FLT all_angles[MAX_SENSORS_TO_CAL][NUM_LIGHTHOUSES][2][DRPTS]; int16_t all_counts[MAX_SENSORS_TO_CAL][NUM_LIGHTHOUSES][2]; @@ -47,6 +47,15 @@ struct SurviveCalData int8_t found_common; int8_t times_found_common; + //For camfind (4+) + FLT avgsweeps[MAX_CAL_PT_DAT]; + FLT avglens[MAX_CAL_PT_DAT]; + FLT stdsweeps[MAX_CAL_PT_DAT]; + FLT stdlens[MAX_CAL_PT_DAT]; + int ctsweeps[MAX_CAL_PT_DAT]; + + int senid_of_checkpt; //This is a point on a watchman that can be used to check the lh solution. + //Stage: // 0: Idle // 1: Collecting OOTX data. @@ -54,6 +63,10 @@ struct SurviveCalData }; +//The following function is not included in the core survive_cal and must be compiled from a camfind file. +//It should use data for stage 4 and report if it found the +int survive_cal_lhfind( struct SurviveCalData * cd ); + #endif -- cgit v1.2.3 From f92f5dc93cbb53a99da51984541a7e4a70605639 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Sat, 25 Feb 2017 13:29:07 -0500 Subject: Update files, working lhfind whithin libsurvive. --- src/survive_cal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/survive_cal.h') diff --git a/src/survive_cal.h b/src/survive_cal.h index bf6161d..0a772f1 100644 --- a/src/survive_cal.h +++ b/src/survive_cal.h @@ -31,7 +31,7 @@ void survive_cal_light( struct SurviveObject * so, int sensor_id, int acode, int void survive_cal_angle( struct SurviveObject * so, int sensor_id, int acode, uint32_t timecode, FLT length, FLT angle ); #define MAX_SENSORS_TO_CAL 96 -#define DRPTS 512 +#define DRPTS 1024 #define MAX_CAL_PT_DAT (MAX_SENSORS_TO_CAL*NUM_LIGHTHOUSES*2) struct SurviveCalData { @@ -48,6 +48,7 @@ struct SurviveCalData int8_t times_found_common; //For camfind (4+) + //Index is calculated with: int dataindex = sen*(2*NUM_LIGHTHOUSES)+lh*2+axis; FLT avgsweeps[MAX_CAL_PT_DAT]; FLT avglens[MAX_CAL_PT_DAT]; FLT stdsweeps[MAX_CAL_PT_DAT]; -- cgit v1.2.3 From 55cedfc6a6b035d6eb54457782818fef61cae500 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Sat, 25 Feb 2017 23:52:48 -0500 Subject: Huge shift: Put HTC vive into its own file, to free up the rest of the system for libsurvive. --- src/survive_cal.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/survive_cal.h') diff --git a/src/survive_cal.h b/src/survive_cal.h index 0a772f1..bb4eb32 100644 --- a/src/survive_cal.h +++ b/src/survive_cal.h @@ -57,6 +57,8 @@ struct SurviveCalData int senid_of_checkpt; //This is a point on a watchman that can be used to check the lh solution. + struct SurviveObject * hmd; + //Stage: // 0: Idle // 1: Collecting OOTX data. -- cgit v1.2.3