.. default-domain:: c .. highlight:: c HoverslamAutopilot ================== .. type:: krpc_MechJeb_HoverslamAutopilot_t 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. .. macro:: KRPC_CLASS_MECHJEB_HOVERSLAMAUTOPILOT The service and class ids of the class, for :func:`krpc_KRPC_Type_ClassTypeById`. .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_Enabled(krpc_connection_t connection, bool * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_set_Enabled(krpc_connection_t connection, krpc_MechJeb_HoverslamAutopilot_t instance, bool value) Whether the autopilot is enabled. :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 :macro:`KRPC_MECHJEB_HOVERSLAMSTATE_LOCKED`. .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_State(krpc_connection_t connection, krpc_MechJeb_HoverslamState_t * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) The phase of the autopilot. :Game Scenes: Flight .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_IgnitionLead(krpc_connection_t connection, double * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_set_IgnitionLead(krpc_connection_t connection, krpc_MechJeb_HoverslamAutopilot_t instance, double value) The time before the computed ignition at which the burn starts, in seconds. :Game Scenes: Flight .. note:: It makes up for staging or engine spool-up delays. For a margin against the terrain, raise :func:`krpc_MechJeb_HoverslamAutopilot_VerticalAltitude` instead. .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_TouchdownSpeed(krpc_connection_t connection, double * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_set_TouchdownSpeed(krpc_connection_t connection, krpc_MechJeb_HoverslamAutopilot_t instance, double value) The downward speed at touchdown, in :math:`\mathrm{m/s}`. :Game Scenes: Flight .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_Autowarp(krpc_connection_t connection, bool * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_set_Autowarp(krpc_connection_t connection, krpc_MechJeb_HoverslamAutopilot_t instance, bool value) Whether to warp time to the ignition. :Game Scenes: Flight .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_HoldUpright(krpc_connection_t connection, bool * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_set_HoldUpright(krpc_connection_t connection, krpc_MechJeb_HoverslamAutopilot_t instance, bool value) Whether Smart A.S.S. holds the vessel upright after touchdown. :Game Scenes: Flight .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_Autostage(krpc_connection_t connection, bool * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_set_Autostage(krpc_connection_t connection, krpc_MechJeb_HoverslamAutopilot_t instance, bool value) Whether enabling the autopilot enables autostaging, and disabling it disables autostaging. :Game Scenes: Flight .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_PWMPulseWidth(krpc_connection_t connection, double * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_set_PWMPulseWidth(krpc_connection_t connection, krpc_MechJeb_HoverslamAutopilot_t instance, double value) The shortest pulse of the throttle, in seconds. :Game Scenes: Flight .. note:: The autopilot pulses the throttle of engines that cannot throttle low enough to hover, such as with Real Fuels. .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_MapLandingPrediction(krpc_connection_t connection, bool * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_set_MapLandingPrediction(krpc_connection_t connection, krpc_MechJeb_HoverslamAutopilot_t instance, bool value) Whether to mark the predicted landing site on the map. :Game Scenes: Flight .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_RecalculationInterval(krpc_connection_t connection, double * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_set_RecalculationInterval(krpc_connection_t connection, krpc_MechJeb_HoverslamAutopilot_t instance, double value) The time between updates of the prediction, in seconds. :Game Scenes: Flight .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_VerticalAuthority(krpc_connection_t connection, double * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_set_VerticalAuthority(krpc_connection_t connection, krpc_MechJeb_HoverslamAutopilot_t instance, double value) The fraction of the thrust above hover that the burn plans to use, between 0 and 1. :Game Scenes: Flight .. note:: 0.5 leaves an equal margin for overshoot and undershoot. A higher value uses less delta-v, with less margin. .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_VerticalAltitude(krpc_connection_t connection, double * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_set_VerticalAltitude(krpc_connection_t connection, krpc_MechJeb_HoverslamAutopilot_t instance, double value) The altitude above the terrain at which the burn ends and the vertical descent starts, in meters. :Game Scenes: Flight .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_HasPrediction(krpc_connection_t connection, bool * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) Whether there is a prediction of the landing. :Game Scenes: Flight .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_IgnitionTime(krpc_connection_t connection, double * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) The universal time of the ignition, in seconds. :Game Scenes: Flight .. note:: Requires :func:`krpc_MechJeb_HoverslamAutopilot_HasPrediction`. .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_LandingTime(krpc_connection_t connection, double * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) The universal time of the touchdown, in seconds. :Game Scenes: Flight .. note:: Requires :func:`krpc_MechJeb_HoverslamAutopilot_HasPrediction`. .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_TimeToIgnition(krpc_connection_t connection, double * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) The time until the ignition, in seconds. :Game Scenes: Flight .. note:: Requires :func:`krpc_MechJeb_HoverslamAutopilot_HasPrediction`. .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_TimeToLanding(krpc_connection_t connection, double * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) The time until the touchdown, in seconds. :Game Scenes: Flight .. note:: Requires :func:`krpc_MechJeb_HoverslamAutopilot_HasPrediction`. .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_LandingLatitude(krpc_connection_t connection, double * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) The latitude of the predicted landing site, in degrees. :Game Scenes: Flight .. note:: Requires :func:`krpc_MechJeb_HoverslamAutopilot_HasPrediction`. .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_LandingLongitude(krpc_connection_t connection, double * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) The longitude of the predicted landing site, in degrees. :Game Scenes: Flight .. note:: Requires :func:`krpc_MechJeb_HoverslamAutopilot_HasPrediction`. .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_LandingBiome(krpc_connection_t connection, char * * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) The biome of the predicted landing site, or ``N/A`` with no prediction. :Game Scenes: Flight .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_TerrainAltitude(krpc_connection_t connection, double * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) The altitude above sea level of the terrain at the predicted landing site, in meters. :Game Scenes: Flight .. note:: Requires :func:`krpc_MechJeb_HoverslamAutopilot_HasPrediction`. .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_Slope(krpc_connection_t connection, double * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) The slope of the terrain at the predicted landing site, in degrees. :Game Scenes: Flight .. note:: Requires :func:`krpc_MechJeb_HoverslamAutopilot_HasPrediction`. .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_FinalDescentSpeed(krpc_connection_t connection, double * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) The speed of the vertical descent, in :math:`\mathrm{m/s}`. :Game Scenes: Flight .. note:: Requires :func:`krpc_MechJeb_HoverslamAutopilot_HasPrediction`. .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_FinalThrustAcceleration(krpc_connection_t connection, double * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) The acceleration from thrust during the vertical descent, in :math:`\mathrm{m/s^{2}}`. :Game Scenes: Flight .. note:: Requires :func:`krpc_MechJeb_HoverslamAutopilot_HasPrediction`. .. function:: krpc_error_t krpc_MechJeb_HoverslamAutopilot_DeltaV(krpc_connection_t connection, double * returnValue, krpc_MechJeb_HoverslamAutopilot_t instance) The delta-v of the landing burn, in :math:`\mathrm{m/s}`. :Game Scenes: Flight .. note:: Requires :func:`krpc_MechJeb_HoverslamAutopilot_HasPrediction`. .. type:: krpc_MechJeb_HoverslamState_t The phase of the hoverslam autopilot. See :func:`krpc_MechJeb_HoverslamAutopilot_State`. .. macro:: KRPC_ENUMERATION_MECHJEB_HOVERSLAMSTATE The service and enumeration ids of the enumeration, for :func:`krpc_KRPC_Type_EnumerationTypeById` and :func:`krpc_KRPC_Expression_ConstantEnumById`. .. macro:: KRPC_MECHJEB_HOVERSLAMSTATE_LOCKED The autopilot needs a research or a tracking station upgrade. .. macro:: KRPC_MECHJEB_HOVERSLAMSTATE_DISABLED The autopilot is disabled. .. macro:: KRPC_MECHJEB_HOVERSLAMSTATE_INIT The autopilot is waiting for a prediction. .. macro:: KRPC_MECHJEB_HOVERSLAMSTATE_ALIGN The autopilot is turning the vessel to the burn. .. macro:: KRPC_MECHJEB_HOVERSLAMSTATE_COAST The autopilot is coasting to the ignition. .. macro:: KRPC_MECHJEB_HOVERSLAMSTATE_BURN The autopilot is burning to slow down. .. macro:: KRPC_MECHJEB_HOVERSLAMSTATE_VERTICAL The autopilot is descending vertically to touchdown. .. macro:: KRPC_MECHJEB_HOVERSLAMSTATE_FINISHED The vessel has landed.