The following statistics are computed from various track. The meanings and definitions of each statistic is as follows: * Track_Line: The connected line of locations along a single track * Travel: The total length of the track from the first point to the last point. * Cycle_Count: (Track_Line/Track intersections) / 2 * Cycle_Time: Same as Moving_Time * Avg_Seconds_Per_Cycle: Cycle_Time / Cycle_count * Moving_Time: The time during which a vehicle moves during the entire day. * Average_Speed: Travel / Moving_Time * Average_Cycle_Length: Travel / Cycle_Count * Average_Move_Time: Moving_Time / Cycle_Count * Working_Time: Defined value of - Morning_Start_Time - Morning_End_Time - Afternoon_Start_Time - Afternoon_End_Time * Cost_Hours: Total Working_Time for the day * Minutes_Per_Hour: Cycle_Time / Cost_Hours Notes: * Lengths are computed by linear X-Y projected distances between adjacent track points. (track altitude is ignored) * If Working_Time is not defined, Morning_Start == Track_Start, Afternoon_End == Track_End, no lunch period. * The "Moving" (for Moving_Time) is defined as: * time between adjacent points < 3 seconds AND * velocity between points > 0.5 FP Example loop to calculate moving time and moving distance: // Uses some trackwork conventions for methods, reader is encouraged to translate // to the appropriate idiom for their environment. // // Points are assumed to be order in time such that time(pt[0]) < time(pt[1]) // int movingTime = 0; float movingDistance = 0.0; for( int i = 1; i < GetNPoints(); i++ ) { CAgVertex v1 = GetAgVertexAt(i); CAgVertex prev = GetAgVertexAt(i-1); time_t seconds = GetUTCTimeAtIndex(i).GetTimeT(); time_t prevSeconds = GetUTCTimeAtIndex(i-1).GetTimeT(); float distanceDelta = v1.Distance(prev); int prevTimeDelta = CAgTime::GetTimeDifferenceSeconds(GetUTCTimeAtIndex(i), GetUTCTimeAtIndex(i-1)); float tmpspeed = (prevDelta > 0) ? distance/prevDelta : 0; if( (prevDelta < idleTime) && (tmpspeed > idleFPS) ) { movingTime += prevTimeDelta; movingDistance += distanceDelta; } printf( "Moving seconds: %d\n", movingTime ); printf( "Moving feet : %d\n", movingDistance ); }