public void Arm() { _flightRecorder.Publish("Arm"); var msg = UasCommands.ComponentArmDisarm(_connectedUasManager.Active.Uas.SystemId, _connectedUasManager.Active.Uas.ComponentId, 1); SendMessage(msg); }
public void Takeoff() { _flightRecorder.Publish("Take off"); var msg = UasCommands.NavTakeoff(_connectedUasManager.Active.Uas.SystemId, _connectedUasManager.Active.Uas.ComponentId, 0, 0, float.NaN, 0, TakeoffAltitude); _connectedUasManager.Active.Transport.SendMessage(msg); }
public void StartMission() { _flightRecorder.Publish("Start Mission"); var msg = UasCommands.MissionStart(_connectedUasManager.Active.Uas.SystemId, _connectedUasManager.Active.Uas.ComponentId, 0, 5); _connectedUasManager.Active.Transport.SendMessage(msg); }
public void ReturnToHome() { _flightRecorder.Publish("Return Home"); var msg = UasCommands.NavReturnToLaunch(_connectedUasManager.Active.Uas.SystemId, _connectedUasManager.Active.Uas.ComponentId); SendMessage(msg); }
public void Land() { _flightRecorder.Publish("Land"); var msg = UasCommands.NavLandLocal(_connectedUasManager.Active.Uas.SystemId, _connectedUasManager.Active.Uas.ComponentId, 0, 0, 0, 0, 0, 0, 0); SendMessage(msg); }
public void Done() { _connectedUasManager.Active.Transport.SendMessage(UasCommands.PreflightCalibration(_connectedUasManager.Active.Uas.SystemId, _connectedUasManager.Active.Uas.ComponentId, 0, 0, 0, 0, 2, 0, 0)); BeginCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); DoneCommand.RaiseCanExecuteChanged(); NextCommand.RaiseCanExecuteChanged(); }
public void Next() { if (IsActive) { var ack = new UasCommandAck() { TargetComponent = _connectedUasManager.Active.Uas.ComponentId, TargetSystem = _connectedUasManager.Active.Uas.SystemId, Command = 1, Result = 1, }; _connectedUasManager.Active.Transport.SendMessage(ack); } _connectedUasManager.Active.Transport.SendMessage(UasCommands.PreflightCalibration(_connectedUasManager.Active.Uas.SystemId, _connectedUasManager.Active.Uas.ComponentId, 0, 0, 0, 0, 1, 0, 0)); BeginCommand.RaiseCanExecuteChanged(); CancelCommand.RaiseCanExecuteChanged(); DoneCommand.RaiseCanExecuteChanged(); NextCommand.RaiseCanExecuteChanged(); }
public void GetHomePosition() { var msg = UasCommands.GetHomePosition(_connectedUasManager.Active.Uas.SystemId, _connectedUasManager.Active.Uas.ComponentId, 0, 0, 0, 0, 0, 0, 0); SendMessage(msg); }
public void LowerLandingGear() { var msg = UasCommands.AirframeConfiguration(_connectedUasManager.Active.Uas.SystemId, _connectedUasManager.Active.Uas.ComponentId, -1, 0 /* down */, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN); _connectedUasManager.Active.Transport.SendMessage(msg); }
public void StartTest() { var cmd = UasCommands.DoMotorTest(_mgr.Active.Uas.SystemId, _mgr.Active.Uas.ComponentId, 1, (float)MotorTestThrottleType.MotorTestThrottlePercent, 25, 5, 4, (float)MotorTestOrder.Board); _mgr.Active.Transport.SendMessage(cmd); }