.. default-domain:: cs .. highlight:: csharp .. namespace:: KRPC.Client.Services.MechJeb AscentGuidance ============== .. class:: AscentGuidance The Ascent Guidance window, which flies the vessel to orbit. .. note:: See the `MechJeb wiki `_ for how to set up this autopilot. .. property:: bool Enabled { get; set; } Whether the module is enabled. :Game Scenes: Flight .. property:: string Status { get; } The autopilot status, which depends on the selected ascent type. :Game Scenes: Flight .. property:: AscentType AscentType { get; set; } The ascent type. :Game Scenes: Flight .. note:: Setting it disengages the autopilot of the other type. .. property:: AscentSettings Settings { get; } The Ascent Settings window. :Game Scenes: Flight .. property:: PSGSettings PSGSettings { get; } The settings of the :value:`AscentType.PSG` ascent, from the Ascent Settings window and the PSG Stages window. :Game Scenes: Flight .. property:: ClassicPath ClassicPath { get; } The Ascent Path Editor window, with the settings of the :value:`AscentType.Classic` ascent. :Game Scenes: Flight .. property:: double DesiredOrbitAltitude { get; set; } The altitude of the final circular orbit, in meters. :Game Scenes: Flight .. note:: Applies to the :value:`AscentType.Classic` ascent. .. property:: double DesiredInclination { get; set; } The inclination of the final orbit, in degrees. :Game Scenes: Flight .. property:: double PeriapsisAltitude { get; set; } The altitude of the periapsis of the target orbit, in meters. :Game Scenes: Flight .. note:: Applies to the :value:`AscentType.PSG` ascent. .. property:: double ApoapsisAltitude { get; set; } The altitude of the apoapsis of the target orbit, in meters. :Game Scenes: Flight .. note:: Applies to the :value:`AscentType.PSG` ascent. A value below :prop:`AscentGuidance.PeriapsisAltitude`, such as 0, gives a circular orbit, and a negative value a hyperbolic one. .. property:: bool BurnoutAltitudeFlag { get; set; } Whether to reach the target orbit at :prop:`AscentGuidance.BurnoutAltitude`. :Game Scenes: Flight .. note:: Applies to the :value:`AscentType.PSG` ascent. When every stage has a fixed burn time, the ascent always burns out at :prop:`AscentGuidance.BurnoutAltitude`. .. property:: double BurnoutAltitude { get; set; } 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 :value:`AscentType.PSG` ascent. See :prop:`AscentGuidance.BurnoutAltitudeFlag`. .. property:: double FlightPathAngle { get; set; } The flight path angle at burnout, in degrees. :Game Scenes: Flight .. note:: Applies to the :value:`AscentType.PSG` ascent, when every stage has a fixed burn time. .. property:: bool ArgumentOfPeriapsisFlag { get; set; } Whether to aim for :prop:`AscentGuidance.ArgumentOfPeriapsis`. :Game Scenes: Flight .. note:: Applies to the :value:`AscentType.PSG` ascent. .. property:: double ArgumentOfPeriapsis { get; set; } The argument of periapsis of the target orbit, in degrees. :Game Scenes: Flight .. note:: Applies to the :value:`AscentType.PSG` ascent. Requires :prop:`AscentGuidance.ArgumentOfPeriapsisFlag`. .. property:: double DesiredLan { get; set; } The longitude of the ascending node of a launch to a LAN, in degrees. See :meth:`AscentGuidance.LaunchToLan`. :Game Scenes: Flight .. property:: double LaunchLANDifference { get; set; } The difference from the target's longitude of the ascending node of a launch into the target's plane, in degrees. :Game Scenes: Flight .. property:: bool OverrideWarpToPlane { get; set; } Whether a timed launch launches at once, rather than at the time it computes. :Game Scenes: Flight .. property:: int WarpCountDown { get; set; } The time before a timed launch at which time warp stops, in seconds. :Game Scenes: Flight .. property:: AscentLaunchMode LaunchMode { get; } The launch mode, which gives whether a timed launch is counting down. :Game Scenes: Flight .. property:: double TimeToLaunch { get; } The time until a timed launch, in seconds. :Game Scenes: Flight .. note:: Requires a :prop:`AscentGuidance.LaunchMode` other than :value:`AscentLaunchMode.Normal`. .. function:: void AbortTimedLaunch() Abort a timed launch. :Game Scenes: Flight .. function:: void LaunchToTargetPlane() Count down to a launch into the plane of the target, and set :prop:`AscentGuidance.DesiredInclination` 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. .. function:: void LaunchToTargetLan() Count down to a launch into the plane with the target's longitude of the ascending node, less :prop:`AscentGuidance.LaunchLANDifference`, and inclination :prop:`AscentGuidance.DesiredInclination`. Throws an exception if there is no target orbiting the body the vessel is on, or the ascent type is not :value:`AscentType.PSG`. :Game Scenes: Flight .. note:: The countdown runs while the autopilot is enabled. .. function:: void LaunchToLan() Count down to a launch into the plane with longitude of the ascending node :prop:`AscentGuidance.DesiredLan` and inclination :prop:`AscentGuidance.DesiredInclination`. Throws an exception if the ascent type is not :value:`AscentType.PSG`. :Game Scenes: Flight .. note:: The countdown runs while the autopilot is enabled. .. enum:: AscentType The ascent type. See :prop:`AscentGuidance.AscentType`. .. enumerator:: Classic The classic ascent path. See :prop:`AscentGuidance.ClassicPath`. .. enumerator:: PSG Polynomial SQP Guidance, an optimized ascent, for RSS/RO. See :prop:`AscentGuidance.PSGSettings`. .. enum:: AscentLaunchMode The launch mode of the ascent autopilot. See :prop:`AscentGuidance.LaunchMode`. .. enumerator:: Normal No timed launch is counting down. .. enumerator:: TargetPlane A timed launch into the plane of the target. See :meth:`AscentGuidance.LaunchToTargetPlane`. .. enumerator:: TargetLan A timed launch to the target's longitude of the ascending node. See :meth:`AscentGuidance.LaunchToTargetLan`. .. enumerator:: Lan A timed launch to a longitude of the ascending node. See :meth:`AscentGuidance.LaunchToLan`. AscentSettings -------------- .. class:: AscentSettings The Ascent Settings window, which holds the settings shared by the ascent types. .. property:: bool ForceRoll { get; set; } Whether the autopilot controls the roll. :Game Scenes: Flight .. property:: double VerticalRoll { get; set; } The roll during the vertical climb, in degrees. :Game Scenes: Flight .. note:: Requires :prop:`AscentSettings.ForceRoll`. .. property:: double TurnRoll { get; set; } The roll during the turn, in degrees. :Game Scenes: Flight .. note:: Requires :prop:`AscentSettings.ForceRoll`. .. property:: double RollAltitude { get; set; } The altitude above which the autopilot controls the roll, in meters. :Game Scenes: Flight .. note:: Requires :prop:`AscentSettings.ForceRoll`. .. property:: bool AutoDeploySolarPanels { get; set; } Whether the ascent keeps the solar panels retracted in the atmosphere, and extends them above it. :Game Scenes: Flight .. property:: bool AutoDeployAntennas { get; set; } Whether the ascent keeps the antennas retracted in the atmosphere, and extends them above it. :Game Scenes: Flight .. property:: bool Autostage { get; set; } Whether the autopilot stages when the current stage runs out of fuel. :Game Scenes: Flight .. property:: AscentStaging Staging { get; } The staging settings of the ascent, which apply in place of :prop:`Utilities.Staging` while the autopilot is enabled. :Game Scenes: Flight .. property:: AscentThrustLimits Thrust { get; } The throttle limits of the ascent, which apply in place of :prop:`Utilities.Thrust` while the autopilot is enabled. :Game Scenes: Flight .. property:: bool Autowarp { get; set; } Whether to warp time during the launch countdown and the coasts of the ascent. :Game Scenes: Flight .. property:: bool LimitingAngleOfAttack { get; } Whether the angle of attack limit is limiting the steering. :Game Scenes: Flight .. property:: double CurrentMaxAngleOfAttack { get; } The largest angle of attack the limit allows now, in degrees. :Game Scenes: Flight AscentStaging ------------- .. class:: AscentStaging The staging settings of the ascent, from the Ascent Settings window. .. note:: The ascent starts with a copy of :prop:`Utilities.Staging`, and keeps its own settings after that. .. property:: double AutostagePreDelay { get; set; } The delay before each staging, in seconds. :Game Scenes: Flight .. property:: double AutostagePostDelay { get; set; } The delay after each staging, in seconds. :Game Scenes: Flight .. property:: int AutostageLimit { get; set; } The last stage the ascent activates. :Game Scenes: Flight .. property:: bool FairingMaxDynamicPressureEnabled { get; set; } Whether to wait for :prop:`AscentStaging.FairingMaxDynamicPressure` to jettison a fairing. :Game Scenes: Flight .. property:: double FairingMaxDynamicPressure { get; set; } The largest dynamic pressure at which the ascent jettisons a fairing, in pascals. :Game Scenes: Flight .. note:: Requires :prop:`AscentStaging.FairingMaxDynamicPressureEnabled`. .. property:: bool FairingMinAltitudeEnabled { get; set; } Whether to wait for :prop:`AscentStaging.FairingMinAltitude` to jettison a fairing. :Game Scenes: Flight .. property:: double FairingMinAltitude { get; set; } The lowest altitude at which the ascent jettisons a fairing, in meters. :Game Scenes: Flight .. note:: Requires :prop:`AscentStaging.FairingMinAltitudeEnabled`. .. property:: bool FairingMaxAerothermalFluxEnabled { get; set; } Whether to wait for :prop:`AscentStaging.FairingMaxAerothermalFlux` to jettison a fairing. :Game Scenes: Flight .. property:: double FairingMaxAerothermalFlux { get; set; } The largest aerothermal flux at which the ascent jettisons a fairing, in :math:`\mathrm{W/m^{2}}`. :Game Scenes: Flight .. note:: Requires :prop:`AscentStaging.FairingMaxAerothermalFluxEnabled`. .. property:: double ClampAutoStageThrustPct { get; set; } The fraction of full thrust at which the ascent releases the launch clamps. :Game Scenes: Flight .. property:: bool HotStaging { get; set; } Whether the ascent ignites the next stage before the current one burns out. :Game Scenes: Flight .. property:: double HotStagingLeadTime { get; set; } The time before burnout at which a hot staging happens, in seconds. :Game Scenes: Flight .. note:: Requires :prop:`AscentStaging.HotStaging`. .. property:: bool DropSolids { get; set; } Whether the ascent drops the solid boosters of the next stage early, once their thrust no longer pays for their mass. :Game Scenes: Flight .. property:: double DropSolidsTwrPct { get; set; } 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 :prop:`AscentStaging.DropSolids`. AscentThrustLimits ------------------ .. class:: AscentThrustLimits The throttle limits of the ascent, from the Ascent Settings window. .. note:: The ascent starts with a copy of :prop:`Utilities.Thrust`, and keeps its own limits after that. The :value:`AscentType.PSG` ascent ignores :prop:`AscentThrustLimits.LimitThrottle` and :prop:`AscentThrustLimits.ElectricThrottle`. .. property:: bool LimitToPreventOverheats { get; set; } Whether to limit the throttle to keep parts from overheating. :Game Scenes: Flight .. property:: bool LimitDynamicPressure { get; set; } Whether to limit the dynamic pressure. :Game Scenes: Flight .. property:: double MaxDynamicPressure { get; set; } The largest dynamic pressure, in pascals. :Game Scenes: Flight .. note:: Requires :prop:`AscentThrustLimits.LimitDynamicPressure`. .. property:: bool LimitAcceleration { get; set; } Whether to limit the acceleration. :Game Scenes: Flight .. property:: double MaxAcceleration { get; set; } The largest acceleration, in :math:`\mathrm{m/s^{2}}`. :Game Scenes: Flight .. note:: Requires :prop:`AscentThrustLimits.LimitAcceleration`. .. property:: bool LimitThrottle { get; set; } Whether to limit the throttle. :Game Scenes: Flight .. property:: double MaxThrottle { get; set; } The largest throttle, between 0 and 1. :Game Scenes: Flight .. note:: Requires :prop:`AscentThrustLimits.LimitThrottle`. .. property:: bool LimiterMinThrottle { get; set; } Whether to keep the throttle above :prop:`AscentThrustLimits.MinThrottle`. :Game Scenes: Flight .. property:: double MinThrottle { get; set; } The smallest throttle, between 0 and 1. :Game Scenes: Flight .. note:: Requires :prop:`AscentThrustLimits.LimiterMinThrottle`. .. property:: bool ElectricThrottle { get; set; } Whether to limit the throttle of electric engines to the available power. :Game Scenes: Flight .. property:: double ElectricThrottleLo { get; set; } The charge level at which electric engines stop, between 0 and 1. :Game Scenes: Flight .. note:: Requires :prop:`AscentThrustLimits.ElectricThrottle`. .. property:: double ElectricThrottleHi { get; set; } The charge level at which electric engines run at full throttle, between 0 and 1. :Game Scenes: Flight .. note:: Requires :prop:`AscentThrustLimits.ElectricThrottle`. .. property:: bool LimitToPreventUnstableIgnition { get; set; } 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. .. property:: bool AutoRCSUllaging { get; set; } 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 ----------- .. 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`. .. property:: double PitchStartHeight { get; set; } The height above the launch site at which the pitch program starts, in meters. :Game Scenes: Flight .. property:: double PitchRate { get; set; } The pitch rate of the pitch program, in :math:`\mathrm{deg/s}`. :Game Scenes: Flight .. property:: double DragCoefficient { get; set; } The drag coefficient guidance plans with. :Game Scenes: Flight .. note:: Ignored with :prop:`PSGSettings.AutoAero`. .. property:: double ReferenceArea { get; set; } The reference area guidance plans with, in :math:`\mathrm{m^{2}}`. :Game Scenes: Flight .. note:: Ignored with :prop:`PSGSettings.AutoAero`. .. property:: bool AutoAero { get; set; } Whether guidance works out :prop:`PSGSettings.DragCoefficient` and :prop:`PSGSettings.ReferenceArea` from the vessel before each solve. :Game Scenes: Flight .. property:: double LimitQAlpha { get; set; } 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. .. property:: double MinDeltaV { get; set; } The smallest delta-v of a stage that guidance plans with, in :math:`\mathrm{m/s}`. :Game Scenes: Flight .. property:: double MaxCoast { get; set; } The longest coast guidance plans, in seconds. :Game Scenes: Flight .. property:: double MinCoast { get; set; } The shortest coast guidance plans, in seconds. :Game Scenes: Flight .. property:: double UllageLeadTime { get; set; } The time before an ignition at which RCS settles the propellant, in seconds. :Game Scenes: Flight .. property:: double SpinupLeadTime { get; set; } The time before staging at which the spin-up starts, in seconds. :Game Scenes: Flight .. property:: double SpinupAngularVelocity { get; set; } 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. .. property:: bool HasSolution { get; } Whether guidance has a solution. :Game Scenes: Flight .. property:: string GuidanceStatus { get; } The status of guidance. :Game Scenes: Flight .. property:: double TimeToGo { get; } The time to the end of the current burn of the solution, in seconds. :Game Scenes: Flight .. note:: Requires :prop:`PSGSettings.HasSolution`. .. property:: double VelocityToGo { get; } The delta-v left in the solution, in :math:`\mathrm{m/s}`. :Game Scenes: Flight .. note:: Requires :prop:`PSGSettings.HasSolution`. .. property:: double Pitch { get; } The pitch guidance commands, in degrees. :Game Scenes: Flight .. note:: Requires :prop:`PSGSettings.HasSolution`. .. property:: double Heading { get; } The heading guidance commands, in degrees. :Game Scenes: Flight .. note:: Requires :prop:`PSGSettings.HasSolution`. ClassicPath ----------- .. class:: ClassicPath The settings of the classic ascent path, from the Ascent Path Editor window and the Ascent Settings window. .. property:: double TurnStartAltitude { get; set; } The altitude at which the turn starts, in meters. :Game Scenes: Flight .. property:: double TurnStartVelocity { get; set; } The speed at which the turn starts, in :math:`\mathrm{m/s}`. :Game Scenes: Flight .. property:: double TurnEndAltitude { get; set; } The altitude at which the turn ends, in meters. :Game Scenes: Flight .. property:: double TurnEndAngle { get; set; } The final flight path angle, in degrees. :Game Scenes: Flight .. property:: double TurnShapeExponent { get; set; } The steepness of the turn, between 0 and 1. :Game Scenes: Flight .. property:: bool AutoPath { get; set; } Whether the autopilot chooses the turn altitudes and speed. :Game Scenes: Flight .. property:: float AutoTurnPercent { get; set; } The altitude at which an automatic turn starts, as a fraction of the height of the atmosphere. :Game Scenes: Flight .. note:: Requires :prop:`ClassicPath.AutoPath`. .. property:: float AutoTurnSpeedFactor { get; set; } The factor that sets the speed at which an automatic turn starts. :Game Scenes: Flight .. note:: Requires :prop:`ClassicPath.AutoPath`. .. property:: double AutoTurnStartAltitude { get; } The altitude at which an automatic turn starts, in meters. :Game Scenes: Flight .. property:: double AutoTurnStartVelocity { get; } The speed at which an automatic turn starts, in :math:`\mathrm{m/s}`. :Game Scenes: Flight .. property:: double AutoTurnEndAltitude { get; } The altitude at which an automatic turn ends, in meters. :Game Scenes: Flight .. property:: bool CorrectiveSteering { get; set; } 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. .. property:: double CorrectiveSteeringGain { get; set; } The gain of the corrective steering. :Game Scenes: Flight .. note:: Requires :prop:`ClassicPath.CorrectiveSteering`. .. property:: bool LimitAngleOfAttack { get; set; } Whether to limit the angle of attack. :Game Scenes: Flight .. property:: double MaxAngleOfAttack { get; set; } The largest angle of attack, in degrees. :Game Scenes: Flight .. note:: Requires :prop:`ClassicPath.LimitAngleOfAttack`. .. property:: double AngleOfAttackLimitFadeoutPressure { get; set; } The dynamic pressure below which the angle of attack limit fades out, in pascals. :Game Scenes: Flight .. note:: Requires :prop:`ClassicPath.LimitAngleOfAttack`. .. property:: bool SkipCircularization { get; set; } Whether to skip the circularization burn. :Game Scenes: Flight