public void StringToPrintTracksOnScreen(object sender, UpdatedDataEvent e) { foreach (Aircraft track in e.UpdatedData) { string trackToPrint = "Tag: " + track.Tag + " Current position: X: " + track.XCoordinate + " meters, Y: " + track.YCoordinate + " meters, Current altitude: " + track.Altitude + " meters, Current horizontal velocity: " + track.HorizontalVelocity + " m/s, Current compass course " + track.CompassCourse + " degress. "; _log.Log(trackToPrint); } }
public void RunSeparationInvestigation(object sender, UpdatedDataEvent e) { AddSeparations(e.UpdatedData); SeparationController(oldSeparationWarningData, newSeparationWarningData); if (newSeparationWarningData.Count != 0) { SeparationWarningDataEvent?.Invoke(this, (new SeparationWarningDataEvent(newSeparationWarningData))); } }
public void UpdatedMethod(object sender, FilterDataEvent e) { WithoutDataAircrafts = e.FilterData; CalculateCompassCourse(WithoutDataAircrafts); HorizontalVelocity(WithoutDataAircrafts); WithDataAircrafts = new List <Aircraft>(WithoutDataAircrafts); UpdatedDataEvent?.Invoke(this, new UpdatedDataEvent(WithDataAircrafts)); WithoutDataAircrafts.Clear(); }
public void SetUp() { _fakeLog = Substitute.For <ILog>(); _fakeFilter = Substitute.For <IFilter>(); _uut = new Updater(_fakeFilter); _event = null; _uut.UpdatedDataEvent += (o, args) => { _event = args; }; }