Beispiel #1
0
void Trajectory::readRawTrajectoryFile(string filename)
{
    string taxiID = filename;
	taxiID = taxiID.substr(0, taxiID.find("."));
	filename = cf.rawTrajectoryFolder + filename;
	ifstream ifile(filename.c_str());
	
	string stmp1, stmp2;
	int i = -1;
	struct tm ts;
	while(ifile >> stmp1)
	{
		if(stmp1 == "#")
		{
			taxiTrajectory tt;
			i++;
			ifile >> stmp1;	//trajectory ID
			ifile >> stmp1;	//taxi ID
			ts = wrapTime(ifile);
			tt.sTime = mktime(&ts);
			ts = wrapTime(ifile);
			tt.eTime = mktime(&ts);
			ifile >> tt.distance;
			ifile >> stmp1; //km
			vTrajectory.push_back(tt);
			continue;
		}
		trajectoryUnit tu;
		ts = wrapTime(ifile);
		tu.t = mktime(&ts);
		ifile >> tu.x;
		ifile >> tu.y;
		vTrajectory[i].vTU.push_back(tu);
		ifile >> stmp1;
	}
Beispiel #2
0
 /// Returns the Phrase value at \a time, looping past the end from inflection point to the end.
 /// Relies on the subclass implementation of getValue( t ).
 T getValueWrapped( Time time, Time inflectionPoint = 0.0f ) const { return getValue( wrapTime( time, getDuration(), inflectionPoint ) ); }