public override double ConvertDistanceToKilometers(double distance) { if (ContainsEnglishUnits) { return(ConvertDistance.MilesToKilometers(distance)); } return(distance); }
public override double ConvertSpeedToKilometersPerHour(double speed) { if (ContainsEnglishUnits) { // m/h * k/m return(ConvertDistance.MilesToKilometers(speed)); } return(speed); }
private TcxTrackPoint CreateTrackPoint(TimeSpan effectiveElapsedTime, LeMondDataPoint point) { return(new TcxTrackPoint() { Time = reader.StartTime + effectiveElapsedTime, CadenceRpm = point.CadenceRotationsPerMinute, CaloriesElapsed = point.ElapsedCalories, DistanceMetersElapsed = ConvertDistance.KilometersToMeters(point.DistanceKilometers), HeartRateBpm = point.HeartRateBeatsPerMinute, PowerWatts = point.PowerWatts, SpeedMetersPerSecond = ConvertTime.SecondsToHours(ConvertDistance.KilometersToMeters(point.SpeedKilometersPerHour)), }); }