/// <summary> /// Convert this AttitudeCommand values to a ComputerMode /// </summary> public SimpleTypes.ComputerModeMapper mapFlightMode() { SimpleTypes.ComputerModeMapper computerMode = new SimpleTypes.ComputerModeMapper(); computerMode.mapFlightMode(Mode, Attitude, Frame); return(computerMode); }
/// <summary> /// Get the current active FlightMode and map it to the Computermode /// </summary> public void getActiveFlightMode() { // check the current flight mode if (mFlightComputer.CurrentFlightMode == null) { Reset(); return; } // get active command SimpleTypes.ComputerModeMapper mappedCommand = mFlightComputer.CurrentFlightMode.mapFlightMode(); mMode = mappedCommand.computerMode; mAttitude = FlightAttitude.Null; if (mMode == ComputerMode.Orbital || mMode == ComputerMode.Surface || mMode == ComputerMode.TargetPos || mMode == ComputerMode.TargetVel) { mAttitude = mappedCommand.computerAttitude; } }
/// <summary> /// Get the current active FlightMode and map it to the Computermode /// </summary> public void getActiveFlightMode() { // check the current flight mode if (mFlightComputer.CurrentFlightMode == null) { Reset(); return; } // get active command SimpleTypes.ComputerModeMapper mappedCommand = mFlightComputer.CurrentFlightMode.mapFlightMode(); mMode = mappedCommand.computerMode; mAttitude = FlightAttitude.Null; if (mMode == ComputerMode.Orbital || mMode == ComputerMode.Surface || mMode == ComputerMode.TargetPos || mMode == ComputerMode.TargetVel) { mAttitude = mappedCommand.computerAttitude; } var activeIgnoreCmd = FlightControlCommand.findActiveControlCmd(mFlightComputer); if (activeIgnoreCmd != null) { mControlOutputMask = 0; if (activeIgnoreCmd.ignorePitchOutput) { mControlOutputMask |= FlightControlOutput.IgnorePitch; } if (activeIgnoreCmd.ignoreHeadingOutput) { mControlOutputMask |= FlightControlOutput.IgnoreHeading; } if (activeIgnoreCmd.ignoreRollOutput) { mControlOutputMask |= FlightControlOutput.IgnoreRoll; } } }
/// <summary> /// Convert this AttitudeCommand values to a ComputerMode /// </summary> public SimpleTypes.ComputerModeMapper mapFlightMode() { SimpleTypes.ComputerModeMapper computerMode = new SimpleTypes.ComputerModeMapper(); computerMode.mapFlightMode(Mode,Attitude,Frame); return computerMode; }