From a2eef0e9d90a196f86dece20c6346c55af3bdbc0 Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Mon, 26 Mar 2018 16:47:11 -0600 Subject: Made SBA and EPNP follow availableLighthouses --- src/survive_process.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/survive_process.c') diff --git a/src/survive_process.c b/src/survive_process.c index 6136148..ad7ce97 100644 --- a/src/survive_process.c +++ b/src/survive_process.c @@ -80,7 +80,9 @@ void survive_default_angle_process( SurviveObject * so, int sensor_id, int acode .lh = lh, }; - SurviveSensorActivations_add(&so->activations, &l); + // Simulate the use of only one lighthouse in playback mode. + if (lh < ctx->activeLighthouses) + SurviveSensorActivations_add(&so->activations, &l); survive_recording_angle_process(so, sensor_id, acode, timecode, length, angle, lh); -- cgit v1.2.3 From 033111aa59de4a0277308efbc4405dd96c26f8f8 Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Thu, 29 Mar 2018 16:11:15 -0600 Subject: Added config value to disable attempts at calibration --- src/survive_process.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/survive_process.c') diff --git a/src/survive_process.c b/src/survive_process.c index ad7ce97..97fbc46 100644 --- a/src/survive_process.c +++ b/src/survive_process.c @@ -48,15 +48,19 @@ void survive_default_light_process( SurviveObject * so, int sensor_id, int acode FLT angle = (timeinsweep - so->timecenter_ticks) * (1./so->timecenter_ticks * 3.14159265359/2.0); //Need to now do angle correction. -#if 1 - BaseStationData * bsd = &ctx->bsd[base_station]; + static int use_bsd_cal = -1; + if(use_bsd_cal == -1) { + use_bsd_cal = survive_configi(ctx, "use-bsd-cal", SC_GET, 1); + } + if(use_bsd_cal) { + BaseStationData * bsd = &ctx->bsd[base_station]; - //XXX TODO: This seriously needs to be worked on. See: https://github.com/cnlohr/libsurvive/issues/18 - angle += bsd->fcalphase[axis]; -// angle += bsd->fcaltilt[axis] * predicted_angle(axis1); + //XXX TODO: This seriously needs to be worked on. See: https://github.com/cnlohr/libsurvive/issues/18 + angle += bsd->fcalphase[axis]; + // angle += bsd->fcaltilt[axis] * predicted_angle(axis1); - //TODO!!! -#endif + //TODO!!! + } FLT length_sec = length / (FLT)so->timebase_hz; ctx->angleproc( so, sensor_id, acode, timecode, length_sec, angle, lh); -- cgit v1.2.3 From 22d40fb360fdb65da7916fb87f9b199f4f401f05 Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Sun, 1 Apr 2018 07:52:00 -0600 Subject: overhal to calibration --- src/survive_process.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/survive_process.c') diff --git a/src/survive_process.c b/src/survive_process.c index 97fbc46..62459f2 100644 --- a/src/survive_process.c +++ b/src/survive_process.c @@ -51,14 +51,17 @@ void survive_default_light_process( SurviveObject * so, int sensor_id, int acode static int use_bsd_cal = -1; if(use_bsd_cal == -1) { use_bsd_cal = survive_configi(ctx, "use-bsd-cal", SC_GET, 1); + if (use_bsd_cal == 0) { + SV_INFO("Not using BSD calibration values"); + } } if(use_bsd_cal) { BaseStationData * bsd = &ctx->bsd[base_station]; - //XXX TODO: This seriously needs to be worked on. See: https://github.com/cnlohr/libsurvive/issues/18 - angle += bsd->fcalphase[axis]; + // XXX TODO: This seriously needs to be worked on. See: https://github.com/cnlohr/libsurvive/issues/18 + // angle += (use_bsd_cal == 2 ? -1 : 1) * bsd->fcal.phase[axis]; // angle += bsd->fcaltilt[axis] * predicted_angle(axis1); - + //TODO!!! } -- cgit v1.2.3