.. default-domain:: java .. highlight:: java .. package:: krpc.client.services.MechJeb AscentGuidance ============== .. type:: public class AscentGuidance The Ascent Guidance window, which flies the vessel to orbit. .. note:: See the `MechJeb wiki `_ for how to set up this autopilot. .. method:: boolean getEnabled() .. method:: void setEnabled(boolean value) Whether the module is enabled. :Game Scenes: Flight .. method:: String getStatus() The autopilot status, which depends on the selected ascent type. :Game Scenes: Flight .. method:: AscentType getAscentType() .. method:: void setAscentType(AscentType value) The ascent type. :Game Scenes: Flight .. note:: Setting it disengages the autopilot of the other type. .. method:: AscentSettings getSettings() The Ascent Settings window. :Game Scenes: Flight .. method:: PSGSettings getPSGSettings() The settings of the :field:`AscentType.PSG` ascent, from the Ascent Settings window and the PSG Stages window. :Game Scenes: Flight .. method:: ClassicPath getClassicPath() The Ascent Path Editor window, with the settings of the :field:`AscentType.CLASSIC` ascent. :Game Scenes: Flight .. method:: double getDesiredOrbitAltitude() .. method:: void setDesiredOrbitAltitude(double value) The altitude of the final circular orbit, in meters. :Game Scenes: Flight .. note:: Applies to the :field:`AscentType.CLASSIC` ascent. .. method:: double getDesiredInclination() .. method:: void setDesiredInclination(double value) The inclination of the final orbit, in degrees. :Game Scenes: Flight .. method:: double getPeriapsisAltitude() .. method:: void setPeriapsisAltitude(double value) The altitude of the periapsis of the target orbit, in meters. :Game Scenes: Flight .. note:: Applies to the :field:`AscentType.PSG` ascent. .. method:: double getApoapsisAltitude() .. method:: void setApoapsisAltitude(double value) The altitude of the apoapsis of the target orbit, in meters. :Game Scenes: Flight .. note:: Applies to the :field:`AscentType.PSG` ascent. A value below :meth:`AscentGuidance.getPeriapsisAltitude()`, such as 0, gives a circular orbit, and a negative value a hyperbolic one. .. method:: boolean getBurnoutAltitudeFlag() .. method:: void setBurnoutAltitudeFlag(boolean value) Whether to reach the target orbit at :meth:`AscentGuidance.getBurnoutAltitude()`. :Game Scenes: Flight .. note:: Applies to the :field:`AscentType.PSG` ascent. When every stage has a fixed burn time, the ascent always burns out at :meth:`AscentGuidance.getBurnoutAltitude()`. .. method:: double getBurnoutAltitude() .. method:: void setBurnoutAltitude(double value) The altitude at which the ascent reaches the target orbit, in meters. MechJeb's window calls it the attach altitude. :Game Scenes: Flight .. note:: Applies to the :field:`AscentType.PSG` ascent. See :meth:`AscentGuidance.getBurnoutAltitudeFlag()`. .. method:: double getFlightPathAngle() .. method:: void setFlightPathAngle(double value) The flight path angle at burnout, in degrees. :Game Scenes: Flight .. note:: Applies to the :field:`AscentType.PSG` ascent, when every stage has a fixed burn time. .. method:: boolean getArgumentOfPeriapsisFlag() .. method:: void setArgumentOfPeriapsisFlag(boolean value) Whether to aim for :meth:`AscentGuidance.getArgumentOfPeriapsis()`. :Game Scenes: Flight .. note:: Applies to the :field:`AscentType.PSG` ascent. .. method:: double getArgumentOfPeriapsis() .. method:: void setArgumentOfPeriapsis(double value) The argument of periapsis of the target orbit, in degrees. :Game Scenes: Flight .. note:: Applies to the :field:`AscentType.PSG` ascent. Requires :meth:`AscentGuidance.getArgumentOfPeriapsisFlag()`. .. method:: double getDesiredLan() .. method:: void setDesiredLan(double value) The longitude of the ascending node of a launch to a LAN, in degrees. See :meth:`AscentGuidance.launchToLan()`. :Game Scenes: Flight .. method:: double getLaunchLANDifference() .. method:: void setLaunchLANDifference(double value) The difference from the target's longitude of the ascending node of a launch into the target's plane, in degrees. :Game Scenes: Flight .. method:: boolean getOverrideWarpToPlane() .. method:: void setOverrideWarpToPlane(boolean value) Whether a timed launch launches at once, rather than at the time it computes. :Game Scenes: Flight .. method:: int getWarpCountDown() .. method:: void setWarpCountDown(int value) The time before a timed launch at which time warp stops, in seconds. :Game Scenes: Flight .. method:: AscentLaunchMode getLaunchMode() The launch mode, which gives whether a timed launch is counting down. :Game Scenes: Flight .. method:: double getTimeToLaunch() The time until a timed launch, in seconds. :Game Scenes: Flight .. note:: Requires a :meth:`AscentGuidance.getLaunchMode()` other than :field:`AscentLaunchMode.NORMAL`. .. method:: void abortTimedLaunch() Abort a timed launch. :Game Scenes: Flight .. method:: void launchToTargetPlane() Count down to a launch into the plane of the target, and set :meth:`AscentGuidance.getDesiredInclination()` to match. Throws an exception if there is no target orbiting the body the vessel is on. :Game Scenes: Flight .. note:: The countdown runs while the autopilot is enabled. .. method:: void launchToTargetLan() Count down to a launch into the plane with the target's longitude of the ascending node, less :meth:`AscentGuidance.getLaunchLANDifference()`, and inclination :meth:`AscentGuidance.getDesiredInclination()`. Throws an exception if there is no target orbiting the body the vessel is on, or the ascent type is not :field:`AscentType.PSG`. :Game Scenes: Flight .. note:: The countdown runs while the autopilot is enabled. .. method:: void launchToLan() Count down to a launch into the plane with longitude of the ascending node :meth:`AscentGuidance.getDesiredLan()` and inclination :meth:`AscentGuidance.getDesiredInclination()`. Throws an exception if the ascent type is not :field:`AscentType.PSG`. :Game Scenes: Flight .. note:: The countdown runs while the autopilot is enabled. .. type:: public enum AscentType The ascent type. See :meth:`AscentGuidance.getAscentType()`. .. field:: public AscentType CLASSIC The classic ascent path. See :meth:`AscentGuidance.getClassicPath()`. .. field:: public AscentType PSG Polynomial SQP Guidance, an optimized ascent, for RSS/RO. See :meth:`AscentGuidance.getPSGSettings()`. .. type:: public enum AscentLaunchMode The launch mode of the ascent autopilot. See :meth:`AscentGuidance.getLaunchMode()`. .. field:: public AscentLaunchMode NORMAL No timed launch is counting down. .. field:: public AscentLaunchMode TARGET_PLANE A timed launch into the plane of the target. See :meth:`AscentGuidance.launchToTargetPlane()`. .. field:: public AscentLaunchMode TARGET_LAN A timed launch to the target's longitude of the ascending node. See :meth:`AscentGuidance.launchToTargetLan()`. .. field:: public AscentLaunchMode LAN A timed launch to a longitude of the ascending node. See :meth:`AscentGuidance.launchToLan()`. AscentSettings -------------- .. type:: public class AscentSettings The Ascent Settings window, which holds the settings shared by the ascent types. .. method:: boolean getForceRoll() .. method:: void setForceRoll(boolean value) Whether the autopilot controls the roll. :Game Scenes: Flight .. method:: double getVerticalRoll() .. method:: void setVerticalRoll(double value) The roll during the vertical climb, in degrees. :Game Scenes: Flight .. note:: Requires :meth:`AscentSettings.getForceRoll()`. .. method:: double getTurnRoll() .. method:: void setTurnRoll(double value) The roll during the turn, in degrees. :Game Scenes: Flight .. note:: Requires :meth:`AscentSettings.getForceRoll()`. .. method:: double getRollAltitude() .. method:: void setRollAltitude(double value) The altitude above which the autopilot controls the roll, in meters. :Game Scenes: Flight .. note:: Requires :meth:`AscentSettings.getForceRoll()`. .. method:: boolean getAutoDeploySolarPanels() .. method:: void setAutoDeploySolarPanels(boolean value) Whether the ascent keeps the solar panels retracted in the atmosphere, and extends them above it. :Game Scenes: Flight .. method:: boolean getAutoDeployAntennas() .. method:: void setAutoDeployAntennas(boolean value) Whether the ascent keeps the antennas retracted in the atmosphere, and extends them above it. :Game Scenes: Flight .. method:: boolean getAutostage() .. method:: void setAutostage(boolean value) Whether the autopilot stages when the current stage runs out of fuel. :Game Scenes: Flight .. method:: AscentStaging getStaging() The staging settings of the ascent, which apply in place of :meth:`Utilities.getStaging()` while the autopilot is enabled. :Game Scenes: Flight .. method:: AscentThrustLimits getThrust() The throttle limits of the ascent, which apply in place of :meth:`Utilities.getThrust()` while the autopilot is enabled. :Game Scenes: Flight .. method:: boolean getAutowarp() .. method:: void setAutowarp(boolean value) Whether to warp time during the launch countdown and the coasts of the ascent. :Game Scenes: Flight .. method:: boolean getLimitingAngleOfAttack() Whether the angle of attack limit is limiting the steering. :Game Scenes: Flight .. method:: double getCurrentMaxAngleOfAttack() The largest angle of attack the limit allows now, in degrees. :Game Scenes: Flight AscentStaging ------------- .. type:: public class AscentStaging The staging settings of the ascent, from the Ascent Settings window. .. note:: The ascent starts with a copy of :meth:`Utilities.getStaging()`, and keeps its own settings after that. .. method:: double getAutostagePreDelay() .. method:: void setAutostagePreDelay(double value) The delay before each staging, in seconds. :Game Scenes: Flight .. method:: double getAutostagePostDelay() .. method:: void setAutostagePostDelay(double value) The delay after each staging, in seconds. :Game Scenes: Flight .. method:: int getAutostageLimit() .. method:: void setAutostageLimit(int value) The last stage the ascent activates. :Game Scenes: Flight .. method:: boolean getFairingMaxDynamicPressureEnabled() .. method:: void setFairingMaxDynamicPressureEnabled(boolean value) Whether to wait for :meth:`AscentStaging.getFairingMaxDynamicPressure()` to jettison a fairing. :Game Scenes: Flight .. method:: double getFairingMaxDynamicPressure() .. method:: void setFairingMaxDynamicPressure(double value) The largest dynamic pressure at which the ascent jettisons a fairing, in pascals. :Game Scenes: Flight .. note:: Requires :meth:`AscentStaging.getFairingMaxDynamicPressureEnabled()`. .. method:: boolean getFairingMinAltitudeEnabled() .. method:: void setFairingMinAltitudeEnabled(boolean value) Whether to wait for :meth:`AscentStaging.getFairingMinAltitude()` to jettison a fairing. :Game Scenes: Flight .. method:: double getFairingMinAltitude() .. method:: void setFairingMinAltitude(double value) The lowest altitude at which the ascent jettisons a fairing, in meters. :Game Scenes: Flight .. note:: Requires :meth:`AscentStaging.getFairingMinAltitudeEnabled()`. .. method:: boolean getFairingMaxAerothermalFluxEnabled() .. method:: void setFairingMaxAerothermalFluxEnabled(boolean value) Whether to wait for :meth:`AscentStaging.getFairingMaxAerothermalFlux()` to jettison a fairing. :Game Scenes: Flight .. method:: double getFairingMaxAerothermalFlux() .. method:: void setFairingMaxAerothermalFlux(double value) The largest aerothermal flux at which the ascent jettisons a fairing, in :math:`\mathrm{W/m^{2}}`. :Game Scenes: Flight .. note:: Requires :meth:`AscentStaging.getFairingMaxAerothermalFluxEnabled()`. .. method:: double getClampAutoStageThrustPct() .. method:: void setClampAutoStageThrustPct(double value) The fraction of full thrust at which the ascent releases the launch clamps. :Game Scenes: Flight .. method:: boolean getHotStaging() .. method:: void setHotStaging(boolean value) Whether the ascent ignites the next stage before the current one burns out. :Game Scenes: Flight .. method:: double getHotStagingLeadTime() .. method:: void setHotStagingLeadTime(double value) The time before burnout at which a hot staging happens, in seconds. :Game Scenes: Flight .. note:: Requires :meth:`AscentStaging.getHotStaging()`. .. method:: boolean getDropSolids() .. method:: void setDropSolids(boolean value) Whether the ascent drops the solid boosters of the next stage early, once their thrust no longer pays for their mass. :Game Scenes: Flight .. method:: double getDropSolidsTwrPct() .. method:: void setDropSolidsTwrPct(double value) The fraction of the vessel's thrust-to-weight ratio at which the solid boosters drop, between 0 and 1. :Game Scenes: Flight .. note:: Requires :meth:`AscentStaging.getDropSolids()`. AscentThrustLimits ------------------ .. type:: public class AscentThrustLimits The throttle limits of the ascent, from the Ascent Settings window. .. note:: The ascent starts with a copy of :meth:`Utilities.getThrust()`, and keeps its own limits after that. The :field:`AscentType.PSG` ascent ignores :meth:`AscentThrustLimits.getLimitThrottle()` and :meth:`AscentThrustLimits.getElectricThrottle()`. .. method:: boolean getLimitToPreventOverheats() .. method:: void setLimitToPreventOverheats(boolean value) Whether to limit the throttle to keep parts from overheating. :Game Scenes: Flight .. method:: boolean getLimitDynamicPressure() .. method:: void setLimitDynamicPressure(boolean value) Whether to limit the dynamic pressure. :Game Scenes: Flight .. method:: double getMaxDynamicPressure() .. method:: void setMaxDynamicPressure(double value) The largest dynamic pressure, in pascals. :Game Scenes: Flight .. note:: Requires :meth:`AscentThrustLimits.getLimitDynamicPressure()`. .. method:: boolean getLimitAcceleration() .. method:: void setLimitAcceleration(boolean value) Whether to limit the acceleration. :Game Scenes: Flight .. method:: double getMaxAcceleration() .. method:: void setMaxAcceleration(double value) The largest acceleration, in :math:`\mathrm{m/s^{2}}`. :Game Scenes: Flight .. note:: Requires :meth:`AscentThrustLimits.getLimitAcceleration()`. .. method:: boolean getLimitThrottle() .. method:: void setLimitThrottle(boolean value) Whether to limit the throttle. :Game Scenes: Flight .. method:: double getMaxThrottle() .. method:: void setMaxThrottle(double value) The largest throttle, between 0 and 1. :Game Scenes: Flight .. note:: Requires :meth:`AscentThrustLimits.getLimitThrottle()`. .. method:: boolean getLimiterMinThrottle() .. method:: void setLimiterMinThrottle(boolean value) Whether to keep the throttle above :meth:`AscentThrustLimits.getMinThrottle()`. :Game Scenes: Flight .. method:: double getMinThrottle() .. method:: void setMinThrottle(double value) The smallest throttle, between 0 and 1. :Game Scenes: Flight .. note:: Requires :meth:`AscentThrustLimits.getLimiterMinThrottle()`. .. method:: boolean getElectricThrottle() .. method:: void setElectricThrottle(boolean value) Whether to limit the throttle of electric engines to the available power. :Game Scenes: Flight .. method:: double getElectricThrottleLo() .. method:: void setElectricThrottleLo(double value) The charge level at which electric engines stop, between 0 and 1. :Game Scenes: Flight .. note:: Requires :meth:`AscentThrustLimits.getElectricThrottle()`. .. method:: double getElectricThrottleHi() .. method:: void setElectricThrottleHi(double value) The charge level at which electric engines run at full throttle, between 0 and 1. :Game Scenes: Flight .. note:: Requires :meth:`AscentThrustLimits.getElectricThrottle()`. .. method:: boolean getLimitToPreventUnstableIgnition() .. method:: void setLimitToPreventUnstableIgnition(boolean value) Whether to hold the throttle at zero while the engines' fuel is unstable. :Game Scenes: Flight .. note:: MechJeb shows this setting only with Real Fuels, as stock engines have stable fuel. .. method:: boolean getAutoRCSUllaging() .. method:: void setAutoRCSUllaging(boolean value) Whether to fire the RCS forward to settle the fuel before the engines ignite. :Game Scenes: Flight .. note:: MechJeb shows this setting only with Real Fuels, as stock engines have stable fuel. PSGSettings ----------- .. type:: public class PSGSettings The settings of the Polynomial SQP Guidance ascent, from the Ascent Settings window and the PSG Stages window, and the state of its guidance. .. note:: PSG plans which stages burn and coast from the vessel. The target orbit is set in :type:`AscentGuidance`. .. method:: double getPitchStartHeight() .. method:: void setPitchStartHeight(double value) The height above the launch site at which the pitch program starts, in meters. :Game Scenes: Flight .. method:: double getPitchRate() .. method:: void setPitchRate(double value) The pitch rate of the pitch program, in :math:`\mathrm{deg/s}`. :Game Scenes: Flight .. method:: double getDragCoefficient() .. method:: void setDragCoefficient(double value) The drag coefficient guidance plans with. :Game Scenes: Flight .. note:: Ignored with :meth:`PSGSettings.getAutoAero()`. .. method:: double getReferenceArea() .. method:: void setReferenceArea(double value) The reference area guidance plans with, in :math:`\mathrm{m^{2}}`. :Game Scenes: Flight .. note:: Ignored with :meth:`PSGSettings.getAutoAero()`. .. method:: boolean getAutoAero() .. method:: void setAutoAero(boolean value) Whether guidance works out :meth:`PSGSettings.getDragCoefficient()` and :meth:`PSGSettings.getReferenceArea()` from the vessel before each solve. :Game Scenes: Flight .. method:: double getLimitQAlpha() .. method:: void setLimitQAlpha(double value) The limit on dynamic pressure times angle of attack, in :math:`\mathrm{Pa \cdot rad}`. :Game Scenes: Flight .. note:: 0 turns the limit off. MechJeb clamps it to at most 10000. .. method:: double getMinDeltaV() .. method:: void setMinDeltaV(double value) The smallest delta-v of a stage that guidance plans with, in :math:`\mathrm{m/s}`. :Game Scenes: Flight .. method:: double getMaxCoast() .. method:: void setMaxCoast(double value) The longest coast guidance plans, in seconds. :Game Scenes: Flight .. method:: double getMinCoast() .. method:: void setMinCoast(double value) The shortest coast guidance plans, in seconds. :Game Scenes: Flight .. method:: double getUllageLeadTime() .. method:: void setUllageLeadTime(double value) The time before an ignition at which RCS settles the propellant, in seconds. :Game Scenes: Flight .. method:: double getSpinupLeadTime() .. method:: void setSpinupLeadTime(double value) The time before staging at which the spin-up starts, in seconds. :Game Scenes: Flight .. method:: double getSpinupAngularVelocity() .. method:: void setSpinupAngularVelocity(double value) The angular velocity of the spin-up, in :math:`\mathrm{rad/s}`. :Game Scenes: Flight .. note:: MechJeb's window shows it in revolutions per minute. .. method:: boolean getHasSolution() Whether guidance has a solution. :Game Scenes: Flight .. method:: String getGuidanceStatus() The status of guidance. :Game Scenes: Flight .. method:: double getTimeToGo() The time to the end of the current burn of the solution, in seconds. :Game Scenes: Flight .. note:: Requires :meth:`PSGSettings.getHasSolution()`. .. method:: double getVelocityToGo() The delta-v left in the solution, in :math:`\mathrm{m/s}`. :Game Scenes: Flight .. note:: Requires :meth:`PSGSettings.getHasSolution()`. .. method:: double getPitch() The pitch guidance commands, in degrees. :Game Scenes: Flight .. note:: Requires :meth:`PSGSettings.getHasSolution()`. .. method:: double getHeading() The heading guidance commands, in degrees. :Game Scenes: Flight .. note:: Requires :meth:`PSGSettings.getHasSolution()`. ClassicPath ----------- .. type:: public class ClassicPath The settings of the classic ascent path, from the Ascent Path Editor window and the Ascent Settings window. .. method:: double getTurnStartAltitude() .. method:: void setTurnStartAltitude(double value) The altitude at which the turn starts, in meters. :Game Scenes: Flight .. method:: double getTurnStartVelocity() .. method:: void setTurnStartVelocity(double value) The speed at which the turn starts, in :math:`\mathrm{m/s}`. :Game Scenes: Flight .. method:: double getTurnEndAltitude() .. method:: void setTurnEndAltitude(double value) The altitude at which the turn ends, in meters. :Game Scenes: Flight .. method:: double getTurnEndAngle() .. method:: void setTurnEndAngle(double value) The final flight path angle, in degrees. :Game Scenes: Flight .. method:: double getTurnShapeExponent() .. method:: void setTurnShapeExponent(double value) The steepness of the turn, between 0 and 1. :Game Scenes: Flight .. method:: boolean getAutoPath() .. method:: void setAutoPath(boolean value) Whether the autopilot chooses the turn altitudes and speed. :Game Scenes: Flight .. method:: float getAutoTurnPercent() .. method:: void setAutoTurnPercent(float value) The altitude at which an automatic turn starts, as a fraction of the height of the atmosphere. :Game Scenes: Flight .. note:: Requires :meth:`ClassicPath.getAutoPath()`. .. method:: float getAutoTurnSpeedFactor() .. method:: void setAutoTurnSpeedFactor(float value) The factor that sets the speed at which an automatic turn starts. :Game Scenes: Flight .. note:: Requires :meth:`ClassicPath.getAutoPath()`. .. method:: double getAutoTurnStartAltitude() The altitude at which an automatic turn starts, in meters. :Game Scenes: Flight .. method:: double getAutoTurnStartVelocity() The speed at which an automatic turn starts, in :math:`\mathrm{m/s}`. :Game Scenes: Flight .. method:: double getAutoTurnEndAltitude() The altitude at which an automatic turn ends, in meters. :Game Scenes: Flight .. method:: boolean getCorrectiveSteering() .. method:: void setCorrectiveSteering(boolean value) Whether the autopilot steers by the velocity vector rather than the position vector. :Game Scenes: Flight .. note:: It is more accurate, though large craft may do better without it. .. method:: double getCorrectiveSteeringGain() .. method:: void setCorrectiveSteeringGain(double value) The gain of the corrective steering. :Game Scenes: Flight .. note:: Requires :meth:`ClassicPath.getCorrectiveSteering()`. .. method:: boolean getLimitAngleOfAttack() .. method:: void setLimitAngleOfAttack(boolean value) Whether to limit the angle of attack. :Game Scenes: Flight .. method:: double getMaxAngleOfAttack() .. method:: void setMaxAngleOfAttack(double value) The largest angle of attack, in degrees. :Game Scenes: Flight .. note:: Requires :meth:`ClassicPath.getLimitAngleOfAttack()`. .. method:: double getAngleOfAttackLimitFadeoutPressure() .. method:: void setAngleOfAttackLimitFadeoutPressure(double value) The dynamic pressure below which the angle of attack limit fades out, in pascals. :Game Scenes: Flight .. note:: Requires :meth:`ClassicPath.getLimitAngleOfAttack()`. .. method:: boolean getSkipCircularization() .. method:: void setSkipCircularization(boolean value) Whether to skip the circularization burn. :Game Scenes: Flight