aboutsummaryrefslogtreecommitdiff
path: root/src/survive_cal.c
diff options
context:
space:
mode:
authorcnlohr <lohr85@gmail.com>2017-03-18 15:20:30 -0400
committercnlohr <lohr85@gmail.com>2017-03-18 15:20:30 -0400
commit91a6bb98e0531bda74efc682223de14a1787fede (patch)
treec97e1ac4d90a08df77b6a1a006584d3cfbaf131d /src/survive_cal.c
parentf976a532970afecce640ddfba88a6f1b04ab34b8 (diff)
downloadlibsurvive-91a6bb98e0531bda74efc682223de14a1787fede.tar.gz
libsurvive-91a6bb98e0531bda74efc682223de14a1787fede.tar.bz2
Fix histograms
Diffstat (limited to 'src/survive_cal.c')
-rwxr-xr-xsrc/survive_cal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/survive_cal.c b/src/survive_cal.c
index 0eb9446..9dc3af2 100755
--- a/src/survive_cal.c
+++ b/src/survive_cal.c
@@ -272,6 +272,7 @@ void survive_cal_angle( struct SurviveObject * so, int sensor_id, int acode, uin
if( sensors_visible < MIN_SENSORS_VISIBLE_PER_LH_FOR_CAL )
{
//printf( "Dev %d, LH %d not enough visible points found.\n", i, j );
+ reset_calibration( cd );
cd->found_common = 0;
return;
}
@@ -440,7 +441,7 @@ static void handle_calibration( struct SurviveCalData *cd )
FLT stddevlen = 0;
#define HISTOGRAMSIZE 31
- #define HISTOGRAMBINANG 0.00001 //TODO: Tune
+ #define HISTOGRAMBINANG ((3.14159)/400000.0) //TODO: Tune
int histo[HISTOGRAMSIZE];
memset( histo, 0, sizeof( histo ) );