Exemplo n.º 1
0
        public FitSession(SessionMesg msg, int first, int last)
        {
            FirstRecord = first;
            LastRecord  = last;

            AveAltitude = msg.GetAvgAltitude();
            msg.GetAvgBallSpeed();
            AveCadence                 = msg.GetAvgCadence();
            AveCadencePosition         = FitFile.GetByteList(msg.GetNumAvgCadencePosition(), msg.GetAvgCadencePosition);
            AveCombinedPedalSmoothness = msg.GetAvgCombinedPedalSmoothness();
            AveFractionalCadence       = msg.GetAvgFractionalCadence();
            AveGrade     = msg.GetAvgGrade();
            AveHeartRate = msg.GetAvgHeartRate();
            msg.GetAvgLapTime();
            AveLeftPco                 = msg.GetAvgLeftPco();
            AveLeftPedalSmoothness     = msg.GetAvgLeftPedalSmoothness();
            AveLeftPowerPhase          = FitFile.GetFloatList(msg.GetNumAvgLeftPowerPhase(), msg.GetAvgLeftPowerPhase);
            AveLeftPowerPhasePeak      = FitFile.GetFloatList(msg.GetNumAvgLeftPowerPhasePeak(), msg.GetAvgLeftPowerPhasePeak);
            AveLeftTorqueEffectiveness = msg.GetAvgLeftTorqueEffectiveness();
            AveLevMotorPower           = msg.GetAvgLevMotorPower();
            AveNegGrade                = msg.GetAvgNegGrade();
            AveNegVerticalSpeed        = msg.GetAvgNegVerticalSpeed();
            AvePosGrade                = msg.GetAvgPosGrade();
            AvePosVerticalSpeed        = msg.GetAvgPosVerticalSpeed();
            AvePower                      = msg.GetAvgPower();
            AvePowerPosition              = FitFile.GetUShortList(msg.GetNumAvgPowerPosition(), msg.GetAvgPowerPosition);
            AveRightPco                   = msg.GetAvgRightPco();
            AveRightPedalSmoothness       = msg.GetAvgRightPedalSmoothness();
            AveRightPowerPhase            = FitFile.GetFloatList(msg.GetNumAvgRightPowerPhase(), msg.GetAvgRightPowerPhase);
            AveRightPowerPhasePeak        = FitFile.GetFloatList(msg.GetNumAvgRightPowerPhasePeak(), msg.GetAvgRightPowerPhasePeak);
            AveRightTorqueEffectiveness   = msg.GetAvgRightTorqueEffectiveness();
            AveRunningCadence             = msg.GetAvgRunningCadence();
            AveSaturatedHemoglobinPercent = FitFile.GetFloatList(msg.GetNumAvgSaturatedHemoglobinPercent(), msg.GetAvgSaturatedHemoglobinPercent);
            AveSpeed                      = FitFile.GetSpeed(msg.GetAvgSpeed());
            AveStanceTime                 = msg.GetAvgStanceTime();
            AveStanceTimeBalance          = msg.GetAvgStanceTimeBalance();
            AveStanceTimePercent          = msg.GetAvgStanceTimePercent();
            AveStepLength                 = msg.GetAvgStepLength();
            msg.GetAvgStrokeCount();
            AveStrokeDistance      = msg.GetAvgStrokeDistance();
            AveTemperature         = msg.GetAvgTemperature();
            AveTotalHemoglobinConc = FitFile.GetFloatList(msg.GetNumAvgTotalHemoglobinConc(), msg.GetAvgTotalHemoglobinConc);
            AvgVam = msg.GetAvgVam();
            AvgVerticalOscillation = msg.GetAvgVerticalOscillation();
            AvgVerticalRatio       = msg.GetAvgVerticalRatio();
            msg.GetBestLapIndex();
            EnhancedAvgAltitude = msg.GetEnhancedAvgAltitude();
            EnhancedAvgSpeed    = FitFile.GetSpeed(msg.GetEnhancedAvgSpeed());
            EnhancedMaxAltitude = msg.GetEnhancedMaxAltitude();
            EnhancedMaxSpeed    = FitFile.GetSpeed(msg.GetEnhancedMaxSpeed());
            EnhancedMinAltitude = msg.GetEnhancedMinAltitude();
            Event                 = msg.GetEvent();
            EventGroup            = msg.GetEventGroup();
            EventType             = msg.GetEventType();
            FirstLengthIndex      = msg.GetFirstLapIndex();
            GpsAccuracy           = msg.GetGpsAccuracy();
            IntensityFactor       = msg.GetIntensityFactor();
            LeftRightBalance      = msg.GetLeftRightBalance();
            LevBatteryConsumption = msg.GetLevBatteryConsumption();
            MaxAltitude           = msg.GetMaxAltitude();
            msg.GetMaxBallSpeed();
            MaxCadence                    = msg.GetMaxCadence();
            MaxCadencePosition            = FitFile.GetByteList(msg.GetNumMaxCadencePosition(), msg.GetMaxCadencePosition);
            MaxFractionalCadence          = msg.GetMaxFractionalCadence();
            MaxHeartRate                  = msg.GetMaxHeartRate();
            MaxLevMotorPower              = msg.GetMaxLevMotorPower();
            MaxNegGrade                   = msg.GetMaxNegGrade();
            MaxNegVerticalSpeed           = msg.GetMaxNegVerticalSpeed();
            MaxPosGrade                   = msg.GetMaxPosGrade();
            MaxPosVerticalSpeed           = msg.GetMaxPosVerticalSpeed();
            MaxPower                      = msg.GetMaxPower();
            MaxPowerPosition              = FitFile.GetUShortList(msg.GetNumMaxPowerPosition(), msg.GetMaxPowerPosition);
            MaxRunningCadence             = msg.GetMaxRunningCadence();
            MaxSaturatedHemoglobinPercent = FitFile.GetFloatList(msg.GetNumMaxSaturatedHemoglobinPercent(), msg.GetMaxSaturatedHemoglobinPercent);
            MaxSpeed                      = FitFile.GetSpeed(msg.GetMaxSpeed());
            MaxTemperature                = msg.GetMaxTemperature();
            MaxTotalHemoglobinConc        = FitFile.GetFloatList(msg.GetNumMaxTotalHemoglobinConc(), msg.GetMaxTotalHemoglobinConc);
            MinAltitude                   = msg.GetMinAltitude();
            MinHeartRate                  = msg.GetMinHeartRate();
            MinSaturatedHemoglobinPercent = FitFile.GetFloatList(msg.GetNumMinSaturatedHemoglobinPercent(), msg.GetMinSaturatedHemoglobinPercent);
            MinTotalHemoglobinConc        = FitFile.GetFloatList(msg.GetNumMinTotalHemoglobinConc(), msg.GetMinTotalHemoglobinConc);
            msg.GetNecLat();
            msg.GetNecLong();
            NormalizedPower  = msg.GetNormalizedPower();
            NumActiveLengths = msg.GetNumActiveLengths();
            msg.GetNumLaps();
            msg.GetOpponentNameAsString();
            OpponentScore = msg.GetOpponentScore();
            PlayerScore   = msg.GetPlayerScore();
            msg.GetPoolLength();
            msg.GetPoolLengthUnit();
            Sport = msg.GetSport();
            msg.GetSportIndex();
            StandCount        = msg.GetStandCount();
            StartPositionLat  = FitFile.GetDegrees(msg.GetStartPositionLat());
            StartPositionLong = FitFile.GetDegrees(msg.GetStartPositionLong());
            StartTime         = FitFile.GetDateTime(msg.GetStartTime());
            StrokeCounts      = FitFile.GetUShortList(msg.GetNumStrokeCount(), msg.GetStrokeCount);
            SubSport          = msg.GetSubSport();
            msg.GetSwcLat();
            msg.GetSwcLong();
            SwimStroke = msg.GetSwimStroke();
            msg.GetThresholdPower();
            TimeInCadenceZone     = FitFile.GetFloatList(msg.GetNumTimeInCadenceZone(), msg.GetTimeInCadenceZone);
            TimeInHrZone          = FitFile.GetFloatList(msg.GetNumTimeInHrZone(), msg.GetTimeInHrZone);
            TimeInPowerZone       = FitFile.GetFloatList(msg.GetNumTimeInPowerZone(), msg.GetTimeInPowerZone);
            TimeInSpeedZone       = FitFile.GetFloatList(msg.GetNumTimeInSpeedZone(), msg.GetTimeInSpeedZone);
            Timestamp             = FitFile.GetDateTime(msg.GetTimestamp());
            TimeStanding          = msg.GetTimeStanding();
            TotalAscent           = msg.GetTotalAscent();
            TotalCalories         = msg.GetTotalCalories();
            TotalCycles           = msg.GetTotalCycles();
            TotalDescent          = msg.GetTotalDescent();
            TotalDistance         = FitFile.GetDistance(msg.GetTotalDistance());
            TotalElapsedTime      = FitFile.GetTimeSpan(msg.GetTotalElapsedTime());
            TotalFatCalories      = msg.GetTotalFatCalories();
            TotalFractionalCycles = msg.GetTotalFractionalCycles();
            TotalMovingTime       = FitFile.GetTimeSpan(msg.GetTotalMovingTime());
            TotalStrides          = msg.GetTotalStrides();
            TotalTimerTime        = FitFile.GetTimeSpan(msg.GetTotalTimerTime());
            TotalWork             = FitFile.GetWork(msg.GetTotalWork());
            ZoneCounts            = FitFile.GetUShortList(msg.GetNumZoneCount(), msg.GetZoneCount);
            msg.GetTotalAnaerobicTrainingEffect();
            msg.GetTotalTrainingEffect();
            msg.GetTrainingStressScore();
            msg.GetTrigger();

            MaxCadence   = msg.GetMaxCadence();
            MaxHeartRate = msg.GetMaxHeartRate();
            MaxPower     = msg.GetMaxPower();
            MaxSpeed     = FitFile.GetSpeed(msg.GetMaxSpeed());
        }