public void Write(SepCondEventArgs e, string fileName)
 {
     using (StreamWriter logfile = new StreamWriter(fileName, true))
     {
         logfile.WriteLine($"{e.TimeOfOccurrence} - Separation Condition Error between tags: " +
                           $"{e.Track1.Tag} and {e.Track2.Tag}");
     }
 }
        // Checks if there's a separation condition between two tracks
        public void CheckForCondition(Track t1, Track t2)
        {
            if (Math.Abs((t1.Altitude - t2.Altitude)) <= 300 &&
                (DistanceCalculator(t1, t2) <= 5000))
            {
                // Prepare arguments
                var args = new SepCondEventArgs();
                args.TimeOfOccurrence = DateTime.Now;
                args.Track1           = t1;
                args.Track2           = t2;

                AddToTrackList(t1, t2);
                _SepCondEventArgsList.Add(args);

                // Raise event for warnings
                WarningEvent?.Invoke(this, args);
            }
        }
Beispiel #3
0
 public void SepConditionOccured(object sender, SepCondEventArgs e)
 {
     inputoutputtype.Write(e, FileName);
 }