Exemple #1
0
            override public string ToString()
            {
                StringBuilder text = new StringBuilder("Track statistics:\n");

                text.AppendLine("Total distance: " + Distance.ToString("N1"));
                text.AppendLine("Total time: " + Time.ToString("N2"));
                text.AppendLine("Average velocity (by time): " + (Distance / Time).ToString("N1"));
                text.AppendLine("Average velocity (by distance): " + (AvdSpeed / Distance).ToString("N1"));
                text.AppendLine("Minimum velocity: " + MinSpeed.ToString("N2"));
                text.AppendLine("Maximum velocity: " + MaxSpeed.ToString("N1"));
                return(text.ToString());
            }
Exemple #2
0
        public XElement toXElem()
        {
            XElement xel = new XElement("ControllerConfig");

            xel.Add(new XAttribute("Id", Id.ToString()),
                    new XAttribute("Type", Type),
                    new XAttribute("SmoothingEnabled", SmoothingEnabled.ToString().ToLower()),
                    new XAttribute("Smoothness", Smoothness.ToString()),
                    new XAttribute("Itensity", Intensity.ToString()),
                    new XAttribute("Acceleration", Acceleration.ToString()),
                    new XAttribute("MinSpeed", MinSpeed.ToString()),
                    new XAttribute("MaxSpeed", MaxSpeed.ToString())
                    );
            return(xel);
        }
Exemple #3
0
 public override string ToString()
 {
     return(string.Format(
                "Total GPS fixes:\t{0}" + NewLine() +
                "Lost GPS fixes:\t\t{1}" + NewLine() +
                "Speed MAX:\t\t{2} Km/h" + NewLine() +
                "Speed MIN:\t\t{3} Km/h" + NewLine() +
                "Speed AVG:\t\t{4} Km/h" + NewLine() +
                "Altitude MAX:\t\t{5} meters" + NewLine() +
                "Altitude MIN:\t\t{6} meters" + NewLine() +
                "Temperature MAX:\t{7} °C" + NewLine() +
                "Temperature MIN:\t{8} °C" + NewLine() +
                "Temperature AVG:\t{9} °C" + NewLine() +
                "Heart rate MAX:\t\t{10} bpm" + NewLine() +
                "Heart rate MIN:\t\t{11} bpm" + NewLine() +
                "Heart rate AVG:\t\t{12} bpm" + NewLine() +
                "Time total:\t\t{13}" + NewLine() +
                "Time moving:\t\t{14}" + NewLine() +
                "Distance:\t\t{15} Km" + NewLine(),
                _fixCounter.FixesTotalNumber,
                _fixCounter.FixesLostNumber,
                MaxSpeed.ToString("0.0"),
                MinSpeed.ToString("0.0"),
                AverageSpeed.ToString("0.0"),
                MaxAltitude,
                MinAltitude,
                MaxTemperature.ToString("0.0"),
                MinTemperature.ToString("0.0"),
                AverageTemperature.ToString("0.0"),
                MaxHeartRate,
                MinHeartRate,
                AverageHeartRate,
                FormatTime(TotalTime),
                FormatTime(TotalTripTime),
                TotalTripDistance.ToString("0.0")));
 }