private void addActivityElement(Sensors a) { if (prevActivity == null || prevActivity.rotation != a.rotation || prevActivity.altitude != a.altitude || prevActivity.velocityX != a.velocityX || prevActivity.velocityY != a.velocityY) { prevActivity = a; activitiesElement.Add(new XElement("a", String.Format("{0} {1} {2} {3} {4}", a.when, a.rotation, a.altitude, a.velocityX, a.velocityY))); } }
public void AddActivity(double rotation, double altitude, double velocityX, double velocityY) { if (Started() && !IsPaused()) { Sensors a = new Sensors(Elapsed(), rotation, altitude, velocityX, velocityY); activities.Add(a); addActivityElement(a); } }
public void NewMission() { ticksStarted = 0; activities = new List <Sensors>(); navigationCommands = new List <NavigationCommand>(); missionName = null; missionTitle = null; prevActivity = null; isPaused = false; pausedTime = 0; ticksPaused = 0; }