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.
-
bool enabled()
-
void set_enabled(bool value)
- Game Scenes:
Flight
-
std::string status()
The autopilot status; it depends on the selected ascent path.
- Game Scenes:
Flight
-
int32_t ascent_path_index()
-
void set_ascent_path_index(int32_t value)
The selected ascent path.
0 =
AscentClassic
(Classic Ascent Profile)1 =
AscentGT
(Stock-style GravityTurn)2 =
AscentPVG
(Primer Vector Guidance (RSS/RO))- Game Scenes:
Flight
-
AscentClassic ascent_path_classic()
Get Classic Ascent Profile settings.
- Game Scenes:
Flight
-
AscentPVG ascent_path_pvg()
Get Powered Explicit Guidance (RSS/RO) profile settings.
- Game Scenes:
Flight
-
double desired_inclination()
-
void set_desired_inclination(double value)
The desired inclination in degrees for the final circular orbit.
- Game Scenes:
Flight
-
double desired_orbit_altitude()
-
void set_desired_orbit_altitude(double value)
The desired altitude in kilometres for the final circular orbit.
- Game Scenes:
Flight
-
ThrustController thrust_controller()
- Game Scenes:
Flight
Note
Equivalent to
thrust_controller()
.
-
bool force_roll()
-
void set_force_roll(bool value)
The state of force roll.
- Game Scenes:
Flight
-
double turn_roll()
-
void set_turn_roll(double value)
The turn roll used by the autopilot.
- Game Scenes:
Flight
-
double vertical_roll()
-
void set_vertical_roll(double value)
The vertical/climb roll used by the autopilot.
- Game Scenes:
Flight
-
bool limit_ao_a()
-
void set_limit_ao_a(bool value)
Whether to limit angle of attack.
- Game Scenes:
Flight
-
double max_ao_a()
-
void set_max_ao_a(double value)
The maximal angle of attack used by the autopilot.
- Game Scenes:
Flight
-
double ao_a_limit_fadeout_pressure()
-
void set_ao_a_limit_fadeout_pressure(double value)
The pressure value when AoA limit is automatically deactivated.
- Game Scenes:
Flight
-
bool corrective_steering()
-
void set_corrective_steering(bool value)
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).
- Game Scenes:
Flight
-
double corrective_steering_gain()
-
void set_corrective_steering_gain(double value)
The gain of corrective steering used by the autopilot.
- Game Scenes:
Flight
-
bool autostage()
-
void set_autostage(bool value)
The autopilot will automatically stage when the current stage has run out of fuel. Paramethers can be set in
StagingController
.- Game Scenes:
Flight
-
StagingController staging_controller()
- Game Scenes:
Flight
Note
Equivalent to
staging_controller()
.
-
bool autodeploy_solar_panels()
-
void set_autodeploy_solar_panels(bool value)
Whether to deploy solar panels automatically when the ascent finishes.
- Game Scenes:
Flight
-
bool auto_deploy_antennas()
-
void set_auto_deploy_antennas(bool value)
Whether to deploy antennas automatically when the ascent finishes.
- Game Scenes:
Flight
-
bool skip_circularization()
-
void set_skip_circularization(bool value)
Whether to skip circularization burn and do only the ascent.
- Game Scenes:
Flight
-
int32_t warp_count_down()
-
void set_warp_count_down(int32_t value)
- Game Scenes:
Flight
-
double launch_lan_difference()
-
void set_launch_lan_difference(double value)
- Game Scenes:
Flight
-
double launch_phase_angle()
-
void set_launch_phase_angle(double value)
- Game Scenes:
Flight
-
AscentLaunchMode launch_mode()
Current autopilot mode. Useful for determining whether the autopilot is performing a timed launch or not.
- Game Scenes:
Flight
-
void abort_timed_launch()
Abort a known timed launch when it has not started yet
- Game Scenes:
Flight
-
void launch_to_rendezvous()
Launch to rendezvous with the selected target.
- Game Scenes:
Flight
-
void launch_to_target_plane()
Launch into the plane of the selected target.
- Game Scenes:
Flight
-
bool enabled()
-
enum struct AscentLaunchMode
-
enumerator normal
The autopilot is not performing a timed launch.
-
enumerator rendezvous
The autopilot is performing a timed launch to rendezvous with the target vessel.
-
enumerator target_plane
The autopilot is performing a timed launch to target plane.
-
enumerator unknown
The autopilot is performing an unknown timed launch.
-
enumerator normal
AscentClassic
-
class AscentClassic
The Classic Ascent Profile.
-
bool auto_path()
-
void set_auto_path(bool value)
Whether to enable automatic altitude turn.
- Game Scenes:
Flight
-
float auto_turn_percent()
-
void set_auto_turn_percent(float value)
A value between 0 and 1.
- Game Scenes:
Flight
-
float auto_turn_speed_factor()
-
void set_auto_turn_speed_factor(float value)
A value between 0 and 1.
- Game Scenes:
Flight
-
double auto_turn_start_altitude()
- Game Scenes:
Flight
-
double auto_turn_start_velocity()
- Game Scenes:
Flight
-
double auto_turn_end_altitude()
- Game Scenes:
Flight
-
double turn_start_altitude()
-
void set_turn_start_altitude(double value)
The turn starts when this altitude is reached.
- Game Scenes:
Flight
-
double turn_start_velocity()
-
void set_turn_start_velocity(double value)
The turn starts when this velocity is reached.
- Game Scenes:
Flight
-
double turn_end_altitude()
-
void set_turn_end_altitude(double value)
The turn ends when this altitude is reached.
- Game Scenes:
Flight
-
double turn_end_angle()
-
void set_turn_end_angle(double value)
The final flight path angle.
- Game Scenes:
Flight
-
double turn_shape_exponent()
-
void set_turn_shape_exponent(double value)
A value between 0 - 1 describing how steep the turn is.
- Game Scenes:
Flight
-
bool auto_path()
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.
-
double hold_ap_time()
-
void set_hold_ap_time(double value)
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).
- Game Scenes:
Flight
-
double intermediate_altitude()
-
void set_intermediate_altitude(double value)
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.
- Game Scenes:
Flight
-
double turn_start_altitude()
-
void set_turn_start_altitude(double value)
Altitude in km to pitch over and initiate the Gravity Turn (higher values for lower-TWR rockets).
- Game Scenes:
Flight
-
double turn_start_pitch()
-
void set_turn_start_pitch(double value)
Pitch that the pitch program immediately applies.
- Game Scenes:
Flight
-
double turn_start_velocity()
-
void set_turn_start_velocity(double value)
Velocity in m/s which triggers pitch over and initiates the Gravity Turn (higher values for lower-TWR rockets).
- Game Scenes:
Flight
-
double hold_ap_time()
AscentPVG
-
class AscentPVG
The Primer Vector Guidance (RSS/RO) profile.
-
bool attach_alt_flag()
-
void set_attach_alt_flag(bool value)
- Game Scenes:
Flight
-
double desired_apoapsis()
-
void set_desired_apoapsis(double value)
The target apoapsis in meters.
- Game Scenes:
Flight
-
double desired_attach_alt()
-
void set_desired_attach_alt(double value)
- Game Scenes:
Flight
-
double dynamic_pressure_trigger()
-
void set_dynamic_pressure_trigger(double value)
- Game Scenes:
Flight
-
bool fixed_coast()
-
void set_fixed_coast(bool value)
- Game Scenes:
Flight
-
double fixed_coast_length()
-
void set_fixed_coast_length(double value)
- Game Scenes:
Flight
-
double pitch_rate()
-
void set_pitch_rate(double value)
- Game Scenes:
Flight
-
double pitch_start_velocity()
-
void set_pitch_start_velocity(double value)
- Game Scenes:
Flight
-
int32_t staging_trigger()
-
void set_staging_trigger(int32_t value)
- Game Scenes:
Flight
-
bool staging_trigger_flag()
-
void set_staging_trigger_flag(bool value)
- Game Scenes:
Flight
-
bool attach_alt_flag()