Example #1
0
        public void CalculateSpeedAverages()
        {
            var coords = TrackCoordinates.ToList();
            var speeds = SpeedList.ToList();

            TrackCoordinates.Clear();
            SpeedList.Clear();

            TrackSpeed   = GetAverageTrackSpeed(coords);
            AverageSpeed = speeds.Any() ? Math.Round(speeds.Average(), 1) : 0.0d;
        }
Example #2
0
        private void OnGgaEvent(object sender, Gps.GPSGGA gga)
        {
            if (gga.Quality == Gps.GPSGGA.FixQuality.noFix || gga.Satellites == null)
            {
                return;
            }

            Sattelites = gga.Satellites.Value;

            TrackCoordinates.Add(new Position
            {
                Latitude  = gga.Latitude.GetValueOrDefault(),
                Longitude = gga.Longitude.GetValueOrDefault()
            });
        }