public void CalculateMotionParameters(Measurement previous)
        {
            Distance = Math.Abs(1000 * Constants.R * Math.Acos(Math.Sin(previous.Latitude.Radians) * Math.Sin(Latitude.Radians)
                          + Math.Cos(previous.Latitude.Radians) * Math.Cos(Latitude.Radians)
                          * Math.Cos(previous.Longitude.Radians - Longitude.Radians)));

            Path = previous.Path + Distance;

            var duration = Time.TotalSeconds - previous.Time.TotalSeconds;

            FlightTime = previous.FlightTime + duration;

            Speed = Distance/duration;

            var course = Math.Atan((X - previous.X)/(Y - previous.Y)) * 180 / Math.PI;

            Course = course != Double.NaN ? course : 90;
        }
 public MeasurementProcessedEventArgs(Measurement measurement)
 {
     Measurement = measurement;
 }
 private void OnMeasurementProcessed(Measurement measurement)
 {
     if (MeasurementProcessed != null)
     {
         MeasurementProcessed(this, new MeasurementProcessedEventArgs(measurement));
     }
 }