From a10a6ac24972674ac93ce154d2d0c77b3487adab Mon Sep 17 00:00:00 2001 From: cnlohr Date: Sat, 21 Jan 2017 23:07:07 -0500 Subject: Update plantetest2 to what I was using. --- tools/planetest2/Makefile | 2 +- tools/planetest2/camfind.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'tools') diff --git a/tools/planetest2/Makefile b/tools/planetest2/Makefile index b48b099..059e1ee 100644 --- a/tools/planetest2/Makefile +++ b/tools/planetest2/Makefile @@ -1,6 +1,6 @@ all : camfind -CFLAGS:=-g -O4 -DFLT=float -I../../redist -flto +CFLAGS:=-g -O1 -DFLT=double -I../../redist -flto LDFLAGS:=$(CFLAGS) -lm camfind : camfind.o ../../redist/linmath.c diff --git a/tools/planetest2/camfind.c b/tools/planetest2/camfind.c index ff444fa..90aea29 100644 --- a/tools/planetest2/camfind.c +++ b/tools/planetest2/camfind.c @@ -6,7 +6,7 @@ #include #define PTS 32 -#define MAX_CHECKS 40000 +#define MAX_CHECKS 400000 #define MIN_HITS_FOR_VALID 10 FLT hmd_points[PTS*3]; @@ -336,13 +336,13 @@ int LoadData( char Camera ) int calpts[MAX_CHECKS*4]; //X (0) or Y (1), ID, offset int calptscount; - FILE * f = fopen( "correct_hmd_points.csv", "r" ); + FILE * f = fopen( "HMD_points.csv", "r" ); int pt = 0; if( !f ) { fprintf( stderr, "error: can't open hmd points.\n" ); return -5; } while(!feof(f) && !ferror(f) && pt < PTS) { float fa, fb, fc; - int r = fscanf( f,"%g,%g,%g\n", &fa, &fb, &fc ); + int r = fscanf( f,"%g %g %g\n", &fa, &fb, &fc ); hmd_points[pt*3+0] = fa; hmd_points[pt*3+1] = fb; hmd_points[pt*3+2] = fc; @@ -362,13 +362,13 @@ int LoadData( char Camera ) printf( "Loaded %d points\n", pt ); - f = fopen( "hmd_normals.csv", "r" ); + f = fopen( "HMD_normals.csv", "r" ); int nrm = 0; if( !f ) { fprintf( stderr, "error: can't open hmd points.\n" ); return -5; } while(!feof(f) && !ferror(f) && nrm < PTS) { float fa, fb, fc; - int r = fscanf( f,"%g,%g,%g\n", &fa, &fb, &fc ); + int r = fscanf( f,"%g %g %g\n", &fa, &fb, &fc ); hmd_norms[nrm*3+0] = fa; hmd_norms[nrm*3+1] = fb; hmd_norms[nrm*3+2] = fc; @@ -394,7 +394,7 @@ int LoadData( char Camera ) int xck = 0; - f = fopen( "livestream_test_2_x_axis.csv", "r" ); + f = fopen( "find_lighthouses_with_watchmen.csv", "r" ); if( !f ) { fprintf( stderr, "Error: can't open two lighthouses test data.\n" ); return -11; } while( !feof(f) && !ferror(f) ) { -- cgit v1.2.3