Beispiel #1
0
 private static void MergeRouteFragments(Logictracker.Types.ReportObjects.MobileRoutes pastFragment, Logictracker.Types.ReportObjects.MobileRoutes currentFragment)
 {
     pastFragment.AverageSpeed         = pastFragment.AverageSpeed >= currentFragment.AverageSpeed ? pastFragment.AverageSpeed : currentFragment.AverageSpeed;
     pastFragment.Duration            += currentFragment.Duration;
     pastFragment.FinalTime            = currentFragment.FinalTime;
     pastFragment.InfractionsDuration += currentFragment.InfractionsDuration;
     pastFragment.Infractions         += currentFragment.Infractions;
     pastFragment.Kilometers          += currentFragment.Kilometers;
     pastFragment.MaxSpeed             = pastFragment.MaxSpeed >= currentFragment.MaxSpeed ? pastFragment.MaxSpeed : currentFragment.MaxSpeed;
     pastFragment.MinSpeed             = pastFragment.MinSpeed <= currentFragment.MinSpeed ? pastFragment.MinSpeed : currentFragment.MinSpeed;
 }
Beispiel #2
0
 /// <summary>
 /// Determines if two givenn mobile route fragments have the same driving caracteristics.
 /// </summary>
 /// <param name="route"></param>
 /// <returns></returns>
 public bool EqualState(MobileRoutes route)
 {
     return(Driver.Equals(route.Driver) && Geocerca.Equals(route.Geocerca) && EngineStatus.Equals(route.EngineStatus) && VehicleStatus.Equals(route.VehicleStatus));
 }