.. default-domain:: http .. highlight:: json AutoPilot ========= .. _http-SpaceCenter.AutoPilot: .. rubric:: AutoPilot Provides basic auto-piloting utilities for a vessel. Created by calling :http:get:`/space-center/vessel/(id)/auto-pilot`. .. note:: If a client engages the auto-pilot and then closes its connection to the server, the auto-pilot will be disengaged. Its configuration and target are left unchanged. A ``AutoPilot`` object is passed and returned as its identifier, a number. A path that acts on an object takes it as ``(id)``. .. http:get:: /space-center/auto-pilot/(id)/sas The state of SAS. .. note:: Equivalent to :http:get:`/space-center/control/(id)/sas`. Throws an exception if set to ``true`` while the auto-pilot is engaged, as the auto-pilot holds SAS off for as long as it is flying the vessel. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson bool value: .. http:put:: /space-center/auto-pilot/(id)/sas The state of SAS. .. note:: Equivalent to :http:get:`/space-center/control/(id)/sas`. Throws an exception if set to ``true`` while the auto-pilot is engaged, as the auto-pilot holds SAS off for as long as it is flying the vessel. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson bool value: The new value. .. http:get:: /space-center/auto-pilot/(id)/sas-mode The current :http:get:`/space-center/auto-pilot/(id)/sas-mode`. These modes are equivalent to the mode buttons to the left of the navball that appear when SAS is enabled. .. note:: Equivalent to :http:get:`/space-center/control/(id)/sas-mode`. Throws an exception if set to a mode not in :http:get:`/space-center/auto-pilot/(id)/available-sas-modes`. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson SpaceCenter.SASMode value: .. http:put:: /space-center/auto-pilot/(id)/sas-mode The current :http:get:`/space-center/auto-pilot/(id)/sas-mode`. These modes are equivalent to the mode buttons to the left of the navball that appear when SAS is enabled. .. note:: Equivalent to :http:get:`/space-center/control/(id)/sas-mode`. Throws an exception if set to a mode not in :http:get:`/space-center/auto-pilot/(id)/available-sas-modes`. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson SpaceCenter.SASMode value: The new value. .. http:get:: /space-center/auto-pilot/(id)/available-sas-modes The SAS modes that :http:get:`/space-center/auto-pilot/(id)/sas-mode` can be set to. .. note:: Equivalent to :http:get:`/space-center/control/(id)/available-sas-modes`. The modes depend on the SAS level of the vessel's pilot or probe core, the navball speed mode, and whether there is a target and a maneuver node. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson set value: .. http:get:: /space-center/auto-pilot/(id)/engaged Whether the auto-pilot is engaged. Setting to ``true`` engages the auto-pilot; setting to ``false`` disengages it. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson bool value: .. http:put:: /space-center/auto-pilot/(id)/engaged Whether the auto-pilot is engaged. Setting to ``true`` engages the auto-pilot; setting to ``false`` disengages it. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson bool value: The new value. .. http:get:: /space-center/auto-pilot/(id)/update-mode When the auto-pilot's control loop runs within a server update, relative to the calls the update executes. Defaults to ``"after_calls"``. .. note:: The loop runs once per physics tick; this chooses where in the tick that is. Together with ``KRPC.HoldTick`` it lets a program place the loop exactly within its own read, compute and write. When no server is running the loop runs at the point the game takes control inputs at, whatever the mode, so a vessel is never left without control input. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson SpaceCenter.AutoPilotUpdateMode value: .. http:put:: /space-center/auto-pilot/(id)/update-mode When the auto-pilot's control loop runs within a server update, relative to the calls the update executes. Defaults to ``"after_calls"``. .. note:: The loop runs once per physics tick; this chooses where in the tick that is. Together with ``KRPC.HoldTick`` it lets a program place the loop exactly within its own read, compute and write. When no server is running the loop runs at the point the game takes control inputs at, whatever the mode, so a vessel is never left without control input. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson SpaceCenter.AutoPilotUpdateMode value: The new value. .. http:post:: /space-center/auto-pilot/(id)/update Run one tick of the auto-pilot's control loop now. Does nothing if it has already run on this physics tick. Throws an exception if the auto-pilot is not engaged. .. note:: For ``"manual"``, where the loop runs only when this is called. In the other modes this runs it early; either way it runs once per tick. On a tick it is not called for, the vessel keeps the control output of the last tick it did run on, and after a tenth of a second of that the auto-pilot stops contributing any control input at all. :param id: The identifier of the :ref:`AutoPilot ` object. .. http:get:: /space-center/auto-pilot/(id)/show-info-ui Whether an in-game window showing the auto-pilot's state (engagement, attitude error, target, angular rate, inner-loop PID gains and oscillation suppression) is displayed for this vessel. Defaults to ``false``. This is a debugging aid; the window is reset to hidden when the game is restarted. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson bool value: .. http:put:: /space-center/auto-pilot/(id)/show-info-ui Whether an in-game window showing the auto-pilot's state (engagement, attitude error, target, angular rate, inner-loop PID gains and oscillation suppression) is displayed for this vessel. Defaults to ``false``. This is a debugging aid; the window is reset to hidden when the game is restarted. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson bool value: The new value. .. http:post:: /space-center/auto-pilot/(id)/reset Disengages the auto-pilot and resets all configuration parameters to their defaults. Also resets the target pitch, heading and roll, and clears all internal controller state, including the oscillation detector's structural level, which otherwise persists across engagements so that a craft known to be flexible re-latches quickly. :param id: The identifier of the :ref:`AutoPilot ` object. .. http:get:: /space-center/auto-pilot/(id)/reference-frame The reference frame for the target direction (:http:get:`/space-center/auto-pilot/(id)/target-direction`). .. note:: An error will be thrown if this property is set to a reference frame that rotates with the vessel being controlled, as it is impossible to rotate the vessel in such a reference frame. The target and the :http:get:`/space-center/auto-pilot/(id)/up-reference` are held as vectors in this frame, so changing it re-interprets them in the new frame rather than converting them: the orientation the vessel is held in, and what a given :http:get:`/space-center/auto-pilot/(id)/target-roll` means, both change. Set the frame first, then the target. With a :http:get:`/space-center/auto-pilot/(id)/target-smoothing-time`, the vessel turns smoothly to the new target from the orientation it was holding. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson SpaceCenter.ReferenceFrame value: .. http:put:: /space-center/auto-pilot/(id)/reference-frame The reference frame for the target direction (:http:get:`/space-center/auto-pilot/(id)/target-direction`). .. note:: An error will be thrown if this property is set to a reference frame that rotates with the vessel being controlled, as it is impossible to rotate the vessel in such a reference frame. The target and the :http:get:`/space-center/auto-pilot/(id)/up-reference` are held as vectors in this frame, so changing it re-interprets them in the new frame rather than converting them: the orientation the vessel is held in, and what a given :http:get:`/space-center/auto-pilot/(id)/target-roll` means, both change. Set the frame first, then the target. With a :http:get:`/space-center/auto-pilot/(id)/target-smoothing-time`, the vessel turns smoothly to the new target from the orientation it was holding. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson SpaceCenter.ReferenceFrame value: The new value. .. http:get:: /space-center/auto-pilot/(id)/target-pitch The target pitch, in degrees, between -90° and +90°. .. note:: A convenience for aiming the nose by angle. Heading (and hence roll) is ill-defined when the nose is near vertical (a pitch near -90° or +90°). Near the vertical prefer :http:get:`/space-center/auto-pilot/(id)/target-direction` or :http:post:`/space-center/auto-pilot/(id)/set-direction-and-up`. The setter preserves the current roll relative to :http:get:`/space-center/auto-pilot/(id)/up-reference`. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson float value: .. http:put:: /space-center/auto-pilot/(id)/target-pitch The target pitch, in degrees, between -90° and +90°. .. note:: A convenience for aiming the nose by angle. Heading (and hence roll) is ill-defined when the nose is near vertical (a pitch near -90° or +90°). Near the vertical prefer :http:get:`/space-center/auto-pilot/(id)/target-direction` or :http:post:`/space-center/auto-pilot/(id)/set-direction-and-up`. The setter preserves the current roll relative to :http:get:`/space-center/auto-pilot/(id)/up-reference`. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson float value: The new value. .. http:get:: /space-center/auto-pilot/(id)/target-heading The target heading, in degrees, between 0° and 360°. .. note:: A convenience for aiming the nose by angle, ill-defined when the nose is near vertical (a pitch near -90° or +90°). See :http:get:`/space-center/auto-pilot/(id)/target-pitch`. The setter preserves the current roll relative to :http:get:`/space-center/auto-pilot/(id)/up-reference`. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson float value: .. http:put:: /space-center/auto-pilot/(id)/target-heading The target heading, in degrees, between 0° and 360°. .. note:: A convenience for aiming the nose by angle, ill-defined when the nose is near vertical (a pitch near -90° or +90°). See :http:get:`/space-center/auto-pilot/(id)/target-pitch`. The setter preserves the current roll relative to :http:get:`/space-center/auto-pilot/(id)/up-reference`. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson float value: The new value. .. http:get:: /space-center/auto-pilot/(id)/target-roll The target roll, in degrees, measured about the vessel's nose relative to the :http:get:`/space-center/auto-pilot/(id)/up-reference` (roll 0 aligns the vessel's dorsal/roof axis with the reference; positive roll banks right). ``NaN`` if no target roll is set. .. note:: When left unset (``NaN``) the auto-pilot suppresses roll rotation, driving the roll rate to zero instead of holding a specific roll angle. Setting a value re-rolls the current target to that angle relative to the up reference while keeping the nose direction. With the default reference (the frame's up) this is the roll away from the vertical, and is ill-defined only when the nose points along the reference (near straight up or down). To hold a well-defined roll through the vertical, such as through a gravity turn, set the up reference off the flight path (see :http:post:`/space-center/auto-pilot/(id)/set-direction-and-up` / :http:get:`/space-center/auto-pilot/(id)/up-reference`). :param id: The identifier of the :ref:`AutoPilot ` object. :resjson float value: .. http:put:: /space-center/auto-pilot/(id)/target-roll The target roll, in degrees, measured about the vessel's nose relative to the :http:get:`/space-center/auto-pilot/(id)/up-reference` (roll 0 aligns the vessel's dorsal/roof axis with the reference; positive roll banks right). ``NaN`` if no target roll is set. .. note:: When left unset (``NaN``) the auto-pilot suppresses roll rotation, driving the roll rate to zero instead of holding a specific roll angle. Setting a value re-rolls the current target to that angle relative to the up reference while keeping the nose direction. With the default reference (the frame's up) this is the roll away from the vertical, and is ill-defined only when the nose points along the reference (near straight up or down). To hold a well-defined roll through the vertical, such as through a gravity turn, set the up reference off the flight path (see :http:post:`/space-center/auto-pilot/(id)/set-direction-and-up` / :http:get:`/space-center/auto-pilot/(id)/up-reference`). :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson float value: The new value. .. http:get:: /space-center/auto-pilot/(id)/up-reference The reference direction, in the reference frame specified by :http:get:`/space-center/auto-pilot/(id)/reference-frame`, that :http:get:`/space-center/auto-pilot/(id)/target-roll` is measured against: at roll 0 the vessel's dorsal (roof) axis is aligned with this vector's component perpendicular to the nose. Defaults to the frame's up (the zenith / radial-out direction). .. note:: Setting this re-anchors how roll is measured without moving the current target, so the reference can be set once and then rolls commanded against it with :http:get:`/space-center/auto-pilot/(id)/target-roll` while the nose direction changes freely. It is also set as a side effect of :http:post:`/space-center/auto-pilot/(id)/set-direction-and-up`. Setting the target rotation, target direction, or the scalar pitch/heading leaves it unchanged. Choosing a reference off the flight path keeps roll well-defined through the vertical. Because roll is measured against this reference, changing it changes the angle that :http:get:`/space-center/auto-pilot/(id)/target-roll` and :http:get:`/space-center/auto-pilot/(id)/current-target-roll` report, even though the vessel is still being held in exactly the same orientation. Set the reference first and the roll afterwards, or set both at once with :http:post:`/space-center/auto-pilot/(id)/set-direction-and-up`. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson tuple value: .. http:put:: /space-center/auto-pilot/(id)/up-reference The reference direction, in the reference frame specified by :http:get:`/space-center/auto-pilot/(id)/reference-frame`, that :http:get:`/space-center/auto-pilot/(id)/target-roll` is measured against: at roll 0 the vessel's dorsal (roof) axis is aligned with this vector's component perpendicular to the nose. Defaults to the frame's up (the zenith / radial-out direction). .. note:: Setting this re-anchors how roll is measured without moving the current target, so the reference can be set once and then rolls commanded against it with :http:get:`/space-center/auto-pilot/(id)/target-roll` while the nose direction changes freely. It is also set as a side effect of :http:post:`/space-center/auto-pilot/(id)/set-direction-and-up`. Setting the target rotation, target direction, or the scalar pitch/heading leaves it unchanged. Choosing a reference off the flight path keeps roll well-defined through the vertical. Because roll is measured against this reference, changing it changes the angle that :http:get:`/space-center/auto-pilot/(id)/target-roll` and :http:get:`/space-center/auto-pilot/(id)/current-target-roll` report, even though the vessel is still being held in exactly the same orientation. Set the reference first and the roll afterwards, or set both at once with :http:post:`/space-center/auto-pilot/(id)/set-direction-and-up`. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson tuple value: The new value. .. http:post:: /space-center/auto-pilot/(id)/target-pitch-and-heading Set target pitch and heading angles. .. note:: A convenience for aiming the nose by angle; heading is ill-defined when the nose is near vertical (a pitch near -90° or +90°), so near the vertical prefer :http:get:`/space-center/auto-pilot/(id)/target-direction` or :http:post:`/space-center/auto-pilot/(id)/set-direction-and-up`. Preserves the current roll relative to :http:get:`/space-center/auto-pilot/(id)/up-reference`. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson float pitch: Target pitch angle, in degrees between -90° and +90°. :reqjson float heading: Target heading angle, in degrees between 0° and 360°. .. http:get:: /space-center/auto-pilot/(id)/target-direction Direction vector corresponding to the target pitch and heading. This is in the reference frame specified by :http:get:`/space-center/auto-pilot/(id)/reference-frame`. .. note:: The setter re-aims the nose and nothing else: it preserves the current :http:get:`/space-center/auto-pilot/(id)/target-roll` relative to :http:get:`/space-center/auto-pilot/(id)/up-reference`, and leaves roll suppressed if no target roll is set. Point the nose repeatedly and a commanded roll is held throughout. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson tuple value: .. http:put:: /space-center/auto-pilot/(id)/target-direction Direction vector corresponding to the target pitch and heading. This is in the reference frame specified by :http:get:`/space-center/auto-pilot/(id)/reference-frame`. .. note:: The setter re-aims the nose and nothing else: it preserves the current :http:get:`/space-center/auto-pilot/(id)/target-roll` relative to :http:get:`/space-center/auto-pilot/(id)/up-reference`, and leaves roll suppressed if no target roll is set. Point the nose repeatedly and a commanded roll is held throughout. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson tuple value: The new value. .. http:get:: /space-center/auto-pilot/(id)/target-rotation The target rotation quaternion. Setting this also sets the target roll. This is in the reference frame specified by :http:get:`/space-center/auto-pilot/(id)/reference-frame`. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson tuple value: .. http:put:: /space-center/auto-pilot/(id)/target-rotation The target rotation quaternion. Setting this also sets the target roll. This is in the reference frame specified by :http:get:`/space-center/auto-pilot/(id)/reference-frame`. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson tuple value: The new value. .. http:post:: /space-center/auto-pilot/(id)/set-direction-and-up Set the target attitude from a nose direction and an up vector: point the nose along *direction* and roll so the vessel's dorsal (roof) axis aligns with *up* (its component perpendicular to the nose), then apply an optional *roll* offset about the nose. Both vectors are in the reference frame specified by :http:get:`/space-center/auto-pilot/(id)/reference-frame`. .. note:: This is the way to hold a well-defined orientation through a maneuver such as a gravity turn: pass a fixed *up* (say north) and the roll stays defined the whole way, with no singularity at the vertical. It is well-defined for every nose direction except *up* parallel to *direction* (asking the roof to point where the nose already points), where it falls back to pointing the nose only. Equivalent to setting :http:get:`/space-center/auto-pilot/(id)/up-reference` to *up*, aiming at *direction* and setting :http:get:`/space-center/auto-pilot/(id)/target-roll` to *roll*. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson tuple direction: The direction to point the nose in. :reqjson tuple up: The reference direction the roof is rolled towards. Need not be normalized or perpendicular to *direction*, as its component perpendicular to the nose is used. Stored as the :http:get:`/space-center/auto-pilot/(id)/up-reference`. :reqjson float roll: An additional roll about the nose, in degrees (positive banks right). Defaults to 0. Optional, defaults to ``0.0``. .. http:get:: /space-center/auto-pilot/(id)/current-target-pitch The current target pitch the auto-pilot is tracking, in degrees. When :http:get:`/space-center/auto-pilot/(id)/target-smoothing-time` is non-zero this lags the commanded :http:get:`/space-center/auto-pilot/(id)/target-pitch` while a change is slewed in; otherwise the two are equal. A convenience scalar, ill-defined near the vertical. See :http:get:`/space-center/auto-pilot/(id)/target-pitch`. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson float value: .. http:get:: /space-center/auto-pilot/(id)/current-target-heading The current target heading the auto-pilot is tracking, in degrees. When :http:get:`/space-center/auto-pilot/(id)/target-smoothing-time` is non-zero this lags the commanded :http:get:`/space-center/auto-pilot/(id)/target-heading` while a change is slewed in; otherwise the two are equal. A convenience scalar, ill-defined near the vertical. See :http:get:`/space-center/auto-pilot/(id)/target-heading`. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson float value: .. http:get:: /space-center/auto-pilot/(id)/current-target-roll The current target roll the auto-pilot is tracking, in degrees. When :http:get:`/space-center/auto-pilot/(id)/target-smoothing-time` is non-zero this lags the commanded :http:get:`/space-center/auto-pilot/(id)/target-roll` while a change is slewed in; otherwise the two are equal. ``NaN`` if no target roll is set. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson float value: .. http:get:: /space-center/auto-pilot/(id)/current-target-direction Direction vector corresponding to the current target pitch and heading (see :http:get:`/space-center/auto-pilot/(id)/current-target-pitch`), in the reference frame specified by :http:get:`/space-center/auto-pilot/(id)/reference-frame`. Lags :http:get:`/space-center/auto-pilot/(id)/target-direction` while a change is slewed in when :http:get:`/space-center/auto-pilot/(id)/target-smoothing-time` is non-zero. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson tuple value: .. http:get:: /space-center/auto-pilot/(id)/current-target-rotation The current target rotation quaternion the auto-pilot is tracking, in the reference frame specified by :http:get:`/space-center/auto-pilot/(id)/reference-frame`. Lags :http:get:`/space-center/auto-pilot/(id)/target-rotation` while a change is slewed in when :http:get:`/space-center/auto-pilot/(id)/target-smoothing-time` is non-zero. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson tuple value: .. http:post:: /space-center/auto-pilot/(id)/wait Blocks until the vessel is pointing in the target direction and has the target roll (if set). Throws an exception if the auto-pilot has not been engaged. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson double timeout: Maximum time to wait in seconds. If not specified, waits indefinitely. Optional, defaults to ``-1.0``. .. http:get:: /space-center/auto-pilot/(id)/stopping-angle-threshold The threshold, in degrees, below which the pointing error must fall for :http:post:`/space-center/auto-pilot/(id)/wait` to return. Defaults to 1 degree. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson float value: .. http:put:: /space-center/auto-pilot/(id)/stopping-angle-threshold The threshold, in degrees, below which the pointing error must fall for :http:post:`/space-center/auto-pilot/(id)/wait` to return. Defaults to 1 degree. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson float value: The new value. .. http:get:: /space-center/auto-pilot/(id)/stopping-velocity-threshold The threshold angular velocity, in :math:`\mathrm{rad/s}`, below which the vessel's angular velocity relative to the target must fall for :http:post:`/space-center/auto-pilot/(id)/wait` to return. Defaults to 0.05 :math:`\mathrm{rad/s}`. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson float value: .. http:put:: /space-center/auto-pilot/(id)/stopping-velocity-threshold The threshold angular velocity, in :math:`\mathrm{rad/s}`, below which the vessel's angular velocity relative to the target must fall for :http:post:`/space-center/auto-pilot/(id)/wait` to return. Defaults to 0.05 :math:`\mathrm{rad/s}`. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson float value: The new value. .. http:get:: /space-center/auto-pilot/(id)/error The error, in degrees, between the direction the ship has been asked to point in and the direction it is pointing in. Throws an exception if the auto-pilot has not been engaged and SAS is not enabled or is in stability assist mode. .. note:: This is the error relative to the commanded target. While a change is being slewed in (see :http:get:`/space-center/auto-pilot/(id)/target-smoothing-time`) it differs from :http:get:`/space-center/auto-pilot/(id)/current-error`, the error relative to the target the auto-pilot is currently tracking. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson float value: .. http:get:: /space-center/auto-pilot/(id)/attitude-error The per-axis attitude error ``(pitch, yaw, roll)``, in degrees, between the vessel's current attitude and the commanded target. All three components come from one singularity-free residual decomposition, so they stay well-defined near the vertical (unlike a subtraction of pitch/heading/roll angles). The scalar :http:get:`/space-center/auto-pilot/(id)/pitch-error`, :http:get:`/space-center/auto-pilot/(id)/heading-error` and :http:get:`/space-center/auto-pilot/(id)/roll-error` are the magnitudes of the pitch, yaw and roll components respectively. Throws an exception if the auto-pilot has not been engaged. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson tuple value: .. http:get:: /space-center/auto-pilot/(id)/pitch-error The error, in degrees, between the vessels current and target pitch. Throws an exception if the auto-pilot has not been engaged. .. note:: The pitch component of :http:get:`/space-center/auto-pilot/(id)/attitude-error`, the pitch part of the direction error resolved in the roll-invariant frame, well-defined near the vertical. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson float value: .. http:get:: /space-center/auto-pilot/(id)/heading-error The error, in degrees, between the vessels current and target heading. Throws an exception if the auto-pilot has not been engaged. .. note:: The yaw component of :http:get:`/space-center/auto-pilot/(id)/attitude-error`, the yaw part of the direction error resolved in the roll-invariant frame, well-defined near the vertical, where the absolute heading is undefined at the pole. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson float value: .. http:get:: /space-center/auto-pilot/(id)/roll-error The error, in degrees, between the vessels current and target roll. Throws an exception if the auto-pilot has not been engaged or no target roll is set. .. note:: Measured about the vessel's nose axis, so it stays well-defined near the vertical singularity. A subtraction of pitch, heading and roll angles has a roll term that is ill-conditioned when the vessel points close to straight up or down. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson float value: .. http:get:: /space-center/auto-pilot/(id)/current-error The error, in degrees, between the direction the auto-pilot is currently tracking and the direction the ship is pointing in. Unlike :http:get:`/space-center/auto-pilot/(id)/error` (which is relative to the commanded target), this is relative to the slewed target the auto-pilot is currently holding, so it stays small while a smoothed change (see :http:get:`/space-center/auto-pilot/(id)/target-smoothing-time`) is fed in. Equal to :http:get:`/space-center/auto-pilot/(id)/error` when smoothing is off. Throws an exception if the auto-pilot has not been engaged. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson float value: .. http:get:: /space-center/auto-pilot/(id)/current-attitude-error The per-axis attitude error ``(pitch, yaw, roll)``, in degrees, between the vessel's current attitude and the target the auto-pilot is currently tracking (the slewed target, see :http:get:`/space-center/auto-pilot/(id)/current-target-rotation`). Like :http:get:`/space-center/auto-pilot/(id)/attitude-error` but relative to the current target, so it stays small while a smoothed change (see :http:get:`/space-center/auto-pilot/(id)/target-smoothing-time`) is fed in; equal to :http:get:`/space-center/auto-pilot/(id)/attitude-error` when smoothing is off. Throws an exception if the auto-pilot has not been engaged. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson tuple value: .. http:get:: /space-center/auto-pilot/(id)/current-pitch-error The error, in degrees, between the vessels current pitch and the pitch the auto-pilot is currently tracking (see :http:get:`/space-center/auto-pilot/(id)/current-target-pitch`). Throws an exception if the auto-pilot has not been engaged. .. note:: The pitch component of :http:get:`/space-center/auto-pilot/(id)/current-attitude-error`, well-defined near the vertical. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson float value: .. http:get:: /space-center/auto-pilot/(id)/current-heading-error The error, in degrees, between the vessels current heading and the heading the auto-pilot is currently tracking (see :http:get:`/space-center/auto-pilot/(id)/current-target-heading`). Throws an exception if the auto-pilot has not been engaged. .. note:: The yaw component of :http:get:`/space-center/auto-pilot/(id)/current-attitude-error`, well-defined near the vertical. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson float value: .. http:get:: /space-center/auto-pilot/(id)/current-roll-error The error, in degrees, between the vessels current roll and the roll the auto-pilot is currently tracking (see :http:get:`/space-center/auto-pilot/(id)/current-target-roll`). Throws an exception if the auto-pilot has not been engaged or no target roll is set. .. note:: Measured about the vessel's nose axis, so it stays well-defined near the vertical singularity. See :http:get:`/space-center/auto-pilot/(id)/roll-error`. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson float value: .. http:get:: /space-center/auto-pilot/(id)/roll-start-angle The direction error, in degrees, above which roll blending is fully suppressed. Defaults to 20 degrees. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson double value: .. http:put:: /space-center/auto-pilot/(id)/roll-start-angle The direction error, in degrees, above which roll blending is fully suppressed. Defaults to 20 degrees. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson double value: The new value. .. http:get:: /space-center/auto-pilot/(id)/roll-engage-angle The direction error, in degrees, below which roll is fully engaged. Roll blends linearly between :http:get:`/space-center/auto-pilot/(id)/roll-start-angle` and this value. Defaults to 15 degrees. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson double value: .. http:put:: /space-center/auto-pilot/(id)/roll-engage-angle The direction error, in degrees, below which roll is fully engaged. Roll blends linearly between :http:get:`/space-center/auto-pilot/(id)/roll-start-angle` and this value. Defaults to 15 degrees. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson double value: The new value. .. http:get:: /space-center/auto-pilot/(id)/max-angular-velocity The maximum angular velocity of the vessel, in :math:`\mathrm{rad/s}`, for each of the pitch, roll and yaw axes. Limits the target angular velocity computed by the bang-bang profile so that vessels with very high torque availability do not spin faster than desired. Defaults to 1 :math:`\mathrm{rad/s}` for each axis. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson tuple value: .. http:put:: /space-center/auto-pilot/(id)/max-angular-velocity The maximum angular velocity of the vessel, in :math:`\mathrm{rad/s}`, for each of the pitch, roll and yaw axes. Limits the target angular velocity computed by the bang-bang profile so that vessels with very high torque availability do not spin faster than desired. Defaults to 1 :math:`\mathrm{rad/s}` for each axis. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson tuple value: The new value. .. http:get:: /space-center/auto-pilot/(id)/limit-angular-velocity Whether to also limit the angular velocity to what the control surfaces hold against the aerodynamic forces. Defaults to ``true``. .. note:: When disabled, only :http:get:`/space-center/auto-pilot/(id)/max-angular-velocity` limits the angular velocity. Not applied when Ferram Aerospace Research is installed. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson bool value: .. http:put:: /space-center/auto-pilot/(id)/limit-angular-velocity Whether to also limit the angular velocity to what the control surfaces hold against the aerodynamic forces. Defaults to ``true``. .. note:: When disabled, only :http:get:`/space-center/auto-pilot/(id)/max-angular-velocity` limits the angular velocity. Not applied when Ferram Aerospace Research is installed. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson bool value: The new value. .. http:get:: /space-center/auto-pilot/(id)/pitch-yaw-attenuation-angle The angle, in degrees, at which the autopilot considers the vessel to be pointing close to the target direction. This sets the high angle of the pitch/yaw pointing deadband: at or above this error the target velocity is at full, and below it the target velocity ramps linearly to zero at half this angle, so the vessel coasts to a stop. Pitch and yaw are controlled jointly, so a single angle applies to both. Defaults to 1°. The angle in use shrinks in proportion to the share of the torque that comes from control surfaces. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson double value: .. http:put:: /space-center/auto-pilot/(id)/pitch-yaw-attenuation-angle The angle, in degrees, at which the autopilot considers the vessel to be pointing close to the target direction. This sets the high angle of the pitch/yaw pointing deadband: at or above this error the target velocity is at full, and below it the target velocity ramps linearly to zero at half this angle, so the vessel coasts to a stop. Pitch and yaw are controlled jointly, so a single angle applies to both. Defaults to 1°. The angle in use shrinks in proportion to the share of the torque that comes from control surfaces. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson double value: The new value. .. http:get:: /space-center/auto-pilot/(id)/roll-attenuation-angle The angle, in degrees, at which the autopilot considers the vessel to be pointing close to the target roll. This sets the high angle of the roll-axis pointing deadband: at or above this error the target velocity is at full, and below it the target velocity ramps linearly to zero at half this angle, so the roll coasts to a stop. Defaults to 1°. The angle in use shrinks in proportion to the share of the torque that comes from control surfaces. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson double value: .. http:put:: /space-center/auto-pilot/(id)/roll-attenuation-angle The angle, in degrees, at which the autopilot considers the vessel to be pointing close to the target roll. This sets the high angle of the roll-axis pointing deadband: at or above this error the target velocity is at full, and below it the target velocity ramps linearly to zero at half this angle, so the roll coasts to a stop. Defaults to 1°. The angle in use shrinks in proportion to the share of the torque that comes from control surfaces. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson double value: The new value. .. http:get:: /space-center/auto-pilot/(id)/auto-tune Whether the rotation rate controllers PID parameters should be automatically tuned using the vessels moment of inertia and available torque. Defaults to ``true``. See :http:get:`/space-center/auto-pilot/(id)/time-to-peak` and :http:get:`/space-center/auto-pilot/(id)/overshoot`. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson bool value: .. http:put:: /space-center/auto-pilot/(id)/auto-tune Whether the rotation rate controllers PID parameters should be automatically tuned using the vessels moment of inertia and available torque. Defaults to ``true``. See :http:get:`/space-center/auto-pilot/(id)/time-to-peak` and :http:get:`/space-center/auto-pilot/(id)/overshoot`. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson bool value: The new value. .. http:get:: /space-center/auto-pilot/(id)/time-to-peak The target time to peak used to autotune the PID controllers. A vector of three times, in seconds, for each of the pitch, roll and yaw axes. Defaults to 1 second for each axis. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson tuple value: .. http:put:: /space-center/auto-pilot/(id)/time-to-peak The target time to peak used to autotune the PID controllers. A vector of three times, in seconds, for each of the pitch, roll and yaw axes. Defaults to 1 second for each axis. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson tuple value: The new value. .. http:get:: /space-center/auto-pilot/(id)/soft-start-time The duration, in seconds, over which the control output is faded in when the autopilot is engaged. This soft-start spreads the engagement transient over many physics ticks so engaging (on the pad or mid-flight) does not command a near-maximum control deflection that can excite an oscillation. Defaults to 0.5 seconds. Set to 0 to disable the fade-in. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson double value: .. http:put:: /space-center/auto-pilot/(id)/soft-start-time The duration, in seconds, over which the control output is faded in when the autopilot is engaged. This soft-start spreads the engagement transient over many physics ticks so engaging (on the pad or mid-flight) does not command a near-maximum control deflection that can excite an oscillation. Defaults to 0.5 seconds. Set to 0 to disable the fade-in. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson double value: The new value. .. http:get:: /space-center/auto-pilot/(id)/target-smoothing-time The duration, in seconds, over which a change to the target attitude is applied to the control target. When set above zero, changing the target pitch, heading, roll, direction or rotation makes the effective control target ramp smoothly (a constant-rate rotation) from its current value to the new value over this many seconds, rather than jumping instantly. This lets a slow control loop drive a smooth maneuver (for example a gravity turn) without inducing oscillation from stepwise target changes. Defaults to 0 (instantaneous). :param id: The identifier of the :ref:`AutoPilot ` object. :resjson double value: .. http:put:: /space-center/auto-pilot/(id)/target-smoothing-time The duration, in seconds, over which a change to the target attitude is applied to the control target. When set above zero, changing the target pitch, heading, roll, direction or rotation makes the effective control target ramp smoothly (a constant-rate rotation) from its current value to the new value over this many seconds, rather than jumping instantly. This lets a slow control loop drive a smooth maneuver (for example a gravity turn) without inducing oscillation from stepwise target changes. Defaults to 0 (instantaneous). :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson double value: The new value. .. http:get:: /space-center/auto-pilot/(id)/overshoot The target overshoot percentage used to autotune the PID controllers. A vector of three values, between 0 and 1, for each of the pitch, roll and yaw axes. Defaults to 0.01 for each axis. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson tuple value: .. http:put:: /space-center/auto-pilot/(id)/overshoot The target overshoot percentage used to autotune the PID controllers. A vector of three values, between 0 and 1, for each of the pitch, roll and yaw axes. Defaults to 0.01 for each axis. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson tuple value: The new value. .. http:get:: /space-center/auto-pilot/(id)/pitch-pid-gains Gains for the pitch PID controller. .. note:: When :http:get:`/space-center/auto-pilot/(id)/auto-tune` is true, these values are updated automatically, which will overwrite any manual changes. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson tuple value: .. http:put:: /space-center/auto-pilot/(id)/pitch-pid-gains Gains for the pitch PID controller. .. note:: When :http:get:`/space-center/auto-pilot/(id)/auto-tune` is true, these values are updated automatically, which will overwrite any manual changes. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson tuple value: The new value. .. http:get:: /space-center/auto-pilot/(id)/roll-pid-gains Gains for the roll PID controller. .. note:: When :http:get:`/space-center/auto-pilot/(id)/auto-tune` is true, these values are updated automatically, which will overwrite any manual changes. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson tuple value: .. http:put:: /space-center/auto-pilot/(id)/roll-pid-gains Gains for the roll PID controller. .. note:: When :http:get:`/space-center/auto-pilot/(id)/auto-tune` is true, these values are updated automatically, which will overwrite any manual changes. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson tuple value: The new value. .. http:get:: /space-center/auto-pilot/(id)/yaw-pid-gains Gains for the yaw PID controller. .. note:: When :http:get:`/space-center/auto-pilot/(id)/auto-tune` is true, these values are updated automatically, which will overwrite any manual changes. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson tuple value: .. http:put:: /space-center/auto-pilot/(id)/yaw-pid-gains Gains for the yaw PID controller. .. note:: When :http:get:`/space-center/auto-pilot/(id)/auto-tune` is true, these values are updated automatically, which will overwrite any manual changes. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson tuple value: The new value. .. http:get:: /space-center/auto-pilot/(id)/pitch-yaw-rate-filter-mode Controls the rate-feedback filtering (the wobble-suppression filter on the measured angular velocity) for the pitch and yaw axes of a structurally flexible vessel. When ``"automatic"`` (the default) the auto-pilot detects the oscillation at runtime, estimates its frequency and routes it to the appropriate tool (a notch filter for a low-frequency mode near the control band, a low-pass for a high-frequency mode). ``"off"`` disables rate filtering only, leaving the other oscillation mitigations unaffected. ``"notch"`` and ``"low_pass"`` force the respective tool unconditionally at :http:get:`/space-center/auto-pilot/(id)/pitch-yaw-oscillation-frequency`, for a vessel known in advance to be flexible. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson SpaceCenter.RateFilterMode value: .. http:put:: /space-center/auto-pilot/(id)/pitch-yaw-rate-filter-mode Controls the rate-feedback filtering (the wobble-suppression filter on the measured angular velocity) for the pitch and yaw axes of a structurally flexible vessel. When ``"automatic"`` (the default) the auto-pilot detects the oscillation at runtime, estimates its frequency and routes it to the appropriate tool (a notch filter for a low-frequency mode near the control band, a low-pass for a high-frequency mode). ``"off"`` disables rate filtering only, leaving the other oscillation mitigations unaffected. ``"notch"`` and ``"low_pass"`` force the respective tool unconditionally at :http:get:`/space-center/auto-pilot/(id)/pitch-yaw-oscillation-frequency`, for a vessel known in advance to be flexible. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson SpaceCenter.RateFilterMode value: The new value. .. http:get:: /space-center/auto-pilot/(id)/roll-rate-filter-mode Controls the rate-feedback filtering for the roll axis. Behaves as :http:get:`/space-center/auto-pilot/(id)/pitch-yaw-rate-filter-mode` but for roll, using :http:get:`/space-center/auto-pilot/(id)/roll-oscillation-frequency`. Defaults to ``"automatic"``. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson SpaceCenter.RateFilterMode value: .. http:put:: /space-center/auto-pilot/(id)/roll-rate-filter-mode Controls the rate-feedback filtering for the roll axis. Behaves as :http:get:`/space-center/auto-pilot/(id)/pitch-yaw-rate-filter-mode` but for roll, using :http:get:`/space-center/auto-pilot/(id)/roll-oscillation-frequency`. Defaults to ``"automatic"``. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson SpaceCenter.RateFilterMode value: The new value. .. http:get:: /space-center/auto-pilot/(id)/pitch-yaw-oscillation-frequency The structural mode frequency, in Hz, for the pitch/yaw axis group. Used directly as the filter frequency in ``"notch"`` / ``"low_pass"`` mode, and as the seed for the automatic frequency estimator before it acquires. Defaults to 1.5 Hz. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson double value: .. http:put:: /space-center/auto-pilot/(id)/pitch-yaw-oscillation-frequency The structural mode frequency, in Hz, for the pitch/yaw axis group. Used directly as the filter frequency in ``"notch"`` / ``"low_pass"`` mode, and as the seed for the automatic frequency estimator before it acquires. Defaults to 1.5 Hz. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson double value: The new value. .. http:get:: /space-center/auto-pilot/(id)/roll-oscillation-frequency The structural mode frequency, in Hz, for the roll axis. Behaves as :http:get:`/space-center/auto-pilot/(id)/pitch-yaw-oscillation-frequency` but for roll. Defaults to 1.5 Hz. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson double value: .. http:put:: /space-center/auto-pilot/(id)/roll-oscillation-frequency The structural mode frequency, in Hz, for the roll axis. Behaves as :http:get:`/space-center/auto-pilot/(id)/pitch-yaw-oscillation-frequency` but for roll. Defaults to 1.5 Hz. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson double value: The new value. .. http:get:: /space-center/auto-pilot/(id)/oscillation-notch-q The quality factor of the notch filter used to suppress a low-frequency structural mode. A higher value gives a narrower notch (less in-band control lag but less tolerance to the mode frequency drifting); a lower value gives a wider notch. Defaults to 2.5. This is an advanced tuning parameter. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson double value: .. http:put:: /space-center/auto-pilot/(id)/oscillation-notch-q The quality factor of the notch filter used to suppress a low-frequency structural mode. A higher value gives a narrower notch (less in-band control lag but less tolerance to the mode frequency drifting); a lower value gives a wider notch. Defaults to 2.5. This is an advanced tuning parameter. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson double value: The new value. .. http:get:: /space-center/auto-pilot/(id)/oscillation-bandwidth-floor-mode Controls the bandwidth-floor mitigation: the reduction of the inner control loop bandwidth on a structurally flexible axis, the primary oscillation stabilizer. When ``"automatic"`` (the default) it engages on a latched axis while holding (and during a detected limit cycle). ``"off"`` never reduces the bandwidth; ``"forced"`` keeps it fully reduced at all times. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson SpaceCenter.MitigationMode value: .. http:put:: /space-center/auto-pilot/(id)/oscillation-bandwidth-floor-mode Controls the bandwidth-floor mitigation: the reduction of the inner control loop bandwidth on a structurally flexible axis, the primary oscillation stabilizer. When ``"automatic"`` (the default) it engages on a latched axis while holding (and during a detected limit cycle). ``"off"`` never reduces the bandwidth; ``"forced"`` keeps it fully reduced at all times. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson SpaceCenter.MitigationMode value: The new value. .. http:get:: /space-center/auto-pilot/(id)/oscillation-bandwidth-floor The inner control loop bandwidth, in :math:`\mathrm{rad/s}`, that an axis is reduced towards while the bandwidth-floor mitigation is engaged on it. Lowering it suppresses oscillation more strongly; raising it keeps more control authority at the cost of allowing more wobble. Defaults to 1 :math:`\mathrm{rad/s}`. This is an advanced tuning parameter. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson double value: .. http:put:: /space-center/auto-pilot/(id)/oscillation-bandwidth-floor The inner control loop bandwidth, in :math:`\mathrm{rad/s}`, that an axis is reduced towards while the bandwidth-floor mitigation is engaged on it. Lowering it suppresses oscillation more strongly; raising it keeps more control authority at the cost of allowing more wobble. Defaults to 1 :math:`\mathrm{rad/s}`. This is an advanced tuning parameter. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson double value: The new value. .. http:get:: /space-center/auto-pilot/(id)/oscillation-feedforward-mode Controls the feedforward-cut mitigation: removal of the acceleration feedforward on a structurally flexible axis while holding, so it cannot re-excite a residual mode at the reduced bandwidth. When ``"automatic"`` (the default) it follows the hold gate on a latched axis. ``"off"`` never cuts the feedforward; ``"forced"`` always cuts it fully. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson SpaceCenter.MitigationMode value: .. http:put:: /space-center/auto-pilot/(id)/oscillation-feedforward-mode Controls the feedforward-cut mitigation: removal of the acceleration feedforward on a structurally flexible axis while holding, so it cannot re-excite a residual mode at the reduced bandwidth. When ``"automatic"`` (the default) it follows the hold gate on a latched axis. ``"off"`` never cuts the feedforward; ``"forced"`` always cuts it fully. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson SpaceCenter.MitigationMode value: The new value. .. http:get:: /space-center/auto-pilot/(id)/oscillation-output-filter-mode Controls the output-smoothing mitigation: a low-pass on the delivered actuator command that caps residual control chatter. When ``"automatic"`` (the default) it engages on a latched axis (and, lightly, while the oscillation detector is firing on an unlatched one). ``"off"`` never smooths; ``"forced"`` smooths fully at all times. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson SpaceCenter.MitigationMode value: .. http:put:: /space-center/auto-pilot/(id)/oscillation-output-filter-mode Controls the output-smoothing mitigation: a low-pass on the delivered actuator command that caps residual control chatter. When ``"automatic"`` (the default) it engages on a latched axis (and, lightly, while the oscillation detector is firing on an unlatched one). ``"off"`` never smooths; ``"forced"`` smooths fully at all times. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson SpaceCenter.MitigationMode value: The new value. .. http:get:: /space-center/auto-pilot/(id)/pitch-yaw-control-oscillation The current amplitude of control-output oscillation on the pitch/yaw axis group, measured as the deviation of the delivered control about its slowly-varying trim. A settled hold sits near zero; a sustained limit cycle drives it toward 1. Read-only. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson double value: .. http:get:: /space-center/auto-pilot/(id)/roll-control-oscillation The current amplitude of control-output oscillation on the roll axis, measured as the deviation of the delivered control about its slowly-varying trim. Read-only. See :http:get:`/space-center/auto-pilot/(id)/pitch-yaw-control-oscillation`. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson double value: .. http:get:: /space-center/auto-pilot/(id)/oscillation-level A measure, between 0 and 1 for each of the pitch, roll and yaw axes, of how strongly the auto-pilot currently detects structural oscillation (wobble) on that axis. 0 means none detected; values approaching 1 mean a sustained structural oscillation. Read-only. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson tuple value: .. http:get:: /space-center/auto-pilot/(id)/pitch-yaw-oscillation-latched Whether the auto-pilot has confirmed the pitch/yaw axes to be structurally flexible and latched oscillation suppression on for them. Read-only. See :http:get:`/space-center/auto-pilot/(id)/pitch-yaw-rate-filter-mode`. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson bool value: .. http:get:: /space-center/auto-pilot/(id)/roll-oscillation-latched Whether the auto-pilot has confirmed the roll axis to be structurally flexible and latched oscillation suppression on for it. Read-only. See :http:get:`/space-center/auto-pilot/(id)/roll-rate-filter-mode`. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson bool value: .. http:get:: /space-center/auto-pilot/(id)/pitch-yaw-oscillation-detected-frequency The structural oscillation frequency, in Hz, estimated by the automatic detector for the pitch/yaw axis group, or ``NaN`` until the estimator acquires. The estimator runs in all modes, so this is observable even when suppression is off or forced. Read-only. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson double value: .. http:get:: /space-center/auto-pilot/(id)/roll-oscillation-detected-frequency The structural oscillation frequency, in Hz, estimated by the automatic detector for the roll axis, or ``NaN`` until the estimator acquires. Read-only. See :http:get:`/space-center/auto-pilot/(id)/pitch-yaw-oscillation-detected-frequency`. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson double value: .. http:get:: /space-center/auto-pilot/(id)/diagnostic-logging When ``true``, records one row of diagnostic data per physics tick to an in-memory buffer (see :http:get:`/space-center/auto-pilot/(id)/diagnostic-log`), and echoes each row to Player.log prefixed with ``[KRPC.AP]``. The data is CSV: the first row is a header naming every column, and each subsequent row records the auto-pilot's full control-loop state for one tick (setpoints, errors, measured rates, gains, velocity-profile and feedforward internals, control outputs, and the oscillation detector/gate/mitigation state). The buffer is capped at 3000 data rows (one minute at the 50 Hz physics rate); when full, this property switches itself back to ``false`` and the buffer holds the minute following the enable. Setting to ``true`` clears the buffer. Defaults to ``false``. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson bool value: .. http:put:: /space-center/auto-pilot/(id)/diagnostic-logging When ``true``, records one row of diagnostic data per physics tick to an in-memory buffer (see :http:get:`/space-center/auto-pilot/(id)/diagnostic-log`), and echoes each row to Player.log prefixed with ``[KRPC.AP]``. The data is CSV: the first row is a header naming every column, and each subsequent row records the auto-pilot's full control-loop state for one tick (setpoints, errors, measured rates, gains, velocity-profile and feedforward internals, control outputs, and the oscillation detector/gate/mitigation state). The buffer is capped at 3000 data rows (one minute at the 50 Hz physics rate); when full, this property switches itself back to ``false`` and the buffer holds the minute following the enable. Setting to ``true`` clears the buffer. Defaults to ``false``. :param id: The identifier of the :ref:`AutoPilot ` object. :reqjson bool value: The new value. .. http:get:: /space-center/auto-pilot/(id)/diagnostic-log The diagnostic log collected since :http:get:`/space-center/auto-pilot/(id)/diagnostic-logging` was last set to ``true``: CSV text whose first line is the column header and each subsequent line records one physics tick. Vector-valued channels use one column per component (suffixed ``.p/.r/.y`` for pitch, roll, yaw); pitch-yaw-group/roll channel pairs are suffixed ``.py/.roll``. Returns an empty string if diagnostic logging has not been enabled or no ticks have occurred. :param id: The identifier of the :ref:`AutoPilot ` object. :resjson string value: .. _http-SpaceCenter.AutoPilotUpdateMode: .. rubric:: AutoPilotUpdateMode When the auto-pilot's control loop runs within a server update, relative to the calls the update executes. See :http:get:`/space-center/auto-pilot/(id)/update-mode`. Passed and returned as the name of one of its values: ``"after_calls"`` The default. The control loop runs once the update has executed the calls it received, so a target set during a tick is flown on that tick. ``"before_calls"`` The control loop runs before the update executes any calls, so calls made during a tick see the attitude error and control output it computed for that tick. ``"manual"`` The control loop runs only when :http:post:`/space-center/auto-pilot/(id)/update` is called, so a program chooses where among its own calls it runs. .. _http-SpaceCenter.RateFilterMode: .. rubric:: RateFilterMode Controls the auto-pilot's rate-feedback filtering for an axis group, the mitigation that removes a structural oscillation (wobble) from the measured angular velocity before the control loops consume it. See :http:get:`/space-center/auto-pilot/(id)/pitch-yaw-rate-filter-mode` and :http:get:`/space-center/auto-pilot/(id)/roll-rate-filter-mode`. Passed and returned as the name of one of its values: ``"automatic"`` The default. The auto-pilot detects structural oscillation at runtime, estimates its frequency and routes it to the appropriate filter: a notch for a low-frequency mode near the control band, a low-pass for a high-frequency mode, or a broadband low-pass while the frequency is not yet known. Rigid vessels are left untouched. ``"off"`` No rate filtering. The other oscillation mitigations are unaffected. ``"notch"`` Force a notch filter at the manually set frequency (:http:get:`/space-center/auto-pilot/(id)/pitch-yaw-oscillation-frequency` / :http:get:`/space-center/auto-pilot/(id)/roll-oscillation-frequency`), for a vessel whose structural mode is known in advance. ``"low_pass"`` Force a low-pass filter derived from the manually set frequency. .. _http-SpaceCenter.MitigationMode: .. rubric:: MitigationMode Controls one of the auto-pilot's individually-toggleable oscillation mitigations (:http:get:`/space-center/auto-pilot/(id)/oscillation-bandwidth-floor-mode`, :http:get:`/space-center/auto-pilot/(id)/oscillation-feedforward-mode`, :http:get:`/space-center/auto-pilot/(id)/oscillation-output-filter-mode`). Passed and returned as the name of one of its values: ``"automatic"`` The default: the mitigation engages automatically, driven by the runtime oscillation detector and the hold gate. Rigid vessels are left untouched. ``"off"`` The mitigation never engages. The other mitigations are unaffected. ``"forced"`` The mitigation is fully engaged at all times, regardless of what the oscillation detector reports.