.. default-domain:: py .. highlight:: py .. currentmodule:: MechJeb HoverslamAutopilot ================== .. class:: HoverslamAutopilot The hoverslam autopilot, which lands with a single burn that ends just above the ground, then descends vertically. The Hoverslam Info window shows it and its prediction. .. note:: The prediction runs whenever the vessel is in flight, so it is available with the autopilot disabled. .. attribute:: enabled Whether the autopilot is enabled. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. note:: The autopilot can be enabled before there is a prediction, and starts flying once there is one. Setting it throws an exception if the autopilot is :attr:`HoverslamState.locked`. .. attribute:: state The phase of the autopilot. :Attribute: Read-only, cannot be set :rtype: :class:`HoverslamState` :Game Scenes: Flight .. attribute:: ignition_lead The time before the computed ignition at which the burn starts, in seconds. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. note:: It makes up for staging or engine spool-up delays. For a margin against the terrain, raise :attr:`HoverslamAutopilot.vertical_altitude` instead. .. attribute:: touchdown_speed The downward speed at touchdown, in :math:`\mathrm{m/s}`. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: autowarp Whether to warp time to the ignition. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: hold_upright Whether Smart A.S.S. holds the vessel upright after touchdown. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: autostage Whether enabling the autopilot enables autostaging, and disabling it disables autostaging. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: pwm_pulse_width The shortest pulse of the throttle, in seconds. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. note:: The autopilot pulses the throttle of engines that cannot throttle low enough to hover, such as with Real Fuels. .. attribute:: map_landing_prediction Whether to mark the predicted landing site on the map. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: recalculation_interval The time between updates of the prediction, in seconds. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: vertical_authority The fraction of the thrust above hover that the burn plans to use, between 0 and 1. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. note:: 0.5 leaves an equal margin for overshoot and undershoot. A higher value uses less delta-v, with less margin. .. attribute:: vertical_altitude The altitude above the terrain at which the burn ends and the vertical descent starts, in meters. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: has_prediction Whether there is a prediction of the landing. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. attribute:: ignition_time The universal time of the ignition, in seconds. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: Requires :attr:`HoverslamAutopilot.has_prediction`. .. attribute:: landing_time The universal time of the touchdown, in seconds. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: Requires :attr:`HoverslamAutopilot.has_prediction`. .. attribute:: time_to_ignition The time until the ignition, in seconds. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: Requires :attr:`HoverslamAutopilot.has_prediction`. .. attribute:: time_to_landing The time until the touchdown, in seconds. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: Requires :attr:`HoverslamAutopilot.has_prediction`. .. attribute:: landing_latitude The latitude of the predicted landing site, in degrees. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: Requires :attr:`HoverslamAutopilot.has_prediction`. .. attribute:: landing_longitude The longitude of the predicted landing site, in degrees. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: Requires :attr:`HoverslamAutopilot.has_prediction`. .. attribute:: landing_biome The biome of the predicted landing site, or ``N/A`` with no prediction. :Attribute: Read-only, cannot be set :rtype: str :Game Scenes: Flight .. attribute:: terrain_altitude The altitude above sea level of the terrain at the predicted landing site, in meters. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: Requires :attr:`HoverslamAutopilot.has_prediction`. .. attribute:: slope The slope of the terrain at the predicted landing site, in degrees. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: Requires :attr:`HoverslamAutopilot.has_prediction`. .. attribute:: final_descent_speed The speed of the vertical descent, in :math:`\mathrm{m/s}`. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: Requires :attr:`HoverslamAutopilot.has_prediction`. .. attribute:: final_thrust_acceleration The acceleration from thrust during the vertical descent, in :math:`\mathrm{m/s^{2}}`. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: Requires :attr:`HoverslamAutopilot.has_prediction`. .. attribute:: delta_v The delta-v of the landing burn, in :math:`\mathrm{m/s}`. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: Requires :attr:`HoverslamAutopilot.has_prediction`. .. class:: HoverslamState The phase of the hoverslam autopilot. See :attr:`HoverslamAutopilot.state`. .. data:: locked The autopilot needs a research or a tracking station upgrade. .. data:: disabled The autopilot is disabled. .. data:: init The autopilot is waiting for a prediction. .. data:: align The autopilot is turning the vessel to the burn. .. data:: coast The autopilot is coasting to the ignition. .. data:: burn The autopilot is burning to slow down. .. data:: vertical The autopilot is descending vertically to touchdown. .. data:: finished The vessel has landed.