diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 57960dd..c1d2a27 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -23,6 +23,7 @@ bool seenutm=false; bool seenpva=false; bool seencov=false; +double feature_noise,view_noise,initial_view_noise,reflection_view_noise; using std::cout; using std::endl; using std::cerr; @@ -418,8 +419,8 @@ update_dt(const timestamp t, timestamp *t_old) int main(int argc, char **argv) { - if (argc!=2) { - fprintf(stderr, "Usage: %s camera\n", argv[0]); + if (argc!=3) { + fprintf(stderr, "Usage: %s camera params\n", argv[0]); exit(1); } State mu; @@ -448,6 +449,14 @@ main(int argc, char **argv) printf("UTM-Zone,UTM-Ch,UTM-North,UTM-East,Altitude,Vel-X,Vel-Y,Vel-Z,Bias-X,Bias-Y,Bias-Z,Nfeats\n"); #endif #endif /* ----- not ROS_PUBLISH ----- */ + // read params file + FILE *pfin; + pfin = fopen(argv[2], "r"); + fscanf(pfin,"%lf",&feature_noise); + fscanf(pfin,"%lf",&view_noise); + fscanf(pfin,"%lf",&initial_view_noise); + fscanf(pfin,"%lf",&reflection_view_noise); + fclose(pfin); // Read sensors from file int i=0; char line[MAXLINE]; |