Example Daimler .bog reader
- Author
- Jan Woetzel
#include <Base/Common/BIASpragma.hh>
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <Base/Math/BogIO.hh>
#include <Base/Math/Vector3.hh>
#include <Base/Geometry/KMatrix.hh>
#include <Geometry/PMatrix.hh>
#include <Geometry/RMatrix.hh>
using namespace std;
using namespace BIAS;
int main(int argc, char** argv){
cout<<"started "<<argv[0]<<endl;
#ifdef BIAS_TESTS_DATA
string filename(BIAS_TESTS_DATA "calib01.bog");
#else
string filename("calib01.bog");
cout<<"BIAS_TESTS_DATA not defined."<<endl;
return -1;
#endif
if (argc>1) filename=argv[1];
cout<<"using filename "<<filename<<endl;
int result=0;
if (0!=P.
LoadBOG(filename))
return -2;
cout<<"P: "<<P<<endl;
P.
Save(
"out_ExampleLoadBOGP.P");
cout<<"bog.K: "<<K<<endl;
cout<<
"P.K : "<<P.
GetK()<<endl;
cout<<"bog.R: "<<R<<endl;
cout<<
"P.R : "<<P.
GetR()<<endl;
double angle=0;
cout<<"P.angle="<<angle<<" axis="<<axis<<endl;
cout<<"bog.C: "<<C<<endl;
cout<<
"P.C : "<<P.
GetC()<<endl;
return result;
}