AscentAutopilot

class 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
Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

status

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

Attribute:

Read-only, cannot be set

Return type:

str

Game Scenes:

Flight

ascent_path_index

The selected ascent path.

0 = AscentClassic (Classic Ascent Profile)

1 = AscentGT (Stock-style GravityTurn)

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

Attribute:

Can be read or written

Return type:

int

Game Scenes:

Flight

ascent_path_classic

Get Classic Ascent Profile settings.

Attribute:

Read-only, cannot be set

Return type:

AscentClassic

Game Scenes:

Flight

ascent_path_gt

Get Stock-style GravityTurn profile settings.

Attribute:

Read-only, cannot be set

Return type:

AscentGT

Game Scenes:

Flight

ascent_path_pvg

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

Attribute:

Read-only, cannot be set

Return type:

AscentPVG

Game Scenes:

Flight

desired_inclination

The desired inclination in degrees for the final circular orbit.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

desired_orbit_altitude

The desired altitude in kilometres for the final circular orbit.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

thrust_controller
Attribute:

Read-only, cannot be set

Return type:

ThrustController

Game Scenes:

Flight

Note

Equivalent to thrust_controller.

force_roll

The state of force roll.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

turn_roll

The turn roll used by the autopilot.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

vertical_roll

The vertical/climb roll used by the autopilot.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

limit_ao_a

Whether to limit angle of attack.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

max_ao_a

The maximal angle of attack used by the autopilot.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

ao_a_limit_fadeout_pressure

The pressure value when AoA limit is automatically deactivated.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

corrective_steering

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:

bool

Game Scenes:

Flight

corrective_steering_gain

The gain of corrective steering used by the autopilot.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

autostage

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

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

staging_controller
Attribute:

Read-only, cannot be set

Return type:

StagingController

Game Scenes:

Flight

Note

Equivalent to staging_controller.

autodeploy_solar_panels

Whether to deploy solar panels automatically when the ascent finishes.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

auto_deploy_antennas

Whether to deploy antennas automatically when the ascent finishes.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

skip_circularization

Whether to skip circularization burn and do only the ascent.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

warp_count_down
Attribute:

Can be read or written

Return type:

int

Game Scenes:

Flight

launch_lan_difference
Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

launch_phase_angle
Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

launch_mode

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

Attribute:

Read-only, cannot be set

Return type:

AscentLaunchMode

Game Scenes:

Flight

abort_timed_launch()

Abort a known timed launch when it has not started yet

Game Scenes:

Flight

launch_to_rendezvous()

Launch to rendezvous with the selected target.

Game Scenes:

Flight

launch_to_target_plane()

Launch into the plane of the selected target.

Game Scenes:

Flight

class 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 AscentClassic

The Classic Ascent Profile.

auto_path

Whether to enable automatic altitude turn.

Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

auto_turn_percent

A value between 0 and 1.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

auto_turn_speed_factor

A value between 0 and 1.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

auto_turn_start_altitude
Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

auto_turn_start_velocity
Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

auto_turn_end_altitude
Attribute:

Read-only, cannot be set

Return type:

float

Game Scenes:

Flight

turn_start_altitude

The turn starts when this altitude is reached.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

turn_start_velocity

The turn starts when this velocity is reached.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

turn_end_altitude

The turn ends when this altitude is reached.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

turn_end_angle

The final flight path angle.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

turn_shape_exponent

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

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

AscentGT

class 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

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:

float

Game Scenes:

Flight

intermediate_altitude

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:

float

Game Scenes:

Flight

turn_start_altitude

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:

float

Game Scenes:

Flight

turn_start_pitch

Pitch that the pitch program immediately applies.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

turn_start_velocity

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:

float

Game Scenes:

Flight

AscentPVG

class AscentPVG

The Primer Vector Guidance (RSS/RO) profile.

attach_alt_flag
Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

desired_apoapsis

The target apoapsis in meters.

Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

desired_attach_alt
Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

dynamic_pressure_trigger
Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

fixed_coast
Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight

fixed_coast_length
Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

pitch_rate
Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

pitch_start_velocity
Attribute:

Can be read or written

Return type:

float

Game Scenes:

Flight

staging_trigger
Attribute:

Can be read or written

Return type:

int

Game Scenes:

Flight

staging_trigger_flag
Attribute:

Can be read or written

Return type:

bool

Game Scenes:

Flight