.. default-domain:: py .. highlight:: py .. currentmodule:: MechJeb 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. .. attribute:: enabled :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: status The autopilot status; it depends on the selected ascent path. :Attribute: Read-only, cannot be set :rtype: str :Game Scenes: Flight .. attribute:: ascent_path_index The selected ascent path. 0 = :class:`AscentClassic` (Classic Ascent Profile) 1 = :class:`AscentGT` (Stock-style GravityTurn) 2 = :class:`AscentPVG` (Primer Vector Guidance (RSS/RO)) :Attribute: Can be read or written :rtype: int :Game Scenes: Flight .. attribute:: ascent_path_classic Get Classic Ascent Profile settings. :Attribute: Read-only, cannot be set :rtype: :class:`AscentClassic` :Game Scenes: Flight .. attribute:: ascent_path_gt Get Stock-style GravityTurn profile settings. :Attribute: Read-only, cannot be set :rtype: :class:`AscentGT` :Game Scenes: Flight .. attribute:: ascent_path_pvg Get Powered Explicit Guidance (RSS/RO) profile settings. :Attribute: Read-only, cannot be set :rtype: :class:`AscentPVG` :Game Scenes: Flight .. attribute:: desired_inclination The desired inclination in degrees for the final circular orbit. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: desired_orbit_altitude The desired altitude in kilometres for the final circular orbit. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: thrust_controller :Attribute: Read-only, cannot be set :rtype: :class:`ThrustController` :Game Scenes: Flight .. note:: Equivalent to :attr:`thrust_controller`. .. attribute:: force_roll The state of force roll. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: turn_roll The turn roll used by the autopilot. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: vertical_roll The vertical/climb roll used by the autopilot. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: limit_ao_a Whether to limit angle of attack. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: max_ao_a The maximal angle of attack used by the autopilot. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: ao_a_limit_fadeout_pressure The pressure value when AoA limit is automatically deactivated. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: 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 :rtype: bool :Game Scenes: Flight .. attribute:: corrective_steering_gain The gain of corrective steering used by the autopilot. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: autostage The autopilot will automatically stage when the current stage has run out of fuel. Paramethers can be set in :class:`StagingController`. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: staging_controller :Attribute: Read-only, cannot be set :rtype: :class:`StagingController` :Game Scenes: Flight .. note:: Equivalent to :attr:`staging_controller`. .. attribute:: autodeploy_solar_panels Whether to deploy solar panels automatically when the ascent finishes. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: auto_deploy_antennas Whether to deploy antennas automatically when the ascent finishes. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: skip_circularization Whether to skip circularization burn and do only the ascent. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: warp_count_down :Attribute: Can be read or written :rtype: int :Game Scenes: Flight .. attribute:: launch_lan_difference :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: launch_phase_angle :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: launch_mode Current autopilot mode. Useful for determining whether the autopilot is performing a timed launch or not. :Attribute: Read-only, cannot be set :rtype: :class:`AscentLaunchMode` :Game Scenes: Flight .. method:: abort_timed_launch() Abort a known timed launch when it has not started yet :Game Scenes: Flight .. method:: launch_to_rendezvous() Launch to rendezvous with the selected target. :Game Scenes: Flight .. method:: launch_to_target_plane() Launch into the plane of the selected target. :Game Scenes: Flight .. class:: AscentLaunchMode .. data:: normal The autopilot is not performing a timed launch. .. data:: rendezvous The autopilot is performing a timed launch to rendezvous with the target vessel. .. data:: target_plane The autopilot is performing a timed launch to target plane. .. data:: unknown The autopilot is performing an unknown timed launch. AscentClassic ------------- .. class:: AscentClassic The Classic Ascent Profile. .. attribute:: auto_path Whether to enable automatic altitude turn. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: auto_turn_percent A value between 0 and 1. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: auto_turn_speed_factor A value between 0 and 1. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: auto_turn_start_altitude :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: auto_turn_start_velocity :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: auto_turn_end_altitude :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: turn_start_altitude The turn starts when this altitude is reached. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: turn_start_velocity The turn starts when this velocity is reached. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: turn_end_altitude The turn ends when this altitude is reached. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: turn_end_angle The final flight path angle. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: turn_shape_exponent A value between 0 - 1 describing how steep the turn is. :Attribute: Can be read or written :rtype: 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. .. attribute:: 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 :rtype: float :Game Scenes: Flight .. attribute:: 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 :rtype: float :Game Scenes: Flight .. attribute:: 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 :rtype: float :Game Scenes: Flight .. attribute:: turn_start_pitch Pitch that the pitch program immediately applies. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: 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 :rtype: float :Game Scenes: Flight AscentPVG --------- .. class:: AscentPVG The Primer Vector Guidance (RSS/RO) profile. .. attribute:: attach_alt_flag :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: desired_apoapsis The target apoapsis in meters. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: desired_attach_alt :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: dynamic_pressure_trigger :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: fixed_coast :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: fixed_coast_length :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: pitch_rate :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: pitch_start_velocity :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: staging_trigger :Attribute: Can be read or written :rtype: int :Game Scenes: Flight .. attribute:: staging_trigger_flag :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight