.. default-domain:: js .. highlight:: js .. module:: MechJeb :no-index: 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. .. method:: getEnabled() setEnabled(value) Whether the autopilot is enabled. :Property: Can be read or written :rtype: ``boolean`` :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:`MechJeb.HoverslamState.locked`. .. method:: getState() The phase of the autopilot. :Property: Read-only, cannot be set :rtype: :class:`MechJeb.HoverslamState` :Game Scenes: Flight .. method:: getIgnitionLead() setIgnitionLead(value) The time before the computed ignition at which the burn starts, in seconds. :Property: Can be read or written :rtype: ``number`` :Game Scenes: Flight .. note:: It makes up for staging or engine spool-up delays. For a margin against the terrain, raise :meth:`MechJeb.HoverslamAutopilot.getVerticalAltitude` instead. .. method:: getTouchdownSpeed() setTouchdownSpeed(value) The downward speed at touchdown, in :math:`\mathrm{m/s}`. :Property: Can be read or written :rtype: ``number`` :Game Scenes: Flight .. method:: getAutowarp() setAutowarp(value) Whether to warp time to the ignition. :Property: Can be read or written :rtype: ``boolean`` :Game Scenes: Flight .. method:: getHoldUpright() setHoldUpright(value) Whether Smart A.S.S. holds the vessel upright after touchdown. :Property: Can be read or written :rtype: ``boolean`` :Game Scenes: Flight .. method:: getAutostage() setAutostage(value) Whether enabling the autopilot enables autostaging, and disabling it disables autostaging. :Property: Can be read or written :rtype: ``boolean`` :Game Scenes: Flight .. method:: getPWMPulseWidth() setPWMPulseWidth(value) The shortest pulse of the throttle, in seconds. :Property: Can be read or written :rtype: ``number`` :Game Scenes: Flight .. note:: The autopilot pulses the throttle of engines that cannot throttle low enough to hover, such as with Real Fuels. .. method:: getMapLandingPrediction() setMapLandingPrediction(value) Whether to mark the predicted landing site on the map. :Property: Can be read or written :rtype: ``boolean`` :Game Scenes: Flight .. method:: getRecalculationInterval() setRecalculationInterval(value) The time between updates of the prediction, in seconds. :Property: Can be read or written :rtype: ``number`` :Game Scenes: Flight .. method:: getVerticalAuthority() setVerticalAuthority(value) The fraction of the thrust above hover that the burn plans to use, between 0 and 1. :Property: Can be read or written :rtype: ``number`` :Game Scenes: Flight .. note:: 0.5 leaves an equal margin for overshoot and undershoot. A higher value uses less delta-v, with less margin. .. method:: getVerticalAltitude() setVerticalAltitude(value) The altitude above the terrain at which the burn ends and the vertical descent starts, in meters. :Property: Can be read or written :rtype: ``number`` :Game Scenes: Flight .. method:: getHasPrediction() Whether there is a prediction of the landing. :Property: Read-only, cannot be set :rtype: ``boolean`` :Game Scenes: Flight .. method:: getIgnitionTime() The universal time of the ignition, in seconds. :Property: Read-only, cannot be set :rtype: ``number`` :Game Scenes: Flight .. note:: Requires :meth:`MechJeb.HoverslamAutopilot.getHasPrediction`. .. method:: getLandingTime() The universal time of the touchdown, in seconds. :Property: Read-only, cannot be set :rtype: ``number`` :Game Scenes: Flight .. note:: Requires :meth:`MechJeb.HoverslamAutopilot.getHasPrediction`. .. method:: getTimeToIgnition() The time until the ignition, in seconds. :Property: Read-only, cannot be set :rtype: ``number`` :Game Scenes: Flight .. note:: Requires :meth:`MechJeb.HoverslamAutopilot.getHasPrediction`. .. method:: getTimeToLanding() The time until the touchdown, in seconds. :Property: Read-only, cannot be set :rtype: ``number`` :Game Scenes: Flight .. note:: Requires :meth:`MechJeb.HoverslamAutopilot.getHasPrediction`. .. method:: getLandingLatitude() The latitude of the predicted landing site, in degrees. :Property: Read-only, cannot be set :rtype: ``number`` :Game Scenes: Flight .. note:: Requires :meth:`MechJeb.HoverslamAutopilot.getHasPrediction`. .. method:: getLandingLongitude() The longitude of the predicted landing site, in degrees. :Property: Read-only, cannot be set :rtype: ``number`` :Game Scenes: Flight .. note:: Requires :meth:`MechJeb.HoverslamAutopilot.getHasPrediction`. .. method:: getLandingBiome() The biome of the predicted landing site, or ``N/A`` with no prediction. :Property: Read-only, cannot be set :rtype: ``string`` :Game Scenes: Flight .. method:: getTerrainAltitude() The altitude above sea level of the terrain at the predicted landing site, in meters. :Property: Read-only, cannot be set :rtype: ``number`` :Game Scenes: Flight .. note:: Requires :meth:`MechJeb.HoverslamAutopilot.getHasPrediction`. .. method:: getSlope() The slope of the terrain at the predicted landing site, in degrees. :Property: Read-only, cannot be set :rtype: ``number`` :Game Scenes: Flight .. note:: Requires :meth:`MechJeb.HoverslamAutopilot.getHasPrediction`. .. method:: getFinalDescentSpeed() The speed of the vertical descent, in :math:`\mathrm{m/s}`. :Property: Read-only, cannot be set :rtype: ``number`` :Game Scenes: Flight .. note:: Requires :meth:`MechJeb.HoverslamAutopilot.getHasPrediction`. .. method:: getFinalThrustAcceleration() The acceleration from thrust during the vertical descent, in :math:`\mathrm{m/s^{2}}`. :Property: Read-only, cannot be set :rtype: ``number`` :Game Scenes: Flight .. note:: Requires :meth:`MechJeb.HoverslamAutopilot.getHasPrediction`. .. method:: getDeltaV() The delta-v of the landing burn, in :math:`\mathrm{m/s}`. :Property: Read-only, cannot be set :rtype: ``number`` :Game Scenes: Flight .. note:: Requires :meth:`MechJeb.HoverslamAutopilot.getHasPrediction`. .. class:: HoverslamState The phase of the hoverslam autopilot. See :meth:`MechJeb.HoverslamAutopilot.getState`. .. attribute:: locked The autopilot needs a research or a tracking station upgrade. .. attribute:: disabled The autopilot is disabled. .. attribute:: init The autopilot is waiting for a prediction. .. attribute:: align The autopilot is turning the vessel to the burn. .. attribute:: coast The autopilot is coasting to the ignition. .. attribute:: burn The autopilot is burning to slow down. .. attribute:: vertical The autopilot is descending vertically to touchdown. .. attribute:: finished The vessel has landed.