This is a test to calculate if the position acquisition is correct
#include <stdio.h>
#include <unistd.h>
#include <iostream>
#include "ctime.h"
cout << "Epos2 Positions:" << endl;
long pos_marker=0,pos_marker_old=0;
CTime tavg;
try{
CTime tbase,telapsed;
int experiment_duration = 10, vel = 1000;
bool primera = true;
cout << "t0\tpos0\tt1\tpos1"<< endl;
do{
telapsed.set();
telapsed = telapsed - tbase;
if (pos_marker != pos_marker_old)
{
telapsed.setFormat(ctf_ms);
if(primera){
cout << telapsed << "\t" << pos_marker;
primera = false;
}else{
cout << "\t" << telapsed << "\t" << pos_marker << endl;
primera = true;
}
pos_marker_old = pos_marker;
}
}while( telapsed.getTimeInSeconds() < experiment_duration );
}catch(CException &e){
cout << e.what() << endl;
}
return 1;
}