AscentAutopilot

class MechJeb.AscentAutopilot

This module controls the Ascent Guidance in MechJeb 2.

Note

See MechJeb2 wiki for more guidance on how to optimally set up this autopilot.

enabled: boolean
Attribute:

Can be read or written

Return type:

boolean

status: string

The autopilot status; it depends on the selected ascent path.

Attribute:

Read-only, cannot be set

Return type:

string

ascent_path_index: number

The selected ascent path.

0 = MechJeb.AscentClassic (Classic Ascent Profile)

1 = MechJeb.AscentGT (Stock-style GravityTurn)

2 = MechJeb.AscentPVG (Primer Vector Guidance (RSS/RO))

Attribute:

Can be read or written

Return type:

number

ascent_path_classic: MechJeb.AscentClassic

Get Classic Ascent Profile settings.

Attribute:

Read-only, cannot be set

Return type:

MechJeb.AscentClassic

ascent_path_gt: MechJeb.AscentGT

Get Stock-style GravityTurn profile settings.

Attribute:

Read-only, cannot be set

Return type:

MechJeb.AscentGT

ascent_path_pvg: MechJeb.AscentPVG

Get Powered Explicit Guidance (RSS/RO) profile settings.

Attribute:

Read-only, cannot be set

Return type:

MechJeb.AscentPVG

desired_inclination: number

The desired inclination in degrees for the final circular orbit.

Attribute:

Can be read or written

Return type:

number

desired_orbit_altitude: number

The desired altitude in kilometres for the final circular orbit.

Attribute:

Can be read or written

Return type:

number

thrust_controller: MechJeb.ThrustController
Attribute:

Read-only, cannot be set

Return type:

MechJeb.ThrustController

Note

Equivalent to MechJeb.thrust_controller.

force_roll: boolean

The state of force roll.

Attribute:

Can be read or written

Return type:

boolean

turn_roll: number

The turn roll used by the autopilot.

Attribute:

Can be read or written

Return type:

number

vertical_roll: number

The vertical/climb roll used by the autopilot.

Attribute:

Can be read or written

Return type:

number

limit_ao_a: boolean

Whether to limit angle of attack.

Attribute:

Can be read or written

Return type:

boolean

max_ao_a: number

The maximal angle of attack used by the autopilot.

Attribute:

Can be read or written

Return type:

number

ao_a_limit_fadeout_pressure: number

The pressure value when AoA limit is automatically deactivated.

Attribute:

Can be read or written

Return type:

number

corrective_steering: boolean

Will cause the craft to steer based on the more accurate velocity vector rather than positional vector (large craft may actually perform better with this box unchecked).

Attribute:

Can be read or written

Return type:

boolean

corrective_steering_gain: number

The gain of corrective steering used by the autopilot.

Attribute:

Can be read or written

Return type:

number

autostage: boolean

The autopilot will automatically stage when the current stage has run out of fuel. Paramethers can be set in MechJeb.StagingController.

Attribute:

Can be read or written

Return type:

boolean

staging_controller: MechJeb.StagingController
Attribute:

Read-only, cannot be set

Return type:

MechJeb.StagingController

Note

Equivalent to MechJeb.staging_controller.

autodeploy_solar_panels: boolean

Whether to deploy solar panels automatically when the ascent finishes.

Attribute:

Can be read or written

Return type:

boolean

auto_deploy_antennas: boolean

Whether to deploy antennas automatically when the ascent finishes.

Attribute:

Can be read or written

Return type:

boolean

skip_circularization: boolean

Whether to skip circularization burn and do only the ascent.

Attribute:

Can be read or written

Return type:

boolean

warp_count_down: number
Attribute:

Can be read or written

Return type:

number

launch_lan_difference: number
Attribute:

Can be read or written

Return type:

number

launch_phase_angle: number
Attribute:

Can be read or written

Return type:

number

launch_mode: MechJeb.AscentLaunchMode

Current autopilot mode. Useful for determining whether the autopilot is performing a timed launch or not.

Attribute:

Read-only, cannot be set

Return type:

MechJeb.AscentLaunchMode

abort_timed_launch()

Abort a known timed launch when it has not started yet

launch_to_rendezvous()

Launch to rendezvous with the selected target.

launch_to_target_plane()

Launch into the plane of the selected target.

class MechJeb.AscentLaunchMode
normal

The autopilot is not performing a timed launch.

rendezvous

The autopilot is performing a timed launch to rendezvous with the target vessel.

target_plane

The autopilot is performing a timed launch to target plane.

unknown

The autopilot is performing an unknown timed launch.

AscentClassic

class MechJeb.AscentClassic

The Classic Ascent Profile.

auto_path: boolean

Whether to enable automatic altitude turn.

Attribute:

Can be read or written

Return type:

boolean

auto_turn_percent: number

A value between 0 and 1.

Attribute:

Can be read or written

Return type:

number

auto_turn_speed_factor: number

A value between 0 and 1.

Attribute:

Can be read or written

Return type:

number

auto_turn_start_altitude: number
Attribute:

Read-only, cannot be set

Return type:

number

auto_turn_start_velocity: number
Attribute:

Read-only, cannot be set

Return type:

number

auto_turn_end_altitude: number
Attribute:

Read-only, cannot be set

Return type:

number

turn_start_altitude: number

The turn starts when this altitude is reached.

Attribute:

Can be read or written

Return type:

number

turn_start_velocity: number

The turn starts when this velocity is reached.

Attribute:

Can be read or written

Return type:

number

turn_end_altitude: number

The turn ends when this altitude is reached.

Attribute:

Can be read or written

Return type:

number

turn_end_angle: number

The final flight path angle.

Attribute:

Can be read or written

Return type:

number

turn_shape_exponent: number

A value between 0 - 1 describing how steep the turn is.

Attribute:

Can be read or written

Return type:

number

AscentGT

class MechJeb.AscentGT

This profile is similar to the gravity turn mod. It is a 3-burn to orbit style of launch that can get to orbit with about 2800 dV on stock Kerbin. If you want to have fun make a rocket that is basically a nose cone, a jumbo-64 a mainsail and some fairly big fins, have the pitch program flip it over aggressively (uncheck the AoA limiter, set the values to like 0.5 / 50 / 40 / 45 / 1) and let it rip.

Note

It’s not precisely the GT mod algorithm and it does not do any pitch-up during the intermediate burn right now, so it won’t handle low TWR upper stages.

hold_ap_time: number

At the intermediate altitude with this much time-to-apoapsis left the engine will start burning prograde to lift the apoapsis. The engine will throttle down in order to burn closer to the apoapsis. This is very similar to the lead-time of a maneuver node in concept, but with throttling down in the case where the player has initiated the burn too early (the corollary is that if you see lots of throttling down at the start, you likely need less HoldAP time).

Attribute:

Can be read or written

Return type:

number

intermediate_altitude: number

Intermediate apoapsis altitude to coast to and then raise the apoapsis up to the eventual final target. May be set to equal the final target in order to skip the intermediate phase.

Attribute:

Can be read or written

Return type:

number

turn_start_altitude: number

Altitude in km to pitch over and initiate the Gravity Turn (higher values for lower-TWR rockets).

Attribute:

Can be read or written

Return type:

number

turn_start_pitch: number

Pitch that the pitch program immediately applies.

Attribute:

Can be read or written

Return type:

number

turn_start_velocity: number

Velocity in m/s which triggers pitch over and initiates the Gravity Turn (higher values for lower-TWR rockets).

Attribute:

Can be read or written

Return type:

number

AscentPVG

class MechJeb.AscentPVG

The Primer Vector Guidance (RSS/RO) profile.

attach_alt_flag: boolean
Attribute:

Can be read or written

Return type:

boolean

desired_apoapsis: number

The target apoapsis in meters.

Attribute:

Can be read or written

Return type:

number

desired_attach_alt: number
Attribute:

Can be read or written

Return type:

number

dynamic_pressure_trigger: number
Attribute:

Can be read or written

Return type:

number

fixed_coast: boolean
Attribute:

Can be read or written

Return type:

boolean

fixed_coast_length: number
Attribute:

Can be read or written

Return type:

number

pitch_rate: number
Attribute:

Can be read or written

Return type:

number

pitch_start_velocity: number
Attribute:

Can be read or written

Return type:

number

staging_trigger: number
Attribute:

Can be read or written

Return type:

number

staging_trigger_flag: boolean
Attribute:

Can be read or written

Return type:

boolean