diff options
author | cnlohr <lohr85@gmail.com> | 2017-01-24 00:58:48 -0500 |
---|---|---|
committer | cnlohr <lohr85@gmail.com> | 2017-01-24 00:58:48 -0500 |
commit | ba09a549968e79afc625bd1905af7dc5692b7439 (patch) | |
tree | 63b7c16303eac565bc640dc6d339b37008217397 | |
parent | 868619e659518aec41b2092ed4050dbb9339130f (diff) | |
download | libsurvive-ba09a549968e79afc625bd1905af7dc5692b7439.tar.gz libsurvive-ba09a549968e79afc625bd1905af7dc5692b7439.tar.bz2 |
Improve data processor
-rw-r--r-- | tools/process_rawcap/process_to_points.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/process_rawcap/process_to_points.c b/tools/process_rawcap/process_to_points.c index 8a48bae..ba6a9c0 100644 --- a/tools/process_rawcap/process_to_points.c +++ b/tools/process_rawcap/process_to_points.c @@ -124,6 +124,7 @@ int main( int argc, char ** argv ) #define MAX_LENTIME 200000 //800000/4 #define MAX_PERMISSABLE_TO_PEAK 40 + int cullcount = 0; int biggesttime = 0; int biggesttimeplace = -1; @@ -156,6 +157,7 @@ int main( int argc, char ** argv ) if( dist_to_peak > MAX_PERMISSABLE_TO_PEAK || dist_to_peak < -MAX_PERMISSABLE_TO_PEAK ) { DATASWEEP[dev][sen][swe][i] = -1; + cullcount++; continue; } @@ -199,12 +201,18 @@ int main( int argc, char ** argv ) histo[llm]++; } + if( cullcount > 100 ) + { + fprintf( stderr, "WARNING: %s%s%02d has %d out-of-window hits broken disambiguator?\n", Devices[dev], DevMap[swe], sen, cullcount ); + continue; + } + stddevtim /= count; stddevlen /= count; if( stddevtim > 55 ) { - fprintf( stderr, "Warning: %s%s%02d dropped because stddev (%f) was too high.\n", Devices[dev], DevMap[swe], sen, stddevtim ); + fprintf( stderr, "DROPPED: %s%s%02d dropped because stddev (%f) was too high.\n", Devices[dev], DevMap[swe], sen, stddevtim ); continue; } |