public SubtotalFeature Average()
        {
            SubtotalFeature average = new SubtotalFeature(this);

            average.startDistance               = average.startDistance / featuresCount;
            average.endDistance                 = average.endDistance / featuresCount;
            average.distance                    = average.distance / featuresCount;
            average.elevGain                    = average.elevGain / featuresCount;
            average.grade                       = average.grade / featuresCount;
            average.speed                       = average.speed / featuresCount;
            average.hr                          = average.hr / featuresCount;
            average.cadence                     = average.cadence / featuresCount;
            average.power                       = average.power / featuresCount;
            average.hillScoreClimbByBike        = average.hillScoreClimbByBike / featuresCount;
            average.hillScoreCourseScoreCycling = average.hillScoreCourseScoreCycling / featuresCount;
            average.hillScoreCourseScoreRunning = average.hillScoreCourseScoreRunning / featuresCount;
            average.hillScoreCycle2Max          = average.hillScoreCycle2Max / featuresCount;
            average.hillScoreFiets              = average.hillScoreFiets / featuresCount;
            average.maxGrade                    = average.maxGrade / featuresCount;
            average.minGrade                    = average.minGrade / featuresCount;
            average.vam                         = average.vam / featuresCount;
            average.wkg                         = average.wkg / featuresCount;
            average.totalTime                   = new TimeSpan(average.totalTime.Ticks / featuresCount);
            average.stoppedTime                 = new TimeSpan(average.stoppedTime.Ticks / featuresCount);
            average.featuresCount               = featuresCount;
            return(average);
        }
 public SubtotalFeature(SubtotalFeature feature)
 {
     startDistance               = feature.startDistance;
     endDistance                 = feature.endDistance;
     distance                    = feature.distance;
     elevGain                    = feature.elevGain;
     grade                       = feature.grade;
     speed                       = feature.speed;
     hr                          = feature.hr;
     cadence                     = feature.cadence;
     power                       = feature.power;
     hillScoreClimbByBike        = feature.hillScoreClimbByBike;
     hillScoreCycle2Max          = feature.hillScoreCycle2Max;
     hillScoreFiets              = feature.hillScoreFiets;
     hillScoreCourseScoreCycling = feature.hillScoreCourseScoreCycling;
     hillScoreCourseScoreRunning = feature.hillScoreCourseScoreRunning;
     maxGrade                    = feature.maxGrade;
     minGrade                    = feature.minGrade;
     vam                         = feature.vam;
     wkg                         = feature.wkg;
     totalTime                   = feature.totalTime;
     stoppedTime                 = feature.stoppedTime;
     featuresCount++;
 }