aboutsummaryrefslogtreecommitdiff
path: root/src/survive_process.c
diff options
context:
space:
mode:
authorJustin Berger <j.david.berger@gmail.com>2018-03-29 16:11:15 -0600
committerJustin Berger <j.david.berger@gmail.com>2018-03-29 16:11:15 -0600
commit033111aa59de4a0277308efbc4405dd96c26f8f8 (patch)
tree120546eab0257eabd18edfba970c0b46feb05c21 /src/survive_process.c
parentba4b64e3c7df19356ff867533b47257932df691f (diff)
downloadlibsurvive-033111aa59de4a0277308efbc4405dd96c26f8f8.tar.gz
libsurvive-033111aa59de4a0277308efbc4405dd96c26f8f8.tar.bz2
Added config value to disable attempts at calibration
Diffstat (limited to 'src/survive_process.c')
-rw-r--r--src/survive_process.c18
1 files changed, 11 insertions, 7 deletions
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);