AscentGuidance#

class MechJeb.AscentGuidance()#

The Ascent Guidance window, which flies the vessel to orbit.

Note

See the MechJeb wiki for how to set up this autopilot.

AscentGuidance.getEnabled()#
AscentGuidance.setEnabled(value)#

Whether the module is enabled.

Property:

Can be read or written

Return type:

boolean

Game Scenes:

Flight

AscentGuidance.getStatus()#

The autopilot status, which depends on the selected ascent path.

Property:

Read-only, cannot be set

Return type:

string

Game Scenes:

Flight

AscentGuidance.getAscentType()#
AscentGuidance.setAscentType(value)#

The ascent path.

Property:

Can be read or written

Return type:

MechJeb.AscentType

Game Scenes:

Flight

AscentGuidance.getSettings()#

The Ascent Settings window.

Property:

Read-only, cannot be set

Return type:

MechJeb.AscentSettings

Game Scenes:

Flight

AscentGuidance.getPVGSettings()#

The PVG Settings window, with the settings of the MechJeb.AscentType.pvg path.

Property:

Read-only, cannot be set

Return type:

MechJeb.PVGSettings

Game Scenes:

Flight

AscentGuidance.getClassicPath()#

The Ascent Path Editor window, with the settings of the MechJeb.AscentType.classic path.

Property:

Read-only, cannot be set

Return type:

MechJeb.ClassicPath

Game Scenes:

Flight

AscentGuidance.getDesiredOrbitAltitude()#
AscentGuidance.setDesiredOrbitAltitude(value)#

The altitude of the final circular orbit, in meters.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

AscentGuidance.getDesiredApoapsis()#
AscentGuidance.setDesiredApoapsis(value)#

The target apoapsis, in meters.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

Note

Applies on the MechJeb.AscentType.pvg path.

AscentGuidance.getAttachAltFlag()#
AscentGuidance.setAttachAltFlag(value)#

Whether the orbit is attached at MechJeb.AscentGuidance.getDesiredAttachAlt().

Property:

Can be read or written

Return type:

boolean

Game Scenes:

Flight

Note

Applies on the MechJeb.AscentType.pvg path, with an early shutoff stage, set by MechJeb.PVGSettings.getOptimizeStageFlag() and MechJeb.PVGSettings.getOptimizeStage(). Without one, MechJeb always attaches the orbit.

AscentGuidance.getDesiredAttachAlt()#
AscentGuidance.setDesiredAttachAlt(value)#

The altitude at which the orbit is attached, in meters.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

Note

Applies on the MechJeb.AscentType.pvg path. Requires MechJeb.AscentGuidance.getAttachAltFlag(), unless there is no early shutoff stage. See MechJeb.PVGSettings.getOptimizeStage().

AscentGuidance.getDesiredFPA()#
AscentGuidance.setDesiredFPA(value)#

The flight path angle at orbit insertion, in degrees.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

Note

Applies on the MechJeb.AscentType.pvg path, when there is no early shutoff stage. See MechJeb.PVGSettings.getOptimizeStage().

AscentGuidance.getDesiredInclination()#
AscentGuidance.setDesiredInclination(value)#

The inclination of the final circular orbit, in degrees.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

AscentGuidance.getLaunchMode()#

The launch mode, which gives whether the autopilot is waiting for a timed launch.

Property:

Read-only, cannot be set

Return type:

MechJeb.AscentLaunchMode

Game Scenes:

Flight

AscentGuidance.launchToRendezvous()#

Launch to rendezvous with the target. Throws an exception if there is no target, or the ascent path is PVG.

Game Scenes:

Flight

AscentGuidance.getLaunchPhaseAngle()#
AscentGuidance.setLaunchPhaseAngle(value)#

The phase angle to the target of a launch to rendezvous, in degrees.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

AscentGuidance.launchToTargetPlane()#

Launch into the plane of the target. Throws an exception if there is no target.

Game Scenes:

Flight

AscentGuidance.getLaunchLANDifference()#
AscentGuidance.setLaunchLANDifference(value)#

The difference from the target’s longitude of the ascending node of a launch into the target’s plane, in degrees.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

AscentGuidance.launchToMatchLan()#

Launch into the plane of the target, at the time the target’s longitude of the ascending node, less MechJeb.AscentGuidance.getLaunchLANDifference(), passes overhead. Keeps MechJeb.AscentGuidance.getDesiredInclination(). Throws an exception if there is no target, or the ascent path is not MechJeb.AscentType.pvg.

Game Scenes:

Flight

AscentGuidance.launchToLan()#

Launch into the plane with longitude of the ascending node MechJeb.AscentGuidance.getDesiredLan() and inclination MechJeb.AscentGuidance.getDesiredInclination(). Throws an exception if the ascent path is not MechJeb.AscentType.pvg.

Game Scenes:

Flight

AscentGuidance.getDesiredLan()#
AscentGuidance.setDesiredLan(value)#

The longitude of the ascending node of a launch to a LAN, in degrees. See MechJeb.AscentGuidance.launchToLan().

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

AscentGuidance.abortTimedLaunch()#

Abort a timed launch that has not started yet. Throws an exception if the launch mode is MechJeb.AscentLaunchMode.unknown.

Game Scenes:

Flight

AscentGuidance.getWarpCountDown()#
AscentGuidance.setWarpCountDown(value)#

The time before a timed launch at which time warp stops, in seconds.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

AscentGuidance.getOverrideWarpToPlane()#
AscentGuidance.setOverrideWarpToPlane(value)#

Whether a timed launch launches at once, rather than at the time it computes.

Property:

Can be read or written

Return type:

boolean

Game Scenes:

Flight

class MechJeb.AscentType()#

The ascent path. See MechJeb.AscentGuidance.getAscentType().

AscentType.classic#

The classic ascent path. See MechJeb.AscentGuidance.getClassicPath().

AscentType.pvg#

Primer Vector Guidance, for RSS/RO. See MechJeb.AscentGuidance.getPVGSettings().

class MechJeb.AscentLaunchMode()#

The launch mode of the ascent autopilot. See MechJeb.AscentGuidance.getLaunchMode().

AscentLaunchMode.normal#

The autopilot is not performing a timed launch.

AscentLaunchMode.rendezvous#

A timed launch to rendezvous with the target vessel.

AscentLaunchMode.targetPlane#

A timed launch into the plane of the target.

AscentLaunchMode.matchLan#

A timed launch to the target’s longitude of the ascending node. See MechJeb.AscentGuidance.launchToMatchLan().

AscentLaunchMode.lan#

A timed launch to a longitude of the ascending node. See MechJeb.AscentGuidance.launchToLan().

AscentLaunchMode.unknown#

A timed launch of another kind, started from MechJeb’s window.

AscentSettings#

class MechJeb.AscentSettings()#

The Ascent Settings window, which holds the settings shared by the ascent paths.

AscentSettings.getForceRoll()#
AscentSettings.setForceRoll(value)#

Whether the autopilot controls the roll.

Property:

Can be read or written

Return type:

boolean

Game Scenes:

Flight

AscentSettings.getVerticalRoll()#
AscentSettings.setVerticalRoll(value)#

The roll during the vertical climb, in degrees.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

AscentSettings.getTurnRoll()#
AscentSettings.setTurnRoll(value)#

The roll during the turn, in degrees.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

AscentSettings.getRollAltitude()#
AscentSettings.setRollAltitude(value)#

The altitude above which the autopilot controls the roll, in meters.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

AscentSettings.getLimitAngleOfAttack()#
AscentSettings.setLimitAngleOfAttack(value)#

Whether to limit the angle of attack.

Property:

Can be read or written

Return type:

boolean

Game Scenes:

Flight

Note

Applies on the MechJeb.AscentType.classic path.

AscentSettings.getMaxAngleOfAttack()#
AscentSettings.setMaxAngleOfAttack(value)#

The largest angle of attack, in degrees.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

AscentSettings.getAngleOfAttackLimitFadeoutPressure()#
AscentSettings.setAngleOfAttackLimitFadeoutPressure(value)#

The dynamic pressure below which the angle of attack limit fades out, in pascals.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

AscentSettings.getLimitingAngleOfAttack()#

Whether the angle of attack limit is limiting the steering.

Property:

Read-only, cannot be set

Return type:

boolean

Game Scenes:

Flight

AscentSettings.getCurrentMaxAngleOfAttack()#

The largest angle of attack the limit allows now, in degrees.

Property:

Read-only, cannot be set

Return type:

number

Game Scenes:

Flight

AscentSettings.getCorrectiveSteering()#
AscentSettings.setCorrectiveSteering(value)#

Whether the autopilot steers by the velocity vector rather than the position vector.

Property:

Can be read or written

Return type:

boolean

Game Scenes:

Flight

Note

It is more accurate, though large craft may do better without it. Applies on the MechJeb.AscentType.classic path.

AscentSettings.getCorrectiveSteeringGain()#
AscentSettings.setCorrectiveSteeringGain(value)#

The gain of the corrective steering.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

AscentSettings.getAutostage()#
AscentSettings.setAutostage(value)#

Whether the autopilot stages when the current stage runs out of fuel.

Property:

Can be read or written

Return type:

boolean

Game Scenes:

Flight

AscentSettings.getStaging()#

The autostaging settings. The same object as MechJeb.Utilities.getStaging().

Property:

Read-only, cannot be set

Return type:

MechJeb.Autostaging

Game Scenes:

Flight

AscentSettings.getThrust()#

The throttle limiters. The same object as MechJeb.Utilities.getThrust().

Property:

Read-only, cannot be set

Return type:

MechJeb.ThrustLimiter

Game Scenes:

Flight

AscentSettings.getAutodeploySolarPanels()#
AscentSettings.setAutodeploySolarPanels(value)#

Whether to deploy the solar panels when the ascent finishes.

Property:

Can be read or written

Return type:

boolean

Game Scenes:

Flight

AscentSettings.getAutoDeployAntennas()#
AscentSettings.setAutoDeployAntennas(value)#

Whether to deploy the antennas when the ascent finishes.

Property:

Can be read or written

Return type:

boolean

Game Scenes:

Flight

AscentSettings.getAutowarp()#
AscentSettings.setAutowarp(value)#

Whether to warp time during the ascent.

Property:

Can be read or written

Return type:

boolean

Game Scenes:

Flight

Note

The same setting as MechJeb.ManeuverPlanner.getAutowarp().

AscentSettings.getSkipCircularization()#
AscentSettings.setSkipCircularization(value)#

Whether to skip the circularization burn.

Property:

Can be read or written

Return type:

boolean

Game Scenes:

Flight

PVGSettings#

class MechJeb.PVGSettings()#

The PVG Settings window, which holds the settings of the Primer Vector Guidance ascent path.

PVGSettings.getDynamicPressureTrigger()#
PVGSettings.setDynamicPressureTrigger(value)#

The dynamic pressure below which guidance starts, in pascals.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

PVGSettings.getFixedCoast()#
PVGSettings.setFixedCoast(value)#

Whether the coast has a fixed length.

Property:

Can be read or written

Return type:

boolean

Game Scenes:

Flight

PVGSettings.getFixedCoastLength()#
PVGSettings.setFixedCoastLength(value)#

The length of the coast, in seconds.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

PVGSettings.getMinDeltaV()#
PVGSettings.setMinDeltaV(value)#

The smallest delta-v of a stage that guidance plans with, in \(\mathrm{m/s}\).

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

PVGSettings.getLastStage()#
PVGSettings.setLastStage(value)#

The last stage that guidance plans with.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

PVGSettings.getOptimizeStageFlag()#
PVGSettings.setOptimizeStageFlag(value)#

Whether guidance may shut off MechJeb.PVGSettings.getOptimizeStage() early.

Property:

Can be read or written

Return type:

boolean

Game Scenes:

Flight

PVGSettings.getOptimizeStage()#
PVGSettings.setOptimizeStage(value)#

The stage that guidance may shut off early.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

Note

Requires MechJeb.PVGSettings.getOptimizeStageFlag(). -1 is no stage.

PVGSettings.getUnguidedStagesFlag()#
PVGSettings.setUnguidedStagesFlag(value)#

Whether guidance leaves MechJeb.PVGSettings.getUnguidedStages() unguided.

Property:

Can be read or written

Return type:

boolean

Game Scenes:

Flight

PVGSettings.getUnguidedStages()#
PVGSettings.setUnguidedStages(value)#

The stages that guidance leaves unguided.

Property:

Can be read or written

Return type:

Array of number

Game Scenes:

Flight

PVGSettings.getCoastStageFlag()#
PVGSettings.setCoastStageFlag(value)#

Whether guidance coasts in MechJeb.PVGSettings.getCoastStage().

Property:

Can be read or written

Return type:

boolean

Game Scenes:

Flight

PVGSettings.getCoastStage()#
PVGSettings.setCoastStage(value)#

The stage before or after which guidance coasts.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

PVGSettings.getCoastBeforeFlag()#
PVGSettings.setCoastBeforeFlag(value)#

Whether the coast comes before MechJeb.PVGSettings.getCoastStage(), rather than after it.

Property:

Can be read or written

Return type:

boolean

Game Scenes:

Flight

PVGSettings.getUllageLeadTime()#
PVGSettings.setUllageLeadTime(value)#

The time before an ignition at which RCS settles the propellant, in seconds.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

PVGSettings.getSpinupStageFlag()#
PVGSettings.setSpinupStageFlag(value)#

Whether to spin up the vessel before MechJeb.PVGSettings.getSpinupStage().

Property:

Can be read or written

Return type:

boolean

Game Scenes:

Flight

PVGSettings.getSpinupStage()#
PVGSettings.setSpinupStage(value)#

The stage before which to spin up the vessel.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

PVGSettings.getSpinupAngularVelocity()#
PVGSettings.setSpinupAngularVelocity(value)#

The angular velocity of the spin-up, in \(\mathrm{rad/s}\).

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

Note

Requires MechJeb.PVGSettings.getSpinupStageFlag(). MechJeb’s window shows it in revolutions per minute.

PVGSettings.getSpinupLeadTime()#
PVGSettings.setSpinupLeadTime(value)#

The time before staging at which the spin-up starts, in seconds.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

PVGSettings.getLimitQa()#
PVGSettings.setLimitQa(value)#

The limit on dynamic pressure times angle of attack, in \(\mathrm{Pa \cdot rad}\).

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

Note

MechJeb clamps it to between 0 and 10000.

PVGSettings.getPitchRate()#
PVGSettings.setPitchRate(value)#

The pitch rate of the booster, in \(\mathrm{deg/s}\).

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

PVGSettings.getPitchStartVelocity()#
PVGSettings.setPitchStartVelocity(value)#

The speed at which the booster starts to pitch over, in \(\mathrm{m/s}\).

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

PVGSettings.getStagingTrigger()#
PVGSettings.setStagingTrigger(value)#

The stage after which guidance starts.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

PVGSettings.getStagingTriggerFlag()#
PVGSettings.setStagingTriggerFlag(value)#

Whether guidance starts after MechJeb.PVGSettings.getStagingTrigger().

Property:

Can be read or written

Return type:

boolean

Game Scenes:

Flight

ClassicPath#

class MechJeb.ClassicPath()#

The Ascent Path Editor window, which holds the settings of the classic ascent path.

ClassicPath.getAutoPath()#
ClassicPath.setAutoPath(value)#

Whether the autopilot chooses the turn altitudes and speed.

Property:

Can be read or written

Return type:

boolean

Game Scenes:

Flight

ClassicPath.getAutoTurnPercent()#
ClassicPath.setAutoTurnPercent(value)#

The altitude at which an automatic turn starts, as a fraction of the height of the atmosphere.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

ClassicPath.getAutoTurnSpeedFactor()#
ClassicPath.setAutoTurnSpeedFactor(value)#

The factor that sets the speed at which an automatic turn starts.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

ClassicPath.getAutoTurnStartAltitude()#

The altitude at which an automatic turn starts, in meters.

Property:

Read-only, cannot be set

Return type:

number

Game Scenes:

Flight

ClassicPath.getAutoTurnStartVelocity()#

The speed at which an automatic turn starts, in \(\mathrm{m/s}\).

Property:

Read-only, cannot be set

Return type:

number

Game Scenes:

Flight

ClassicPath.getAutoTurnEndAltitude()#

The altitude at which an automatic turn ends, in meters.

Property:

Read-only, cannot be set

Return type:

number

Game Scenes:

Flight

ClassicPath.getTurnStartAltitude()#
ClassicPath.setTurnStartAltitude(value)#

The altitude at which the turn starts, in meters.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

ClassicPath.getTurnStartVelocity()#
ClassicPath.setTurnStartVelocity(value)#

The speed at which the turn starts, in \(\mathrm{m/s}\).

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

ClassicPath.getTurnEndAltitude()#
ClassicPath.setTurnEndAltitude(value)#

The altitude at which the turn ends, in meters.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

ClassicPath.getTurnEndAngle()#
ClassicPath.setTurnEndAngle(value)#

The final flight path angle, in degrees.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight

ClassicPath.getTurnShapeExponent()#
ClassicPath.setTurnShapeExponent(value)#

The steepness of the turn, between 0 and 1.

Property:

Can be read or written

Return type:

number

Game Scenes:

Flight