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.

enabled#

Whether the module is enabled.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

status#

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

Attribute:

Read-only, cannot be set

Return type:

str

Game Scenes:

Flight

ascent_type#

The ascent type.

Attribute:

Can be read or written

Return type:

AscentType

Game Scenes:

Flight

Note

Setting it disengages the autopilot of the other type.

settings#

The Ascent Settings window.

Attribute:

Read-only, cannot be set

Return type:

AscentSettings

Game Scenes:

Flight

psg_settings#

The settings of the AscentType.psg ascent, from the Ascent Settings window and the PSG Stages window.

Attribute:

Read-only, cannot be set

Return type:

PSGSettings

Game Scenes:

Flight

classic_path#

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

Attribute:

Read-only, cannot be set

Return type:

ClassicPath

Game Scenes:

Flight

desired_orbit_altitude#

The altitude of the final circular orbit, in meters.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

Note

Applies to the AscentType.classic ascent.

desired_inclination#

The inclination of the final orbit, in degrees.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

periapsis_altitude#

The altitude of the periapsis of the target orbit, in meters.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

Note

Applies to the AscentType.psg ascent.

apoapsis_altitude#

The altitude of the apoapsis of the target orbit, in meters.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

Note

Applies to the AscentType.psg ascent. A value below AscentGuidance.periapsis_altitude, such as 0, gives a circular orbit, and a negative value a hyperbolic one.

burnout_altitude_flag#

Whether to reach the target orbit at AscentGuidance.burnout_altitude.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

Note

Applies to the AscentType.psg ascent. When every stage has a fixed burn time, the ascent always burns out at AscentGuidance.burnout_altitude.

burnout_altitude#

The altitude at which the ascent reaches the target orbit, in meters. MechJeb’s window calls it the attach altitude.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

Note

Applies to the AscentType.psg ascent. See AscentGuidance.burnout_altitude_flag.

flight_path_angle#

The flight path angle at burnout, in degrees.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

Note

Applies to the AscentType.psg ascent, when every stage has a fixed burn time.

argument_of_periapsis_flag#

Whether to aim for AscentGuidance.argument_of_periapsis.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

Note

Applies to the AscentType.psg ascent.

argument_of_periapsis#

The argument of periapsis of the target orbit, in degrees.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

Note

Applies to the AscentType.psg ascent. Requires AscentGuidance.argument_of_periapsis_flag.

desired_lan#

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

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

launch_lan_difference#

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

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

override_warp_to_plane#

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

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

warp_count_down#

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

Attribute:

Can be read or written

Return type:

int

Game Scenes:

Flight

launch_mode#

The launch mode, which gives whether a timed launch is counting down.

Attribute:

Read-only, cannot be set

Return type:

AscentLaunchMode

Game Scenes:

Flight

time_to_launch#

The time until a timed launch, in seconds.

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

abort_timed_launch()#

Abort a timed launch.

Game Scenes:

Flight

launch_to_target_plane()#

Count down to a launch into the plane of the target, and set AscentGuidance.desired_inclination 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.

launch_to_target_lan()#

Count down to a launch into the plane with the target’s longitude of the ascending node, less AscentGuidance.launch_lan_difference, and inclination AscentGuidance.desired_inclination. Throws an exception if there is no target orbiting the body the vessel is on, or the ascent type is not AscentType.psg.

Game Scenes:

Flight

Note

The countdown runs while the autopilot is enabled.

launch_to_lan()#

Count down to a launch into the plane with longitude of the ascending node AscentGuidance.desired_lan and inclination AscentGuidance.desired_inclination. Throws an exception if the ascent type is not AscentType.psg.

Game Scenes:

Flight

Note

The countdown runs while the autopilot is enabled.

class MechJeb.AscentType#

The ascent type. See AscentGuidance.ascent_type.

classic#

The classic ascent path. See AscentGuidance.classic_path.

psg#

Polynomial SQP Guidance, an optimized ascent, for RSS/RO. See AscentGuidance.psg_settings.

class MechJeb.AscentLaunchMode#

The launch mode of the ascent autopilot. See AscentGuidance.launch_mode.

normal#

No timed launch is counting down.

target_plane#

A timed launch into the plane of the target. See AscentGuidance.launch_to_target_plane().

target_lan#

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

lan#

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

AscentSettings#

class MechJeb.AscentSettings#

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

force_roll#

Whether the autopilot controls the roll.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

vertical_roll#

The roll during the vertical climb, in degrees.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

Note

Requires AscentSettings.force_roll.

turn_roll#

The roll during the turn, in degrees.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

Note

Requires AscentSettings.force_roll.

roll_altitude#

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

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

Note

Requires AscentSettings.force_roll.

auto_deploy_solar_panels#

Whether the ascent keeps the solar panels retracted in the atmosphere, and extends them above it.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

auto_deploy_antennas#

Whether the ascent keeps the antennas retracted in the atmosphere, and extends them above it.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

autostage#

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

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

staging#

The staging settings of the ascent, which apply in place of Utilities.staging while the autopilot is enabled.

Attribute:

Read-only, cannot be set

Return type:

AscentStaging

Game Scenes:

Flight

thrust#

The throttle limits of the ascent, which apply in place of Utilities.thrust while the autopilot is enabled.

Attribute:

Read-only, cannot be set

Return type:

AscentThrustLimits

Game Scenes:

Flight

autowarp#

Whether to warp time during the launch countdown and the coasts of the ascent.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

limiting_angle_of_attack#

Whether the angle of attack limit is limiting the steering.

Attribute:

Read-only, cannot be set

Return type:

bool

Game Scenes:

Flight

current_max_angle_of_attack#

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

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

AscentStaging#

class MechJeb.AscentStaging#

The staging settings of the ascent, from the Ascent Settings window.

Note

The ascent starts with a copy of Utilities.staging, and keeps its own settings after that.

autostage_pre_delay#

The delay before each staging, in seconds.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

autostage_post_delay#

The delay after each staging, in seconds.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

autostage_limit#

The last stage the ascent activates.

Attribute:

Can be read or written

Return type:

int

Game Scenes:

Flight

fairing_max_dynamic_pressure_enabled#

Whether to wait for AscentStaging.fairing_max_dynamic_pressure to jettison a fairing.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

fairing_max_dynamic_pressure#

The largest dynamic pressure at which the ascent jettisons a fairing, in pascals.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

fairing_min_altitude_enabled#

Whether to wait for AscentStaging.fairing_min_altitude to jettison a fairing.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

fairing_min_altitude#

The lowest altitude at which the ascent jettisons a fairing, in meters.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

fairing_max_aerothermal_flux_enabled#

Whether to wait for AscentStaging.fairing_max_aerothermal_flux to jettison a fairing.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

fairing_max_aerothermal_flux#

The largest aerothermal flux at which the ascent jettisons a fairing, in \(\mathrm{W/m^{2}}\).

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

clamp_auto_stage_thrust_pct#

The fraction of full thrust at which the ascent releases the launch clamps.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

hot_staging#

Whether the ascent ignites the next stage before the current one burns out.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

hot_staging_lead_time#

The time before burnout at which a hot staging happens, in seconds.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

Note

Requires AscentStaging.hot_staging.

drop_solids#

Whether the ascent drops the solid boosters of the next stage early, once their thrust no longer pays for their mass.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

drop_solids_twr_pct#

The fraction of the vessel’s thrust-to-weight ratio at which the solid boosters drop, between 0 and 1.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

Note

Requires AscentStaging.drop_solids.

AscentThrustLimits#

class MechJeb.AscentThrustLimits#

The throttle limits of the ascent, from the Ascent Settings window.

Note

The ascent starts with a copy of Utilities.thrust, and keeps its own limits after that. The AscentType.psg ascent ignores AscentThrustLimits.limit_throttle and AscentThrustLimits.electric_throttle.

limit_to_prevent_overheats#

Whether to limit the throttle to keep parts from overheating.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

limit_dynamic_pressure#

Whether to limit the dynamic pressure.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

max_dynamic_pressure#

The largest dynamic pressure, in pascals.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

limit_acceleration#

Whether to limit the acceleration.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

max_acceleration#

The largest acceleration, in \(\mathrm{m/s^{2}}\).

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

limit_throttle#

Whether to limit the throttle.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

max_throttle#

The largest throttle, between 0 and 1.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

limiter_min_throttle#

Whether to keep the throttle above AscentThrustLimits.min_throttle.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

min_throttle#

The smallest throttle, between 0 and 1.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

electric_throttle#

Whether to limit the throttle of electric engines to the available power.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

electric_throttle_lo#

The charge level at which electric engines stop, between 0 and 1.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

electric_throttle_hi#

The charge level at which electric engines run at full throttle, between 0 and 1.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

limit_to_prevent_unstable_ignition#

Whether to hold the throttle at zero while the engines’ fuel is unstable.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

Note

MechJeb shows this setting only with Real Fuels, as stock engines have stable fuel.

auto_rcs_ullaging#

Whether to fire the RCS forward to settle the fuel before the engines ignite.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

Note

MechJeb shows this setting only with Real Fuels, as stock engines have stable fuel.

PSGSettings#

class MechJeb.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 AscentGuidance.

pitch_start_height#

The height above the launch site at which the pitch program starts, in meters.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

pitch_rate#

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

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

drag_coefficient#

The drag coefficient guidance plans with.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

Note

Ignored with PSGSettings.auto_aero.

reference_area#

The reference area guidance plans with, in \(\mathrm{m^{2}}\).

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

Note

Ignored with PSGSettings.auto_aero.

auto_aero#

Whether guidance works out PSGSettings.drag_coefficient and PSGSettings.reference_area from the vessel before each solve.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

limit_q_alpha#

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

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

Note

0 turns the limit off. MechJeb clamps it to at most 10000.

min_delta_v#

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

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

max_coast#

The longest coast guidance plans, in seconds.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

min_coast#

The shortest coast guidance plans, in seconds.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

ullage_lead_time#

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

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

spinup_lead_time#

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

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

spinup_angular_velocity#

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

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

Note

MechJeb’s window shows it in revolutions per minute.

has_solution#

Whether guidance has a solution.

Attribute:

Read-only, cannot be set

Return type:

bool

Game Scenes:

Flight

guidance_status#

The status of guidance.

Attribute:

Read-only, cannot be set

Return type:

str

Game Scenes:

Flight

time_to_go#

The time to the end of the current burn of the solution, in seconds.

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

Note

Requires PSGSettings.has_solution.

velocity_to_go#

The delta-v left in the solution, in \(\mathrm{m/s}\).

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

Note

Requires PSGSettings.has_solution.

pitch#

The pitch guidance commands, in degrees.

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

Note

Requires PSGSettings.has_solution.

heading#

The heading guidance commands, in degrees.

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

Note

Requires PSGSettings.has_solution.

ClassicPath#

class MechJeb.ClassicPath#

The settings of the classic ascent path, from the Ascent Path Editor window and the Ascent Settings window.

turn_start_altitude#

The altitude at which the turn starts, in meters.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

turn_start_velocity#

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

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

turn_end_altitude#

The altitude at which the turn ends, in meters.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

turn_end_angle#

The final flight path angle, in degrees.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

turn_shape_exponent#

The steepness of the turn, between 0 and 1.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

auto_path#

Whether the autopilot chooses the turn altitudes and speed.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

auto_turn_percent#

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

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

Note

Requires ClassicPath.auto_path.

auto_turn_speed_factor#

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

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

Note

Requires ClassicPath.auto_path.

auto_turn_start_altitude#

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

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

auto_turn_start_velocity#

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

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

auto_turn_end_altitude#

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

Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

corrective_steering#

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

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

Note

It is more accurate, though large craft may do better without it.

corrective_steering_gain#

The gain of the corrective steering.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

limit_angle_of_attack#

Whether to limit the angle of attack.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

max_angle_of_attack#

The largest angle of attack, in degrees.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

angle_of_attack_limit_fadeout_pressure#

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

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

skip_circularization#

Whether to skip the circularization burn.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight