Ejemplo n.º 1
0
        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;
 }
Ejemplo n.º 3
0
 private void OnMeasurementProcessed(Measurement measurement)
 {
     if (MeasurementProcessed != null)
     {
         MeasurementProcessed(this, new MeasurementProcessedEventArgs(measurement));
     }
 }