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.

bool enabled()#
void set_enabled(bool value)#

Whether the module is enabled.

Game Scenes:

Flight

std::string status()#

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

Game Scenes:

Flight

AscentType ascent_type()#
void set_ascent_type(AscentType value)#

The ascent path.

Game Scenes:

Flight

AscentSettings settings()#

The Ascent Settings window.

Game Scenes:

Flight

PVGSettings pvg_settings()#

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

Game Scenes:

Flight

ClassicPath classic_path()#

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

Game Scenes:

Flight

double desired_orbit_altitude()#
void set_desired_orbit_altitude(double value)#

The altitude of the final circular orbit, in meters.

Game Scenes:

Flight

double desired_apoapsis()#
void set_desired_apoapsis(double value)#

The target apoapsis, in meters.

Game Scenes:

Flight

Note

Applies on the AscentType::pvg path.

bool attach_alt_flag()#
void set_attach_alt_flag(bool value)#

Whether the orbit is attached at AscentGuidance::desired_attach_alt().

Game Scenes:

Flight

Note

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

double desired_attach_alt()#
void set_desired_attach_alt(double value)#

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

Game Scenes:

Flight

Note

Applies on the AscentType::pvg path. Requires AscentGuidance::attach_alt_flag(), unless there is no early shutoff stage. See PVGSettings::optimize_stage().

double desired_fpa()#
void set_desired_fpa(double value)#

The flight path angle at orbit insertion, in degrees.

Game Scenes:

Flight

Note

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

double desired_inclination()#
void set_desired_inclination(double value)#

The inclination of the final circular orbit, in degrees.

Game Scenes:

Flight

AscentLaunchMode launch_mode()#

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

Game Scenes:

Flight

void launch_to_rendezvous()#

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

Game Scenes:

Flight

double launch_phase_angle()#
void set_launch_phase_angle(double value)#

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

Game Scenes:

Flight

void launch_to_target_plane()#

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

Game Scenes:

Flight

double launch_lan_difference()#
void set_launch_lan_difference(double value)#

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

Game Scenes:

Flight

void launch_to_match_lan()#

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

Game Scenes:

Flight

void launch_to_lan()#

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

Game Scenes:

Flight

double desired_lan()#
void set_desired_lan(double value)#

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

Game Scenes:

Flight

void abort_timed_launch()#

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

Game Scenes:

Flight

int32_t warp_count_down()#
void set_warp_count_down(int32_t value)#

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

Game Scenes:

Flight

bool override_warp_to_plane()#
void set_override_warp_to_plane(bool value)#

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

Game Scenes:

Flight

enum struct AscentType#

The ascent path. See AscentGuidance::ascent_type().

enumerator classic#

The classic ascent path. See AscentGuidance::classic_path().

enumerator pvg#

Primer Vector Guidance, for RSS/RO. See AscentGuidance::pvg_settings().

enum struct AscentLaunchMode#

The launch mode of the ascent autopilot. See AscentGuidance::launch_mode().

enumerator normal#

The autopilot is not performing a timed launch.

enumerator rendezvous#

A timed launch to rendezvous with the target vessel.

enumerator target_plane#

A timed launch into the plane of the target.

enumerator match_lan#

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

enumerator lan#

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

enumerator unknown#

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

AscentSettings#

class AscentSettings#

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

bool force_roll()#
void set_force_roll(bool value)#

Whether the autopilot controls the roll.

Game Scenes:

Flight

double vertical_roll()#
void set_vertical_roll(double value)#

The roll during the vertical climb, in degrees.

Game Scenes:

Flight

double turn_roll()#
void set_turn_roll(double value)#

The roll during the turn, in degrees.

Game Scenes:

Flight

double roll_altitude()#
void set_roll_altitude(double value)#

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

Game Scenes:

Flight

bool limit_angle_of_attack()#
void set_limit_angle_of_attack(bool value)#

Whether to limit the angle of attack.

Game Scenes:

Flight

Note

Applies on the AscentType::classic path.

double max_angle_of_attack()#
void set_max_angle_of_attack(double value)#

The largest angle of attack, in degrees.

Game Scenes:

Flight

Note

Requires AscentSettings::limit_angle_of_attack(), and applies on the AscentType::classic path.

double angle_of_attack_limit_fadeout_pressure()#
void set_angle_of_attack_limit_fadeout_pressure(double value)#

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

Game Scenes:

Flight

Note

Requires AscentSettings::limit_angle_of_attack(), and applies on the AscentType::classic path.

bool limiting_angle_of_attack()#

Whether the angle of attack limit is limiting the steering.

Game Scenes:

Flight

double current_max_angle_of_attack()#

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

Game Scenes:

Flight

bool corrective_steering()#
void set_corrective_steering(bool value)#

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. Applies on the AscentType::classic path.

double corrective_steering_gain()#
void set_corrective_steering_gain(double value)#

The gain of the corrective steering.

Game Scenes:

Flight

Note

Requires AscentSettings::corrective_steering(), and applies on the AscentType::classic path.

bool autostage()#
void set_autostage(bool value)#

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

Game Scenes:

Flight

Autostaging staging()#

The autostaging settings. The same object as Utilities::staging().

Game Scenes:

Flight

ThrustLimiter thrust()#

The throttle limiters. The same object as Utilities::thrust().

Game Scenes:

Flight

bool autodeploy_solar_panels()#
void set_autodeploy_solar_panels(bool value)#

Whether to deploy the solar panels when the ascent finishes.

Game Scenes:

Flight

bool auto_deploy_antennas()#
void set_auto_deploy_antennas(bool value)#

Whether to deploy the antennas when the ascent finishes.

Game Scenes:

Flight

bool autowarp()#
void set_autowarp(bool value)#

Whether to warp time during the ascent.

Game Scenes:

Flight

Note

The same setting as ManeuverPlanner::autowarp().

bool skip_circularization()#
void set_skip_circularization(bool value)#

Whether to skip the circularization burn.

Game Scenes:

Flight

PVGSettings#

class PVGSettings#

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

double dynamic_pressure_trigger()#
void set_dynamic_pressure_trigger(double value)#

The dynamic pressure below which guidance starts, in pascals.

Game Scenes:

Flight

bool fixed_coast()#
void set_fixed_coast(bool value)#

Whether the coast has a fixed length.

Game Scenes:

Flight

double fixed_coast_length()#
void set_fixed_coast_length(double value)#

The length of the coast, in seconds.

Game Scenes:

Flight

double min_delta_v()#
void set_min_delta_v(double value)#

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

Game Scenes:

Flight

int32_t last_stage()#
void set_last_stage(int32_t value)#

The last stage that guidance plans with.

Game Scenes:

Flight

bool optimize_stage_flag()#
void set_optimize_stage_flag(bool value)#

Whether guidance may shut off PVGSettings::optimize_stage() early.

Game Scenes:

Flight

int32_t optimize_stage()#
void set_optimize_stage(int32_t value)#

The stage that guidance may shut off early.

Game Scenes:

Flight

Note

Requires PVGSettings::optimize_stage_flag(). -1 is no stage.

bool unguided_stages_flag()#
void set_unguided_stages_flag(bool value)#

Whether guidance leaves PVGSettings::unguided_stages() unguided.

Game Scenes:

Flight

std::vector<int32_t> unguided_stages()#
void set_unguided_stages(std::vector<int32_t> value)#

The stages that guidance leaves unguided.

Game Scenes:

Flight

bool coast_stage_flag()#
void set_coast_stage_flag(bool value)#

Whether guidance coasts in PVGSettings::coast_stage().

Game Scenes:

Flight

int32_t coast_stage()#
void set_coast_stage(int32_t value)#

The stage before or after which guidance coasts.

Game Scenes:

Flight

bool coast_before_flag()#
void set_coast_before_flag(bool value)#

Whether the coast comes before PVGSettings::coast_stage(), rather than after it.

Game Scenes:

Flight

double ullage_lead_time()#
void set_ullage_lead_time(double value)#

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

Game Scenes:

Flight

bool spinup_stage_flag()#
void set_spinup_stage_flag(bool value)#

Whether to spin up the vessel before PVGSettings::spinup_stage().

Game Scenes:

Flight

int32_t spinup_stage()#
void set_spinup_stage(int32_t value)#

The stage before which to spin up the vessel.

Game Scenes:

Flight

double spinup_angular_velocity()#
void set_spinup_angular_velocity(double value)#

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

Game Scenes:

Flight

Note

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

double spinup_lead_time()#
void set_spinup_lead_time(double value)#

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

Game Scenes:

Flight

double limit_qa()#
void set_limit_qa(double value)#

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

Game Scenes:

Flight

Note

MechJeb clamps it to between 0 and 10000.

double pitch_rate()#
void set_pitch_rate(double value)#

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

Game Scenes:

Flight

double pitch_start_velocity()#
void set_pitch_start_velocity(double value)#

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

Game Scenes:

Flight

int32_t staging_trigger()#
void set_staging_trigger(int32_t value)#

The stage after which guidance starts.

Game Scenes:

Flight

bool staging_trigger_flag()#
void set_staging_trigger_flag(bool value)#

Whether guidance starts after PVGSettings::staging_trigger().

Game Scenes:

Flight

ClassicPath#

class ClassicPath#

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

bool auto_path()#
void set_auto_path(bool value)#

Whether the autopilot chooses the turn altitudes and speed.

Game Scenes:

Flight

float auto_turn_percent()#
void set_auto_turn_percent(float value)#

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

Game Scenes:

Flight

Note

Requires ClassicPath::auto_path().

float auto_turn_speed_factor()#
void set_auto_turn_speed_factor(float value)#

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

Game Scenes:

Flight

Note

Requires ClassicPath::auto_path().

double auto_turn_start_altitude()#

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

Game Scenes:

Flight

double auto_turn_start_velocity()#

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

Game Scenes:

Flight

double auto_turn_end_altitude()#

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

Game Scenes:

Flight

double turn_start_altitude()#
void set_turn_start_altitude(double value)#

The altitude at which the turn starts, in meters.

Game Scenes:

Flight

double turn_start_velocity()#
void set_turn_start_velocity(double value)#

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

Game Scenes:

Flight

double turn_end_altitude()#
void set_turn_end_altitude(double value)#

The altitude at which the turn ends, in meters.

Game Scenes:

Flight

double turn_end_angle()#
void set_turn_end_angle(double value)#

The final flight path angle, in degrees.

Game Scenes:

Flight

double turn_shape_exponent()#
void set_turn_shape_exponent(double value)#

The steepness of the turn, between 0 and 1.

Game Scenes:

Flight