.. default-domain:: py .. highlight:: py .. currentmodule:: SpaceCenter .. _python-api-parts: Parts ===== The following classes allow interaction with a vessel's individual parts. .. seealso:: The :std:ref:`parts guide ` walks the tree of parts, and explains fuel lines, stage numbers and part modules. .. contents:: :local: Parts ----- .. class:: Parts Instances of this class are used to interact with the parts of a vessel. An instance can be obtained by calling :attr:`Vessel.parts`. .. attribute:: all A list of all of the vessels parts. :Attribute: Read-only, cannot be set :rtype: list(:class:`Part`) .. attribute:: root The vessels root part. :Attribute: Read-only, cannot be set :rtype: :class:`Part` .. note:: See the discussion on :rst:ref:`user-guide-parts-tree`. .. attribute:: controlling The part from which the vessel is controlled. Returns ``None`` if the vessel has no control point, in which case it is oriented by its root part. :Attribute: Can be read or written :rtype: :class:`Part` or None :Game Scenes: Flight .. note:: A vessel gets no control point when it is created by a decoupler or an undocking and none of its parts is a command module with crew aboard. A probe core does not give it one either. Assign this property to choose the control point, which is equivalent to "Control From Here" in game. .. method:: with_name(name) A list of parts whose :attr:`Part.name` is *name*. :param str name: The name of the part. :rtype: list(:class:`Part`) .. method:: with_title(title) A list of all parts whose :attr:`Part.title` is *title*. :param str title: The title of the part. :rtype: list(:class:`Part`) .. method:: with_tag(tag) A list of all parts whose :attr:`Part.tag` is *tag*. :param str tag: The name tag of the part. :rtype: list(:class:`Part`) .. method:: with_module(module_name) A list of all parts that contain a :class:`Module` whose :attr:`Module.name` is *module_name*. :param str module_name: The name of the module. :rtype: list(:class:`Part`) .. method:: modules_with_name(module_name) A list of modules (combined across all parts in the vessel) whose :attr:`Module.name` is *module_name*. :param str module_name: The name of the module. :rtype: list(:class:`Module`) .. attribute:: antennas A list of all antennas in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`Antenna`) .. note:: A part with several antennas has an entry for each. If RemoteTech is installed, this will always return an empty list. To interact with RemoteTech antennas, use the RemoteTech service APIs. .. attribute:: cargo_bays A list of all cargo bays in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`CargoBay`) .. attribute:: control_surfaces A list of all control surfaces in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`ControlSurface`) .. attribute:: decouplers A list of all decouplers in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`Decoupler`) .. attribute:: docking_ports A list of all docking ports in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`DockingPort`) .. attribute:: engines A list of all engines in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`Engine`) .. note:: This includes any part that generates thrust. This covers many different types of engine, including liquid fuel rockets, solid rocket boosters, jet engines and RCS thrusters. .. attribute:: experiments A list of all science experiments in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`Experiment`) .. attribute:: fairings A list of all fairings in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`Fairing`) .. attribute:: intakes A list of all intakes in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`Intake`) .. attribute:: legs A list of all landing legs attached to the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`Leg`) .. attribute:: launch_clamps A list of all launch clamps attached to the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`LaunchClamp`) .. attribute:: lights A list of all lights in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`Light`) .. attribute:: parachutes A list of all parachutes in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`Parachute`) .. attribute:: radiators A list of all radiators in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`Radiator`) .. attribute:: resource_drains A list of all resource drains in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`ResourceDrain`) .. attribute:: rcs A list of all RCS blocks/thrusters in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`RCS`) .. attribute:: reaction_wheels A list of all reaction wheels in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`ReactionWheel`) .. attribute:: resource_converters A list of all resource converters in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`ResourceConverter`) .. attribute:: resource_harvesters A list of all resource harvesters in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`ResourceHarvester`) .. attribute:: robotic_controllers A list of all robotic controllers in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`RoboticController`) .. attribute:: robotic_hinges A list of all robotic hinges in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`RoboticHinge`) .. attribute:: robotic_pistons A list of all robotic pistons in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`RoboticPiston`) .. attribute:: robotic_rotations A list of all robotic rotations in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`RoboticRotation`) .. attribute:: robotic_rotors A list of all robotic rotors in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`RoboticRotor`) .. attribute:: sensors A list of all sensors in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`Sensor`) .. attribute:: solar_panels A list of all solar panels in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`SolarPanel`) .. attribute:: wheels A list of all wheels in the vessel. :Attribute: Read-only, cannot be set :rtype: list(:class:`Wheel`) Part ---- .. class:: Part Represents an individual part. Vessels are made up of multiple parts. Instances of this class can be obtained by several methods in :class:`Parts`. .. attribute:: name Internal name of the part, as used in `part cfg files `_. For example "Mark1-2Pod". :Attribute: Read-only, cannot be set :rtype: str .. attribute:: title Title of the part, as shown when the part is right clicked in-game. For example "Mk1-2 Command Pod". :Attribute: Read-only, cannot be set :rtype: str .. attribute:: config The static configuration of the part, as found in its `part cfg file `_. This provides access to data that is not exposed elsewhere, such as the configuration of the part's modules. Returns ``None`` if the part has no associated configuration node. :Attribute: Read-only, cannot be set :rtype: :class:`ConfigNode` .. attribute:: tag The name tag for the part. Can be set to a custom string using the in-game user interface. Throws an exception if no name tag part module is installed. :Attribute: Can be read or written :rtype: str .. note:: Requires KSPCommunityPartModules 0.5 or later, or kOS, which share one name tag. .. attribute:: flag_url The asset URL for the part's flag. :Attribute: Can be read or written :rtype: str .. attribute:: highlighted Whether the part is highlighted. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. note:: The highlighting is removed when the client that enabled it disconnects. .. attribute:: highlight_color The color used to highlight the part. :Attribute: Can be read or written :rtype: :class:`StdLib.ColorRGB` :Game Scenes: Flight .. attribute:: cost The cost of the part with its resources full, in units of funds. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: vessel The vessel that contains this part. :Attribute: Read-only, cannot be set :rtype: :class:`Vessel` :Game Scenes: Flight .. attribute:: parent The parts parent. Returns ``None`` if the part does not have a parent. This, in combination with :attr:`Part.children`, can be used to traverse the vessels parts tree. :Attribute: Read-only, cannot be set :rtype: :class:`Part` or None .. note:: See the discussion on :rst:ref:`user-guide-parts-tree`. .. attribute:: children The parts children. Returns an empty list if the part has no children. This, in combination with :attr:`Part.parent`, can be used to traverse the vessels parts tree. :Attribute: Read-only, cannot be set :rtype: list(:class:`Part`) .. note:: See the discussion on :rst:ref:`user-guide-parts-tree`. .. attribute:: axially_attached Whether the part is axially attached to its parent, i.e. on the top or bottom of its parent. If the part has no parent, returns ``False``. :Attribute: Read-only, cannot be set :rtype: bool .. note:: See the discussion on :rst:ref:`user-guide-parts-attachment-modes`. .. attribute:: radially_attached Whether the part is radially attached to its parent, i.e. on the side of its parent. If the part has no parent, returns ``False``. :Attribute: Read-only, cannot be set :rtype: bool .. note:: See the discussion on :rst:ref:`user-guide-parts-attachment-modes`. .. attribute:: stage The stage in which this part will be activated. Returns -1 if the part is not activated by staging. :Attribute: Read-only, cannot be set :rtype: int .. note:: See the discussion on :rst:ref:`user-guide-parts-staging`. .. attribute:: decouple_stage The stage in which this part will be decoupled. Returns -1 if the part is never decoupled from the vessel. :Attribute: Read-only, cannot be set :rtype: int .. note:: See the discussion on :rst:ref:`user-guide-parts-staging`. .. attribute:: massless Whether the part is `massless `_. :Attribute: Read-only, cannot be set :rtype: bool .. attribute:: mass The current mass of the part, including resources it contains, in kilograms. Returns zero if the part is massless. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: dry_mass The mass of the part, not including any resources it contains, in kilograms. Returns zero if the part is massless. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: shielded Whether the part is shielded from the exterior of the vessel, for example by a fairing. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. attribute:: dynamic_pressure The dynamic pressure acting on the part, in Pascals. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: static_pressure The static pressure acting on the part, in Pascals. Below the waterline this includes the pressure of the water. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: displacement The volume of water the part displaces when fully submerged, in :math:`\mathrm{m^{3}}`. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: See :attr:`Part.displaced_volume` for the volume it is displacing now. .. attribute:: buoyancy_multiplier The multiplier applied to the buoyant force on the part. One for most parts. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. method:: buoyant_force_at(density, gravity) The buoyant force on the part when fully submerged in a fluid of the given density, in Newtons. :param float density: The density of the fluid, in :math:`\mathrm{kg/m^{3}}`. :param float gravity: The acceleration due to gravity, in :math:`\mathrm{m/s^{2}}`. :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Applies :attr:`buoyancy_scalar` and :attr:`Part.buoyancy_multiplier`, so the result is what the game would do to the part rather than what `Archimedes' principle `_ alone gives. .. attribute:: splashed Whether the part is in contact with water. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. attribute:: submerged_portion The fraction of the part below the waterline, between 0 and 1. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: displaced_volume The volume of water the part is displacing, in :math:`\mathrm{m^{3}}`. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: depth The depth of the part below the waterline, in meters, measured at :meth:`Part.center_of_displacement`. Negative above the waterline. Returns zero if the body the vessel is at has no ocean. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: min_depth The depth of the shallowest point of the part below the waterline, in meters. Returns zero if the body the vessel is at has no ocean. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: max_depth The depth of the deepest point of the part below the waterline, in meters. Returns zero if the body the vessel is at has no ocean. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: The game ramps the buoyant force in over the first fraction of a meter of this depth. .. attribute:: submerged_dynamic_pressure The dynamic pressure of the water acting on the part, in Pascals. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: submerged_drag_multiplier The multiplier applied to the drag on the part while it is submerged. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: The game sets this high on splashdown and eases it down as the part moves through the water. It climbs back once the part slows to a crawl, so a hull under way reads lower than one lying still. .. attribute:: submerged_lift_multiplier The multiplier applied to the lift on the part while it is submerged. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: water_angular_drag_multiplier The multiplier applied to the angular drag on the part while it is submerged. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Part of the part's configuration rather than a live readout, so it reads the same in the editor and at a body with no ocean. .. attribute:: impact_tolerance The crash tolerance of the part, in :math:`\mathrm{m/s}`. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: breaking_force The breaking force of the part's attachments, in :math:`\mathrm{kN}`. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: The joint to the parent part takes the lower breaking force of the two parts, scaled by the size of the attachment node. See :attr:`Part.joint_break_force`. .. attribute:: breaking_torque The breaking torque of the part's attachments, in :math:`\mathrm{kN \cdot m}`. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: The joint to the parent part takes the lower breaking torque of the two parts, scaled by the size of the attachment node. See :attr:`Part.joint_break_torque`. .. attribute:: joint_break_force The force that breaks the joint to the parent part, in :math:`\mathrm{kN}`. Throws an exception if the part has no joint to its parent part. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: The sum over the joint's physics joints. It is infinite for a short time after the vessel loads, such as just after launch. The root part and a physicsless part have no joint to their parent. .. attribute:: joint_break_torque The torque that breaks the joint to the parent part, in :math:`\mathrm{kN \cdot m}`. Throws an exception if the part has no joint to its parent part. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: The sum over the joint's physics joints. It is infinite for a short time after the vessel loads. On a stack node of size 2 or more, the physics joints sit apart around the node. A bending moment then breaks the joint when one physics joint's force exceeds its share of :attr:`Part.joint_break_force`, usually at a much larger moment than this torque. .. attribute:: joint_spring The spring constant of the joint to the parent part against translation, in :math:`\mathrm{kN/m}`. Throws an exception if the part has no joint to its parent part. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: The sum over the joint's physics joints. A rigid attachment locks the joint, and this spring then has no effect. .. attribute:: joint_damper The damping constant of the joint to the parent part against translation, in :math:`\mathrm{kN \cdot s/m}`. Throws an exception if the part has no joint to its parent part. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: The sum over the joint's physics joints. The stock game sets it to zero, and mods such as Kerbal Joint Reinforcement change it. .. attribute:: joint_angular_spring The spring constant of the joint to the parent part against bending, in :math:`\mathrm{kN \cdot m/rad}`. Throws an exception if the part has no joint to its parent part. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: The sum over the joint's physics joints, about the two axes perpendicular to the joint axis. The joint is far stiffer against twisting about its axis. On a stack node of size 2 or more, the physics joints sit apart around the node, and the joint bends much less than this spring gives. A rigid attachment makes it infinite. .. attribute:: joint_angular_damper The damping constant of the joint to the parent part against bending, in :math:`\mathrm{kN \cdot m \cdot s/rad}`. Throws an exception if the part has no joint to its parent part. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: The sum over the joint's physics joints. The stock game sets it to zero, and mods such as Kerbal Joint Reinforcement change it. .. attribute:: temperature Temperature of the part, in Kelvin. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: skin_temperature Temperature of the skin of the part, in Kelvin. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: max_temperature Maximum temperature that the part can survive, in Kelvin. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: max_skin_temperature Maximum temperature that the skin of the part can survive, in Kelvin. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: max_pressure Maximum pressure that the part can survive, in Pascals. :Attribute: Read-only, cannot be set :rtype: float .. note:: With part pressure limits enabled in the difficulty settings, the part is destroyed when :attr:`Part.static_pressure` plus :attr:`Part.dynamic_pressure` exceeds this. .. attribute:: thermal_mass A measure of how much energy it takes to increase the internal temperature of the part, in Joules per Kelvin. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: thermal_skin_mass A measure of how much energy it takes to increase the skin temperature of the part, in Joules per Kelvin. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: thermal_resource_mass A measure of how much energy it takes to increase the temperature of the resources contained in the part, in Joules per Kelvin. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: thermal_conduction_flux The rate at which heat energy is conducting into or out of the part via contact with other parts. Measured in energy per unit time, or power, in Watts. A positive value means the part is gaining heat energy, and negative means it is losing heat energy. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: thermal_convection_flux The rate at which heat energy is convecting into or out of the part from the surrounding atmosphere. Measured in energy per unit time, or power, in Watts. A positive value means the part is gaining heat energy, and negative means it is losing heat energy. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: thermal_radiation_flux The rate at which heat energy is radiating into or out of the part from the surrounding environment. Measured in energy per unit time, or power, in Watts. A positive value means the part is gaining heat energy, and negative means it is losing heat energy. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: thermal_internal_flux The rate at which heat energy is begin generated by the part. For example, some engines generate heat by combusting fuel. Measured in energy per unit time, or power, in Watts. A positive value means the part is gaining heat energy, and negative means it is losing heat energy. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: thermal_skin_to_internal_flux The rate at which heat energy is transferring between the part's skin and its internals. Measured in energy per unit time, or power, in Watts. A positive value means the part's internals are gaining heat energy, and negative means its skin is gaining heat energy. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: crew_capacity The number of crew members that can occupy the part. :Attribute: Read-only, cannot be set :rtype: int .. attribute:: crew The crew members occupying the part. :Attribute: Read-only, cannot be set :rtype: list(:class:`CrewMember`) :Game Scenes: Flight .. attribute:: available_seats How many open seats the part has. :Attribute: Read-only, cannot be set :rtype: int :Game Scenes: Flight .. attribute:: resources A :attr:`Part.resources` object for the part. :Attribute: Read-only, cannot be set :rtype: :class:`Resources` .. attribute:: crossfeed Whether this part is crossfeed capable. :Attribute: Read-only, cannot be set :rtype: bool .. attribute:: is_fuel_line Whether this part is a fuel line. :Attribute: Read-only, cannot be set :rtype: bool .. attribute:: fuel_lines_from The parts that are connected to this part via fuel lines, where the direction of the fuel line is into this part. :Attribute: Read-only, cannot be set :rtype: list(:class:`Part`) :Game Scenes: Flight .. note:: See the discussion on :rst:ref:`user-guide-parts-fuel-lines`. .. attribute:: fuel_lines_to The parts that are connected to this part via fuel lines, where the direction of the fuel line is out of this part. :Attribute: Read-only, cannot be set :rtype: list(:class:`Part`) :Game Scenes: Flight .. note:: See the discussion on :rst:ref:`user-guide-parts-fuel-lines`. .. attribute:: modules The modules for this part. :Attribute: Read-only, cannot be set :rtype: list(:class:`Module`) .. attribute:: antenna An :attr:`Part.antenna` if the part is an antenna, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`Antenna` or None .. note:: For a part with several antennas, this is the first. :attr:`Parts.antennas` lists them all. If RemoteTech is installed, this will always return ``None``. To interact with RemoteTech antennas, use the RemoteTech service APIs. .. attribute:: cargo_bay A :attr:`Part.cargo_bay` if the part is a cargo bay, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`CargoBay` or None .. attribute:: control_surface A :attr:`Part.control_surface` if the part is an aerodynamic control surface, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`ControlSurface` or None .. attribute:: decoupler A :attr:`Part.decoupler` if the part is a decoupler, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`Decoupler` or None .. attribute:: docking_port A :attr:`Part.docking_port` if the part is a docking port, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`DockingPort` or None .. attribute:: engine An :attr:`Part.engine` if the part is an engine, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`Engine` or None .. attribute:: experiment An :attr:`Part.experiment` if the part contains a single science experiment, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`Experiment` or None .. note:: Throws an exception if the part contains more than one experiment. In that case, use :attr:`Part.experiments` to get the list of experiments in the part. .. attribute:: experiments A list of :attr:`Part.experiment` objects that the part contains. :Attribute: Read-only, cannot be set :rtype: list(:class:`Experiment`) or None .. attribute:: fairing A :attr:`Part.fairing` if the part is a fairing, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`Fairing` or None .. attribute:: intake An :attr:`Part.intake` if the part is an intake, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`Intake` or None .. note:: This includes any part that generates thrust. This covers many different types of engine, including liquid fuel rockets, solid rocket boosters and jet engines. For RCS thrusters see :attr:`Part.rcs`. .. attribute:: leg A :attr:`Part.leg` if the part is a landing leg, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`Leg` or None .. attribute:: launch_clamp A :attr:`Part.launch_clamp` if the part is a launch clamp, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`LaunchClamp` or None .. attribute:: light A :attr:`Part.light` if the part is a light, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`Light` or None .. attribute:: parachute A :attr:`Part.parachute` if the part is a parachute, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`Parachute` or None .. attribute:: radiator A :attr:`Part.radiator` if the part is a radiator, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`Radiator` or None .. attribute:: resource_drain A :attr:`Part.resource_drain` if the part is a resource drain, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`ResourceDrain` or None .. attribute:: rcs A :attr:`Part.rcs` if the part is an RCS block/thruster, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`RCS` or None .. attribute:: reaction_wheel A :attr:`Part.reaction_wheel` if the part is a reaction wheel, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`ReactionWheel` or None .. attribute:: resource_converter A :attr:`Part.resource_converter` if the part is a resource converter, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`ResourceConverter` or None .. attribute:: resource_harvester A :attr:`Part.resource_harvester` if the part is a resource harvester, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`ResourceHarvester` or None .. attribute:: robotic_controller A :attr:`Part.robotic_controller` if the part is a robotic controller, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`RoboticController` or None .. attribute:: robotic_hinge A :attr:`Part.robotic_hinge` if the part is a robotic hinge, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`RoboticHinge` or None .. attribute:: robotic_piston A :attr:`Part.robotic_piston` if the part is a robotic piston, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`RoboticPiston` or None .. attribute:: robotic_rotation A :attr:`Part.robotic_rotation` if the part is a robotic rotation servo, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`RoboticRotation` or None .. attribute:: robotic_rotor A :attr:`Part.robotic_rotor` if the part is a robotic rotor, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`RoboticRotor` or None .. attribute:: sensor A :attr:`Part.sensor` if the part is a sensor, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`Sensor` or None .. attribute:: solar_panel A :attr:`Part.solar_panel` if the part is a solar panel, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`SolarPanel` or None .. attribute:: wheel A :attr:`Part.wheel` if the part is a wheel, otherwise ``None``. :Attribute: Read-only, cannot be set :rtype: :class:`Wheel` or None .. method:: position(reference_frame) The position of the part in the given reference frame. :param ReferenceFrame reference_frame: The reference frame that the returned position vector is in. :returns: The position as a vector. :rtype: tuple(float, float, float) :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: This is a fixed position in the part, defined by the parts model. It s not necessarily the same as the parts center of mass. Use :meth:`Part.center_of_mass` to get the parts center of mass. .. method:: center_of_mass(reference_frame) The position of the parts center of mass in the given reference frame. If the part is physicsless in flight, this is equivalent to :meth:`Part.position`. :param ReferenceFrame reference_frame: The reference frame that the returned position vector is in. :returns: The position as a vector. :rtype: tuple(float, float, float) :Game Scenes: Flight, Editor Vab, Editor Sph .. method:: bounding_box(reference_frame) The axis-aligned bounding box of the part in the given reference frame. :param ReferenceFrame reference_frame: The reference frame that the returned position vectors are in. :returns: The positions of the minimum and maximum vertices of the box. :rtype: :class:`BoundingBox` :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: This is computed from the meshes that make up the parts model, and covers only this part - the models of any child parts are excluded. If the part has no visible model, the box has zero volume and is centered on the :meth:`Part.center_of_mass` of the part. .. method:: direction(reference_frame) The direction the part points in, in the given reference frame. :param ReferenceFrame reference_frame: The reference frame that the returned direction is in. :returns: The direction as a unit vector. :rtype: tuple(float, float, float) :Game Scenes: Flight, Editor Vab, Editor Sph .. method:: velocity(reference_frame) The linear velocity of the part in the given reference frame. :param ReferenceFrame reference_frame: The reference frame that the returned velocity vector is in. :returns: The velocity as a vector. The vector points in the direction of travel, and its magnitude is the speed of the body in :math:`\mathrm{m/s}`. :rtype: tuple(float, float, float) :Game Scenes: Flight .. method:: rotation(reference_frame) The rotation of the part, in the given reference frame. :param ReferenceFrame reference_frame: The reference frame that the returned rotation is in. :returns: The rotation as a quaternion of the form ``(x, y, z, w)``. :rtype: tuple(float, float, float, float) :Game Scenes: Flight, Editor Vab, Editor Sph .. method:: lift(reference_frame) The aerodynamic `lift `_ currently acting on the part. :param ReferenceFrame reference_frame: The reference frame that the returned vector is in. :returns: A vector pointing in the direction that the force acts, with its magnitude equal to the strength of the force in Newtons. :rtype: tuple(float, float, float) :Game Scenes: Flight .. note:: Not available when Ferram Aerospace Research is installed. .. method:: drag(reference_frame) The aerodynamic `drag `_ currently acting on the part. :param ReferenceFrame reference_frame: The reference frame that the returned vector is in. :returns: A vector pointing in the direction that the force acts, with its magnitude equal to the strength of the force in Newtons. :rtype: tuple(float, float, float) :Game Scenes: Flight .. note:: Not available when Ferram Aerospace Research is installed. .. method:: center_of_buoyancy(reference_frame) The point the buoyant force on the part acts at, in the given reference frame. :param ReferenceFrame reference_frame: The reference frame that the returned position vector is in. :returns: The position as a vector. :rtype: tuple(float, float, float) :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: A submerged part reports the point the game applied the force at, which it shifts towards the submerged part of the hull. Any other part reports its configured center of buoyancy. .. method:: center_of_displacement(reference_frame) The point the depth of the part is measured at, in the given reference frame. :param ReferenceFrame reference_frame: The reference frame that the returned position vector is in. :returns: The position as a vector. :rtype: tuple(float, float, float) :Game Scenes: Flight, Editor Vab, Editor Sph .. method:: buoyant_force(reference_frame) The buoyant force currently acting on the part. :param ReferenceFrame reference_frame: The reference frame that the returned vector is in. :returns: A vector pointing in the direction that the force acts, with its magnitude equal to the strength of the force in Newtons. :rtype: tuple(float, float, float) :Game Scenes: Flight .. note:: The buoyant force on its own. The water drag and lift the game applies alongside it are reported by :attr:`Part.submerged_drag_multiplier` and :attr:`Part.submerged_lift_multiplier`. .. attribute:: moment_of_inertia The moment of inertia of the part in :math:`\mathrm{kg \cdot m^{2}}` around its center of mass in the parts center of mass reference frame (:attr:`Part.center_of_mass_reference_frame`). :Attribute: Read-only, cannot be set :rtype: tuple(float, float, float) :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: inertia_tensor The inertia tensor of the part around its center of mass, in the parts center of mass reference frame (:attr:`Part.center_of_mass_reference_frame`). Returns the 3x3 matrix as a list of elements, in row-major order. :Attribute: Read-only, cannot be set :rtype: list(float) :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: reference_frame The reference frame that is fixed relative to this part, and centered on a fixed position within the part, defined by the parts model. * The origin is at the position of the part, as returned by :meth:`Part.position`. * The axes rotate with the part. * The x, y and z axis directions depend on the design of the part. :Attribute: Read-only, cannot be set :rtype: :class:`ReferenceFrame` :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: For docking port parts, this reference frame is not necessarily equivalent to the reference frame for the docking port, returned by :attr:`DockingPort.reference_frame`. .. figure:: /images/reference-frames/part.png :align: center Mk1 Command Pod reference frame origin and axes .. attribute:: center_of_mass_reference_frame The reference frame that is fixed relative to this part, and centered on its center of mass. * The origin is at the center of mass of the part, as returned by :meth:`Part.center_of_mass`. * The axes rotate with the part. * The x, y and z axis directions depend on the design of the part. :Attribute: Read-only, cannot be set :rtype: :class:`ReferenceFrame` :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: For docking port parts, this reference frame is not necessarily equivalent to the reference frame for the docking port, returned by :attr:`DockingPort.reference_frame`. .. method:: add_force(force, position, reference_frame) .. warning:: Deprecated. Use ``Debug.AddForce`` instead. Exert a constant force on the part, acting at the given position. :param tuple force: A vector pointing in the direction that the force acts, with its magnitude equal to the strength of the force in Newtons. :param tuple position: The position at which the force acts, as a vector. :param ReferenceFrame reference_frame: The reference frame that the force and position are in. :returns: An object that can be used to remove or modify the force. :rtype: :class:`Force` :Game Scenes: Flight .. note:: The force is removed when the client that added it disconnects. .. method:: instantaneous_force(force, position, reference_frame) .. warning:: Deprecated. Use ``Debug.InstantaneousForce`` instead. Exert an instantaneous force on the part, acting at the given position. :param tuple force: A vector pointing in the direction that the force acts, with its magnitude equal to the strength of the force in Newtons. :param tuple position: The position at which the force acts, as a vector. :param ReferenceFrame reference_frame: The reference frame that the force and position are in. :Game Scenes: Flight .. note:: The force is applied instantaneously in a single physics update. .. attribute:: glow Whether the part is glowing. :Attribute: Write-only, cannot be read :rtype: bool :Game Scenes: Flight .. attribute:: auto_strut_mode Auto-strut mode. :Attribute: Read-only, cannot be set :rtype: :class:`AutoStrutMode` .. attribute:: has_real_fuels_tank Whether the part is a fuel tank managed by RealFuels. The remaining properties in this section are only available when it is. :Attribute: Read-only, cannot be set :rtype: bool .. attribute:: highly_pressurized Whether the tank is highly pressurized, which is what a pressure-fed engine needs to draw from (see :attr:`Engine.pressure_fed`). Throws an exception if the part is not a RealFuels fuel tank (see :attr:`Part.has_real_fuels_tank`). :Attribute: Read-only, cannot be set :rtype: bool .. note:: Requires RealFuels. .. attribute:: boiloff_rate The rate at which the tank's cryogenic contents are boiling off, in kilograms per second of in-game time, measured over the last update RealFuels computed it in. The contents keep boiling off under time warp, where that update covers a much longer span of in-game time than a physics frame does. The rate is zero for a tank holding nothing cryogenic, for one still being fed by a launch clamp, whose temperature RealFuels holds down instead, and in the editor. Throws an exception if the part is not a RealFuels fuel tank (see :attr:`Part.has_real_fuels_tank`). :Attribute: Read-only, cannot be set :rtype: float .. note:: Requires RealFuels. .. class:: AutoStrutMode The state of an auto-strut. :attr:`Part.auto_strut_mode` .. data:: off Off .. data:: root Root .. data:: heaviest Heaviest .. data:: grandparent Grandparent .. data:: force_root ForceRoot .. data:: force_heaviest ForceHeaviest .. data:: force_grandparent ForceGrandparent .. class:: Force Obtained by calling ``Debug.AddForce``. .. attribute:: part The part that this force is applied to. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight .. attribute:: force_vector The force vector, in Newtons. :Attribute: Can be read or written :returns: A vector pointing in the direction that the force acts, with its magnitude equal to the strength of the force in Newtons. :rtype: tuple(float, float, float) :Game Scenes: Flight .. attribute:: position The position at which the force acts, in reference frame :attr:`Force.reference_frame`. :Attribute: Can be read or written :returns: The position as a vector. :rtype: tuple(float, float, float) :Game Scenes: Flight .. attribute:: reference_frame The reference frame of the force vector and position. :Attribute: Can be read or written :rtype: :class:`ReferenceFrame` :Game Scenes: Flight .. method:: remove() Remove the force. :Game Scenes: Flight .. note:: Any further use of this object throws an exception. Module ------ .. class:: Module This can be used to interact with a specific part module. This includes part modules in stock KSP, and those added by mods. In KSP, each part has zero or more `PartModules `_ associated with it. Each one contains some of the functionality of the part. For example, an engine has a "ModuleEngines" part module that contains all the functionality of an engine. .. attribute:: name Name of the PartModule. For example, "ModuleEngines". :Attribute: Read-only, cannot be set :rtype: str .. attribute:: part The part that contains this module. :Attribute: Read-only, cannot be set :rtype: :class:`Part` .. attribute:: config The static configuration of the module, as found in the part's `cfg file `_. This provides access to data that is not exposed as a field, such as the resources produced by a generator. Returns ``None`` if the module's configuration node cannot be found. :Attribute: Read-only, cannot be set :rtype: :class:`ConfigNode` .. attribute:: field_list A list of all the fields of the module, including those not visible in the right-click menu of the part. Filter by :attr:`PartField.visible` to get just the visible ones. :Attribute: Read-only, cannot be set :rtype: list(:class:`PartField`) .. attribute:: event_list A list of all the events of the module, including those not currently visible or active. Events are the clickable buttons visible in the right-click menu of the part. Filter by :attr:`PartEvent.visible` and :attr:`PartEvent.active` to get just the ones shown in the menu. :Attribute: Read-only, cannot be set :rtype: list(:class:`PartEvent`) .. attribute:: action_list A list of all the actions of the module. These are the parts actions that can be assigned to action groups in the in-game editor. :Attribute: Read-only, cannot be set :rtype: list(:class:`PartAction`) .. class:: PartField A field of a part module. Obtained by calling :attr:`Module.field_list`. .. note:: Setting a field runs the callbacks that the right-click menu of the part runs. .. attribute:: module The part module that contains this field. :Attribute: Read-only, cannot be set :rtype: :class:`Module` .. attribute:: name The identifier of the field. This is stable and does not change between game versions, unlike :attr:`PartField.gui_name`. :Attribute: Read-only, cannot be set :rtype: str .. attribute:: gui_name The name of the field, as displayed in the right-click menu of the part. This may be empty for fields that are not visible in the menu. :Attribute: Read-only, cannot be set :rtype: str .. attribute:: visible Whether the field is visible in the right-click menu of the part, in the current scene (flight or editor). :Attribute: Read-only, cannot be set :rtype: bool .. attribute:: type The type of the field. :Attribute: Read-only, cannot be set :rtype: :class:`FieldType` .. attribute:: value The value of the field, as a string. This works for fields of any type, and returns the same string that is shown in the right-click menu of the part. :Attribute: Can be read or written :rtype: str .. note:: Setting the value using this property is only permitted for string fields. Use the typed properties (:attr:`PartField.bool_value`, :attr:`PartField.int_value`, :attr:`PartField.float_value`, :attr:`PartField.double_value`) to set fields of other types. .. attribute:: bool_value The value of a boolean field. :Attribute: Can be read or written :rtype: bool .. note:: The getter throws an exception if the field is not a boolean field (see :attr:`PartField.type`). .. attribute:: int_value The value of an integer field. :Attribute: Can be read or written :rtype: int .. note:: The getter throws an exception if the field is not an integer field (see :attr:`PartField.type`). .. attribute:: float_value The value of a single precision floating point field. :Attribute: Can be read or written :rtype: float .. note:: The getter throws an exception if the field is not a single precision floating point field (see :attr:`PartField.type`). .. attribute:: double_value The value of a double precision floating point field. :Attribute: Can be read or written :rtype: float .. note:: The getter throws an exception if the field is not a double precision floating point field (see :attr:`PartField.type`). .. method:: reset() Set the value of the field to its original value. .. note:: The original value is the value the field had when the part was loaded. Works for any field, including those not visible in the right-click menu. .. class:: FieldType The type of a part module field. See :attr:`PartField.type`. .. data:: boolean A boolean field. Access using :attr:`PartField.bool_value`. .. data:: integer An integer field. Access using :attr:`PartField.int_value`. .. data:: float A single precision floating point field. Access using :attr:`PartField.float_value`. .. data:: double A double precision floating point field. Access using :attr:`PartField.double_value`. .. data:: string A string field. Access using :attr:`PartField.value`. .. data:: unknown A field whose type is not one of the above. Its value can still be read as a string using :attr:`PartField.value`. .. class:: PartEvent An event of a part module. Events are the clickable buttons visible in the right-click menu of the part. Obtained by calling :attr:`Module.event_list`. .. attribute:: module The part module that contains this event. :Attribute: Read-only, cannot be set :rtype: :class:`Module` .. attribute:: name The identifier of the event. This is stable and does not change between game versions, unlike :attr:`PartEvent.gui_name`. :Attribute: Read-only, cannot be set :rtype: str .. attribute:: gui_name The name of the event, as displayed in the right-click menu of the part. :Attribute: Read-only, cannot be set :rtype: str .. attribute:: visible Whether the event is visible in the right-click menu of the part, in the current scene (flight or editor). :Attribute: Read-only, cannot be set :rtype: bool .. attribute:: active Whether the event is currently active. :Attribute: Read-only, cannot be set :rtype: bool .. method:: trigger() Trigger the event. Equivalent to clicking the button in the right-click menu of the part. .. class:: PartAction An action of a part module. These are the part actions that can be assigned to action groups in the in-game editor. Obtained by calling :attr:`Module.action_list`. .. attribute:: module The part module that contains this action. :Attribute: Read-only, cannot be set :rtype: :class:`Module` .. attribute:: name The identifier of the action. This is stable and does not change between game versions, unlike :attr:`PartAction.gui_name`. :Attribute: Read-only, cannot be set :rtype: str .. attribute:: gui_name The name of the action, as displayed in the in-game editor. :Attribute: Read-only, cannot be set :rtype: str .. attribute:: activated Activate or deactivate the action. Equivalent to triggering the action from an action group. Set to ``True`` to activate the action, or ``False`` to deactivate it. :Attribute: Write-only, cannot be read :rtype: bool Config Node ----------- .. class:: ConfigNode Represents a configuration node, as found in a part's configuration file. A node has a name, a set of named values and a set of child nodes. This is used to access the static configuration of a part or part module, for example via :attr:`Part.config` and :attr:`Module.config`. .. attribute:: name The name of the configuration node. For example "MODULE". :Attribute: Read-only, cannot be set :rtype: str .. attribute:: values The values stored in the node, as a dictionary mapping names to values. :Attribute: Read-only, cannot be set :rtype: dict(str, str) .. note:: If a name appears more than once, only the first value is included. Use :meth:`ConfigNode.find_values` to get all of the values with a given name. .. method:: has_value(name) Returns ``True`` if the node has a value with the given name. :param str name: Name of the value. :rtype: bool .. method:: get_value(name) Returns the value with the given name. If there is more than one value with the given name, the first is returned. Throws an exception if there is no value with the given name. :param str name: Name of the value. :rtype: str .. method:: find_values(name) Returns all of the values with the given name, as a list. :param str name: Name of the values. :rtype: list(str) .. attribute:: nodes The child nodes contained in this node. :Attribute: Read-only, cannot be set :rtype: list(:class:`ConfigNode`) .. method:: has_node(name) Returns ``True`` if the node has a child node with the given name. :param str name: Name of the child node. :rtype: bool .. method:: get_node(name) Returns the child node with the given name. If there is more than one child node with the given name, the first is returned. Throws an exception if there is no child node with the given name. :param str name: Name of the child node. :rtype: :class:`ConfigNode` .. method:: find_nodes(name) Returns all of the child nodes with the given name, as a list. :param str name: Name of the child nodes. :rtype: list(:class:`ConfigNode`) Specific Types of Part ---------------------- The following classes provide functionality for specific types of part. .. contents:: :local: Antenna ^^^^^^^ .. note:: If RemoteTech is installed, use the RemoteTech service APIs to interact with antennas. This class covers stock and RealAntennas antennas. .. class:: Antenna An antenna. Obtained by calling :attr:`Part.antenna`. .. attribute:: part The part object for this antenna. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: state The current state of the antenna. :Attribute: Read-only, cannot be set :rtype: :class:`DeployableState` :Game Scenes: Flight .. attribute:: deployable Whether the antenna is deployable. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: deployed Whether the antenna is deployed. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. note:: Fixed antennas are always deployed. Throws :class:`KRPC.InvalidOperationException` if set on a fixed antenna. .. attribute:: can_transmit Whether data can be transmitted by this antenna. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. method:: transmit() Transmit data. :Game Scenes: Flight .. method:: cancel() Cancel current transmission of data. :Game Scenes: Flight .. attribute:: allow_partial Whether partial data transmission is permitted. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: power The power of the antenna. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Not used by RealAntennas, which replaces the stock range model. .. attribute:: combinable Whether the antenna can be combined with other antennae on the vessel to boost the power. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Not used by RealAntennas, which replaces the stock range model. .. attribute:: combinable_exponent Exponent used to calculate the combined power of multiple antennae on a vessel. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Not used by RealAntennas, which replaces the stock range model. .. attribute:: packet_interval Interval between sending packets in seconds. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: packet_size Amount of data sent per packet in Mits. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: packet_resource_cost Units of electric charge consumed per packet sent. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: gain The gain of the antenna, in :math:`\mathrm{dBi}`. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Requires RealAntennas. .. attribute:: transmit_power Returns the transmit power of the antenna, in :math:`\mathrm{dBm}`, and sets it in the editor. Throws an exception if set in flight, or outside zero to :attr:`Antenna.max_transmit_power`. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Requires RealAntennas. .. attribute:: max_transmit_power The largest transmit power the antenna can be set to, in :math:`\mathrm{dBm}`. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Requires RealAntennas. .. attribute:: tech_level Returns the tech level of the antenna, and sets it in the editor. Throws an exception if set in flight, or outside zero to :attr:`Antenna.max_tech_level`. :Attribute: Can be read or written :rtype: int :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Requires RealAntennas. .. attribute:: max_tech_level The highest tech level the antenna can be set to. :Attribute: Read-only, cannot be set :rtype: int :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Requires RealAntennas. .. attribute:: band The name of the radio frequency band the antenna uses, e.g. ``"S"``. :Attribute: Read-only, cannot be set :rtype: str :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Requires RealAntennas. .. attribute:: frequency The frequency of the antenna's band, in Hz. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Requires RealAntennas. .. attribute:: data_rate The highest data rate the antenna supports, in bits per second. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Requires RealAntennas. .. attribute:: beamwidth The half-power beamwidth of the antenna, in degrees. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Requires RealAntennas. .. attribute:: idle_power_draw The power the antenna draws while idle, in watts. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Requires RealAntennas. .. attribute:: active_power_draw The power the antenna draws while transmitting, in watts. This includes :attr:`Antenna.idle_power_draw`. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Requires RealAntennas. .. attribute:: enabled Returns whether the antenna is enabled, and sets it in the editor. Throws an exception if set in flight. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Requires RealAntennas. A disabled antenna does not communicate and draws no power. .. method:: disable_permanently() Disable the antenna for the rest of the flight. It then draws no power. :Game Scenes: Flight .. note:: Requires RealAntennas. .. attribute:: can_target Whether the antenna can be pointed at a target. Omnidirectional antennas cannot. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. note:: Requires RealAntennas. .. attribute:: target_mode The kind of target the antenna points at. :Attribute: Read-only, cannot be set :rtype: :class:`AntennaTargetMode` :Game Scenes: Flight .. note:: Requires RealAntennas. .. attribute:: target_vessel Returns the vessel the antenna points at, and sets the vessel to point at. :Attribute: Can be read or written :rtype: :class:`Vessel` or None :Game Scenes: Flight .. note:: Requires RealAntennas. ``None`` if the antenna does not point at a vessel. Throws an exception if set to ``None``, or if the antenna cannot be pointed (see :attr:`Antenna.can_target`). .. attribute:: target_body Returns the body the antenna points at, and sets the body to point at the center of. :Attribute: Can be read or written :rtype: :class:`CelestialBody` or None :Game Scenes: Flight .. note:: Requires RealAntennas. Also the body of a position the antenna points at, or ``None`` if it points at neither. Throws an exception if set to ``None``, or if the antenna cannot be pointed (see :attr:`Antenna.can_target`). .. method:: target_direction(reference_frame) The direction the antenna points in, in the given reference frame. Throws an exception if the antenna has no target (see :attr:`Antenna.target_mode`). :param ReferenceFrame reference_frame: The reference frame that the returned direction is in. :returns: The direction as a unit vector. :rtype: tuple(float, float, float) :Game Scenes: Flight .. note:: Requires RealAntennas. .. method:: set_target_position(body, latitude, longitude, altitude) Point the antenna at a position on or above a body. :param CelestialBody body: The body. :param float latitude: The latitude, in degrees. :param float longitude: The longitude, in degrees. :param float altitude: The altitude above sea level, in meters. :Game Scenes: Flight .. note:: Requires RealAntennas. Throws an exception if the antenna cannot be pointed (see :attr:`Antenna.can_target`). .. method:: set_target_azimuth_elevation(azimuth, elevation) Point the antenna in a direction relative to the vessel's position on the surface. :param float azimuth: The azimuth, in degrees clockwise from north, from 0 to 360. :param float elevation: The elevation above the horizon, in degrees, from -90 to 90. :Game Scenes: Flight .. note:: Requires RealAntennas. Throws an exception if the antenna cannot be pointed (see :attr:`Antenna.can_target`). .. method:: set_target_orbit_relative(deflection, elevation) Point the antenna in a direction relative to the vessel's orbital velocity. :param float deflection: The angle from the orbital velocity in the orbital plane, in degrees, from -180 to 180. :param float elevation: The angle out of the orbital plane, in degrees, from -90 to 90. :Game Scenes: Flight .. note:: Requires RealAntennas. Throws an exception if the antenna cannot be pointed (see :attr:`Antenna.can_target`). .. class:: AntennaTargetMode The kind of target a RealAntennas antenna points at. See :attr:`Antenna.target_mode`. .. data:: none The antenna has no target. Omnidirectional antennas have none. .. data:: vessel A vessel. See :attr:`Antenna.target_vessel`. .. data:: body The center of a body. See :attr:`Antenna.target_body`. .. data:: position A position on or above a body. See :meth:`Antenna.set_target_position`. .. data:: azimuth_elevation An azimuth and elevation from the vessel's position. See :meth:`Antenna.set_target_azimuth_elevation`. .. data:: orbit_relative A direction relative to the vessel's orbital velocity. See :meth:`Antenna.set_target_orbit_relative`. Cargo Bay ^^^^^^^^^ .. class:: CargoBay A cargo bay. Obtained by calling :attr:`Part.cargo_bay`. .. attribute:: part The part object for this cargo bay. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: state The state of the cargo bay. :Attribute: Read-only, cannot be set :rtype: :class:`DeployableState` :Game Scenes: Flight .. note:: This describes where the bay's doors are, which is not the same as whether the parts inside are sheltered: a bay whose open end has nothing attached to it never shelters anything, however tightly shut it is. Use :attr:`Part.shielded` for that. A cargo bay is never :attr:`DeployableState.broken`, as the game does not track damage for them. .. attribute:: open Whether the cargo bay is open. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight Control Surface ^^^^^^^^^^^^^^^ .. class:: ControlSurface An aerodynamic control surface. Obtained by calling :attr:`Part.control_surface`. .. attribute:: part The part object for this control surface. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: pitch_enabled Whether the control surface has pitch control enabled. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: yaw_enabled Whether the control surface has yaw control enabled. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: roll_enabled Whether the control surface has roll control enabled. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: authority_limiter The authority limiter for the control surface, which controls how far the control surface will move. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: inverted Whether the control surface movement is inverted. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: deployed Whether the control surface has been fully deployed. Throws an exception if set while :attr:`ControlSurface.deflection_override` is enabled, which holds the surface deployed. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: deploy_angle The deploy angle of the control surface, in degrees. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Applied when :attr:`ControlSurface.deployed` is true, and clamped to the range given by :attr:`ControlSurface.min_deploy_angle` and :attr:`ControlSurface.max_deploy_angle`. While :attr:`ControlSurface.deflection_override` is enabled, :attr:`ControlSurface.deflection` drives the angle. A value set here takes effect when the override is released. .. attribute:: min_deploy_angle The minimum :attr:`ControlSurface.deploy_angle` of the control surface, in degrees. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: max_deploy_angle The maximum :attr:`ControlSurface.deploy_angle` of the control surface, in degrees. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: deflection_override Whether the control surface deflection is being set directly, bypassing the vessel's normal flight control. When enabled, the surface holds the deflection set by :attr:`ControlSurface.deflection` instead of responding to pitch, yaw and roll control inputs. The prior state is restored when the override is released, when the controlling client disconnects, or when the vessel changes. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: deflection The deflection command applied when :attr:`ControlSurface.deflection_override` is enabled, as a value between -1 and 1, mapped onto the surface's deploy angle range. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: deflection_angle The current angle of the control surface from its neutral position, in degrees. Includes the :attr:`ControlSurface.deploy_angle` while the surface is deployed. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: control_range The angle the control surface deflects by for a full control input, in degrees, before the :attr:`ControlSurface.authority_limiter` is applied. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: actuator_speed The rate the control surface deflects at, in degrees per second. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: surface_area Surface area of the control surface in :math:`\mathrm{m^{2}}`. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: available_torque The available torque, in :math:`\mathrm{N \cdot m}`, that can be produced by this control surface, in the positive and negative pitch, roll and yaw axes of the vessel. These axes correspond to the coordinate axes of the :attr:`Vessel.reference_frame`. :Attribute: Read-only, cannot be set :rtype: :class:`AxisRange` :Game Scenes: Flight Decoupler ^^^^^^^^^ .. class:: Decoupler A decoupler. Obtained by calling :attr:`Part.decoupler` .. attribute:: part The part object for this decoupler. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. method:: decouple() Fires the decoupler. Returns the new vessel created when the decoupler fires. Throws an exception if the decoupler has already fired. :rtype: :class:`Vessel` :Game Scenes: Flight .. note:: When called, the active vessel may change. It is therefore possible that, after calling this function, the object(s) returned by previous call(s) to :attr:`active_vessel` no longer refer to the active vessel. .. attribute:: decoupled Whether the decoupler has fired. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. attribute:: staged Whether the decoupler is enabled in the staging sequence. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: impulse The impulse that the decoupler imparts when it is fired, in :math:`\mathrm{N \cdot s}`. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: is_omni_decoupler Whether the decoupler is an omni-decoupler (e.g. stack separator) :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: attached_part The part attached to this decoupler's explosive node. :Attribute: Read-only, cannot be set :rtype: :class:`Part` or None :Game Scenes: Flight, Editor Vab, Editor Sph Deployable State ^^^^^^^^^^^^^^^^ The deployment state shared by antennas, cargo bays, landing legs, radiators, resource harvesters, solar panels and wheels. .. class:: DeployableState The state of a deployable part. :attr:`Antenna.state`, :attr:`CargoBay.state`, :attr:`Leg.state`, :attr:`Radiator.state`, :attr:`ResourceHarvester.state`, :attr:`SolarPanel.state`, :attr:`Wheel.state` .. data:: deployed The part is fully deployed. A cargo bay in this state is fully open. Parts that cannot be retracted, such as fixed radiators, solar panels, antennas, landing legs and wheels, are always in this state. .. data:: retracted The part is fully retracted. A cargo bay in this state is closed and locked. .. data:: deploying The part is being deployed. A cargo bay in this state is opening. .. data:: retracting The part is being retracted. A cargo bay in this state is closing. .. data:: broken The part is broken. Cargo bays and resource harvesters never report this state, as the game does not track damage for them. Docking Port ^^^^^^^^^^^^ .. class:: DockingPort A docking port. Obtained by calling :attr:`Part.docking_port` .. attribute:: part The part object for this docking port. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: state The current state of the docking port. :Attribute: Read-only, cannot be set :rtype: :class:`DockingPortState` :Game Scenes: Flight .. attribute:: docked_part The part that this docking port is docked to. Returns ``None`` if this docking port is not docked to anything. :Attribute: Read-only, cannot be set :rtype: :class:`Part` or None :Game Scenes: Flight .. method:: undock() Undocks the docking port and returns the new :class:`Vessel` that is created. This method can be called for either docking port in a docked pair. Throws an exception if the docking port is not docked to anything. :rtype: :class:`Vessel` :Game Scenes: Flight .. note:: When called, the active vessel may change. It is therefore possible that, after calling this function, the object(s) returned by previous call(s) to :attr:`active_vessel` no longer refer to the active vessel. .. attribute:: reengage_distance The distance a docking port must move away when it undocks before it becomes ready to dock with another port, in meters. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: has_shield Whether the docking port has a shield. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. attribute:: shielded The state of the docking ports shield, if it has one. Returns ``True`` if the docking port has a shield, and the shield is closed. Otherwise returns ``False``. When set to ``True``, the shield is closed, and when set to ``False`` the shield is opened. If the docking port does not have a shield, setting this attribute has no effect. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: can_rotate Whether the docking port can be commanded to rotate while docked. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. attribute:: maximum_rotation Maximum rotation angle in degrees. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: minimum_rotation Minimum rotation angle in degrees. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: rotation_target Rotation target angle in degrees. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: rotation_locked Lock rotation. When locked, allows auto-strut to work across the joint. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. method:: position(reference_frame) The position of the docking port, in the given reference frame. :param ReferenceFrame reference_frame: The reference frame that the returned position vector is in. :returns: The position as a vector. :rtype: tuple(float, float, float) :Game Scenes: Flight .. method:: direction(reference_frame) The direction that docking port points in, in the given reference frame. :param ReferenceFrame reference_frame: The reference frame that the returned direction is in. :returns: The direction as a unit vector. :rtype: tuple(float, float, float) :Game Scenes: Flight .. method:: rotation(reference_frame) The rotation of the docking port, in the given reference frame. :param ReferenceFrame reference_frame: The reference frame that the returned rotation is in. :returns: The rotation as a quaternion of the form ``(x, y, z, w)``. :rtype: tuple(float, float, float, float) :Game Scenes: Flight .. attribute:: reference_frame The reference frame that is fixed relative to this docking port, and oriented with the port. * The origin is at the position of the docking port. * The axes rotate with the docking port. * The x-axis points out to the right side of the docking port. * The y-axis points in the direction the docking port is facing. * The z-axis points out of the bottom off the docking port. :Attribute: Read-only, cannot be set :rtype: :class:`ReferenceFrame` :Game Scenes: Flight .. note:: This reference frame is not necessarily equivalent to the reference frame for the part, returned by :attr:`Part.reference_frame`. .. figure:: /images/reference-frames/docking-port.png :align: center Docking port reference frame origin and axes .. figure:: /images/reference-frames/docking-port-inline.png :align: center Inline docking port reference frame origin and axes .. class:: DockingPortState The state of a docking port. See :attr:`DockingPort.state`. .. data:: ready The docking port is ready to dock to another docking port. .. data:: docked The docking port is docked to another docking port, or docked to another part (from the VAB/SPH). .. data:: docking The docking port is very close to another docking port, but has not docked. It is using magnetic force to acquire a solid dock. .. data:: undocking The docking port has just been undocked from another docking port, and is disabled until it moves away by a sufficient distance (:attr:`DockingPort.reengage_distance`). .. data:: shielded The docking port has a shield, and the shield is closed. .. data:: moving The docking ports shield is currently opening/closing. Engine ^^^^^^ .. class:: Engine An engine, including ones of various types. For example liquid fuelled gimballed engines, solid rocket boosters and jet engines. Obtained by calling :attr:`Part.engine`. .. note:: For RCS thrusters :attr:`Part.rcs`. .. attribute:: part The part object for this engine. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: active Whether the engine is active. Setting this attribute may have no effect, depending on :attr:`Engine.can_shutdown` and :attr:`Engine.can_restart`. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: thrust The current amount of thrust being produced by the engine, in Newtons. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: available_thrust The amount of thrust, in Newtons, that would be produced by the engine when activated and with its throttle set to 100%. Returns zero if the engine does not have any fuel. Takes the engine's current :attr:`Engine.thrust_limit` and atmospheric conditions into account. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. method:: available_thrust_at(pressure) The amount of thrust, in Newtons, that would be produced by the engine when activated and with its throttle set to 100%. Returns zero if the engine does not have any fuel. Takes the given pressure into account. :param float pressure: Atmospheric pressure in atmospheres :rtype: float :Game Scenes: Flight .. attribute:: max_thrust The amount of thrust, in Newtons, that would be produced by the engine when activated and fueled, with its throttle and throttle limiter set to 100%. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. method:: max_thrust_at(pressure) The amount of thrust, in Newtons, that would be produced by the engine when activated and fueled, with its throttle and throttle limiter set to 100%. Takes the given pressure into account. :param float pressure: Atmospheric pressure in atmospheres :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: max_vacuum_thrust The maximum amount of thrust that can be produced by the engine in a vacuum, in Newtons. This is the amount of thrust produced by the engine when activated, :attr:`Engine.thrust_limit` is set to 100%, the main vessel's throttle is set to 100% and the engine is in a vacuum. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: thrust_limit The thrust limiter of the engine. A value between 0 and 1. Setting this attribute may have no effect, for example the thrust limit for a solid rocket booster cannot be changed in flight. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: thrusters The components of the engine that generate thrust. :Attribute: Read-only, cannot be set :rtype: list(:class:`Thruster`) :Game Scenes: Flight .. note:: For example, this corresponds to the rocket nozzel on a solid rocket booster, or the individual nozzels on a RAPIER engine. The overall thrust produced by the engine, as reported by :attr:`Engine.available_thrust`, :attr:`Engine.max_thrust` and others, is the sum of the thrust generated by each thruster. .. attribute:: specific_impulse The current specific impulse of the engine, in seconds. Returns zero if the engine is not active. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. method:: specific_impulse_at(pressure) The specific impulse of the engine under the given pressure, in seconds. Returns zero if the engine is not active. :param float pressure: Atmospheric pressure in atmospheres :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: vacuum_specific_impulse The vacuum specific impulse of the engine, in seconds. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: kerbin_sea_level_specific_impulse The specific impulse of the engine at sea level on Kerbin, in seconds. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: propellant_names The names of the propellants that the engine consumes. :Attribute: Read-only, cannot be set :rtype: list(str) :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: propellant_ratios The ratio of resources that the engine consumes. A dictionary mapping resource names to the ratio at which they are consumed by the engine. :Attribute: Read-only, cannot be set :rtype: dict(str, float) :Game Scenes: Flight .. note:: For example, if the ratios are 0.6 for LiquidFuel and 0.4 for Oxidizer, then for every 0.6 units of LiquidFuel that the engine burns, it will burn 0.4 units of Oxidizer. .. attribute:: propellants The propellants that the engine consumes. :Attribute: Read-only, cannot be set :rtype: list(:class:`Propellant`) :Game Scenes: Flight .. attribute:: has_fuel Whether the engine has any fuel available. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. attribute:: flameout Whether the engine has flamed out - it is active but has run out of propellant, so it is producing no thrust. This is the signal a client can use to decide when to activate the next stage. Note that on a vessel with drop tanks or asparagus staging some engines can flame out while others keep burning. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. attribute:: throttle The current throttle setting for the engine. A value between 0 and 1. This is not necessarily the same as the vessel's main throttle setting, as some engines take time to adjust their throttle (such as jet engines), or independent throttle may be enabled. When the engine's independent throttle is enabled (see :attr:`Engine.independent_throttle`), can be used to set the throttle percentage. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: throttle_locked Whether the :attr:`Control.throttle` affects the engine. For example, this is ``True`` for liquid fueled rockets, and ``False`` for solid rocket boosters. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: independent_throttle Whether the independent throttle is enabled for the engine. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: can_restart Whether the engine can be restarted once shutdown. If the engine cannot be shutdown, returns ``False``. For example, this is ``True`` for liquid fueled rockets and ``False`` for solid rocket boosters. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: can_shutdown Whether the engine can be shutdown once activated. For example, this is ``True`` for liquid fueled rockets and ``False`` for solid rocket boosters. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: has_modes Whether the engine has multiple modes of operation. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: mode The name of the current engine mode. :Attribute: Can be read or written :rtype: str :Game Scenes: Flight .. attribute:: modes The available modes for the engine. A dictionary mapping mode names to :class:`Engine` objects. :Attribute: Read-only, cannot be set :rtype: dict(str, :class:`Engine`) :Game Scenes: Flight .. method:: toggle_mode() Toggle the current engine mode. :Game Scenes: Flight .. attribute:: auto_mode_switch Whether the engine will automatically switch modes. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: gimballed Whether the engine is gimballed. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: gimbal_range The range over which the gimbal can move, in degrees. Returns 0 if the engine is not gimballed. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: gimbal_locked Whether the engines gimbal is locked in place. Setting this attribute has no effect if the engine is not gimballed. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: gimbal_limit The gimbal limiter of the engine. A value between 0 and 1. Returns 0 if the gimbal is locked. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: gimbal_response_speed_enabled Whether the gimbal moves toward its commanded deflection at :attr:`Engine.gimbal_response_speed`. When ``False``, the gimbal reaches its commanded deflection in one physics tick. Throws an exception if the engine is not gimballed. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: gimbal_response_speed The response speed of the gimbal, in :math:`\mathrm{s^{-1}}`. Throws an exception if the engine is not gimballed. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Each physics tick of length :math:`\Delta t`, the gimbal moves a fraction :math:`v \Delta t` of the way from its deflection to the commanded deflection, where :math:`v` is the response speed. The fraction is at most 1, so at high physics warp the gimbal can reach its commanded deflection in one tick. This lag only applies when :attr:`Engine.gimbal_response_speed_enabled` is ``True``. .. attribute:: gimbal_pitch_enabled Whether the gimbal responds to pitch control input. Throws an exception if the engine is not gimballed. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: gimbal_yaw_enabled Whether the gimbal responds to yaw control input. Throws an exception if the engine is not gimballed. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: gimbal_roll_enabled Whether the gimbal responds to roll control input. Throws an exception if the engine is not gimballed. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: gimbal_override Whether the gimbal is being controlled directly, bypassing the vessel's normal flight controls. When enabled, the gimbal deflection is set by :attr:`Engine.gimbal_actuation` instead of the normal control inputs. The override is automatically released if the controlling client disconnects or the vessel changes. Has no effect if the engine is not gimballed. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: gimbal_actuation The gimbal actuation command applied when :attr:`Engine.gimbal_override` is enabled, in the pitch, roll and yaw axes. Each component is a normalized control input between -1 and 1. The physical deflection is scaled by :attr:`Engine.gimbal_range` and :attr:`Engine.gimbal_limit`. When the gimbal is not being overridden, returns the current actuation. :Attribute: Can be read or written :rtype: tuple(float, float, float) :Game Scenes: Flight .. note:: The gimbal ignores the component for an axis it is disabled for, such as pitch when :attr:`Engine.gimbal_pitch_enabled` is ``False``. .. attribute:: available_torque The available torque, in :math:`\mathrm{N \cdot m}`, that can be produced by this engine, in the positive and negative pitch, roll and yaw axes of the vessel. These axes correspond to the coordinate axes of the :attr:`Vessel.reference_frame`. Returns zero if the engine is inactive, or not gimballed. :Attribute: Read-only, cannot be set :rtype: :class:`AxisRange` :Game Scenes: Flight .. note:: The torque is zero about an axis the gimbal is disabled for, such as pitch when :attr:`Engine.gimbal_pitch_enabled` is ``False``. .. attribute:: can_reverse_thrust Whether the engine has a recognized thrust reverser. This is ``True`` for stock engines with a thrust reverser (such as the J-33 "Wheesley" and J-90 "Goliath" turbofan engines) and for supported mod engines. It is ``False`` for engines whose reverser is not recognized, as KSP provides no standard way to detect one. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Recognizes the thrust reversers of Firespitter and KerbalActuators. .. attribute:: thrust_reversed Whether the engine's thrust reverser is engaged, reversing the direction of thrust. While the reverser is still moving, this reports the state it is moving to, so a read immediately after a set returns the value that was set and setting the same value again has no effect. Throws an exception if the engine does not have a thrust reverser (see :attr:`Engine.can_reverse_thrust`). :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. method:: toggle_thrust_reversal() Toggle the engine's thrust reverser. Throws an exception if the engine does not have a thrust reverser (see :attr:`Engine.can_reverse_thrust`). :Game Scenes: Flight .. attribute:: has_real_fuels Whether the engine is managed by RealFuels. The remaining properties in this section are only available when it is. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: ignitions The number of times the engine can still be ignited, or -1 if it can be ignited an unlimited number of times. Throws an exception if the engine is not managed by RealFuels (see :attr:`Engine.has_real_fuels`). :Attribute: Read-only, cannot be set :rtype: int :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Requires RealFuels. .. attribute:: ignition_resources The resources the engine consumes each time it ignites, keyed by resource name, with the amount of each that is required. The engine uses up an ignition and fails to light if they are not available. Throws an exception if the engine is not managed by RealFuels (see :attr:`Engine.has_real_fuels`). :Attribute: Read-only, cannot be set :rtype: dict(str, float) :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Requires RealFuels. .. attribute:: has_ullage Whether the engine's propellant is subject to ullage, so that it must be settled before the engine will run reliably. Throws an exception if the engine is not managed by RealFuels (see :attr:`Engine.has_real_fuels`). :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Requires RealFuels. .. attribute:: propellant_stability How settled the propellant feeding the engine is, from 0 (fully unsettled) to 1 (fully settled). Acceleration along the engine's thrust axis settles it, and coasting and rotation unsettle it. Throws an exception if the engine is not managed by RealFuels (see :attr:`Engine.has_real_fuels`). :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: Requires RealFuels. .. attribute:: propellant_reliability The probability that the propellant feeding the engine behaves normally, from 0 to 1. This is :attr:`Engine.propellant_stability` scaled by the game's ullage difficulty setting, and is the value RealFuels itself tests against when deciding whether the engine runs. Throws an exception if the engine is not managed by RealFuels (see :attr:`Engine.has_real_fuels`). :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: Requires RealFuels. .. attribute:: pressure_fed Whether the engine is fed by tank pressure rather than by a pump, and so needs to draw from a highly pressurized tank. Throws an exception if the engine is not managed by RealFuels (see :attr:`Engine.has_real_fuels`). :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: Requires RealFuels. .. attribute:: has_feed_pressure Whether the tanks feeding the engine supply the pressure it needs. Always ``True`` for an engine that is not pressure fed. Throws an exception if the engine is not managed by RealFuels (see :attr:`Engine.has_real_fuels`). :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. note:: Requires RealFuels. .. class:: Propellant A propellant for an engine. Obtains by calling :attr:`Engine.propellants`. .. attribute:: name The name of the propellant. :Attribute: Read-only, cannot be set :rtype: str :Game Scenes: Flight .. attribute:: current_amount The current amount of propellant consumed in the current physics update. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: current_requirement The required amount of propellant for the current physics update. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: total_resource_available The total amount of the underlying resource currently reachable given resource flow rules. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: total_resource_capacity The total vehicle capacity for the underlying propellant resource, restricted by resource flow rules. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: ignore_for_isp If this propellant should be ignored when calculating required mass flow given specific impulse. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. attribute:: ignore_for_thrust_curve If this propellant should be ignored for thrust curve calculations. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. attribute:: draw_stack_gauge If this propellant has a stack gauge or not. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. attribute:: is_deprived If this propellant is deprived. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. attribute:: ratio The propellant ratio. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight Experiment ^^^^^^^^^^ .. class:: Experiment Obtained by calling :attr:`Part.experiment`. .. note:: Includes the experiments of DMagic's DMModuleScienceAnimateGeneric. .. attribute:: part The part object for this experiment. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: name Internal name of the experiment, as used in `part cfg files `_. :Attribute: Read-only, cannot be set :rtype: str :Game Scenes: Flight .. attribute:: title Title of the experiment, as shown on the in-game UI. :Attribute: Read-only, cannot be set :rtype: str :Game Scenes: Flight .. method:: run() Run the experiment. :Game Scenes: Flight .. method:: transmit() Transmit all experimental data contained by this part. :Game Scenes: Flight .. method:: dump() Dump the experimental data contained by the experiment. :Game Scenes: Flight .. method:: reset() Reset the experiment. :Game Scenes: Flight .. attribute:: deployed Whether the experiment has been deployed. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. attribute:: rerunnable Whether the experiment can be re-run. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. attribute:: inoperable Whether the experiment is inoperable. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. attribute:: has_data Whether the experiment contains data. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. attribute:: data The data contained in this experiment. :Attribute: Read-only, cannot be set :rtype: list(:class:`ScienceData`) :Game Scenes: Flight .. attribute:: biome The name of the biome the experiment is currently in. :Attribute: Read-only, cannot be set :rtype: str :Game Scenes: Flight .. attribute:: available Determines if the experiment is available given the current conditions. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. attribute:: science_subject Containing information on the corresponding specific science result for the current conditions. Returns ``None`` if the experiment is unavailable. :Attribute: Read-only, cannot be set :rtype: :class:`ScienceSubject` or None :Game Scenes: Flight .. class:: ScienceData(data_amount, science_value, transmit_value) Obtained by calling :attr:`Experiment.data`. .. attribute:: data_amount Data amount. :rtype: float .. attribute:: science_value Science value. :rtype: float .. attribute:: transmit_value Transmit value. :rtype: float .. class:: ScienceSubject(id, title, is_complete, science, science_cap, data_scale, subject_value, scientific_value) Obtained by calling :attr:`Experiment.science_subject`. .. attribute:: id The identifier of the subject, e.g. ``crewReport@KerbinSrfLandedLaunchPad``. :rtype: str .. attribute:: title The title of the subject, as shown in the science archives. :rtype: str .. attribute:: is_complete Whether the subject has been fully researched. This is true once the science banked for the subject reaches the science cap. As the banked science (see :attr:`ScienceSubject.science`) is only updated after transmission/recovery, this reflects fully mining the subject over repeated experiments, not whether a single run has produced data. To check whether a run has produced data, and how valuable it is, use :attr:`Experiment.has_data` and :attr:`ScienceData.transmit_value`. :rtype: bool .. attribute:: science Amount of science already earned from this subject, not updated until after transmission/recovery. :rtype: float .. attribute:: science_cap Total science allowable for this subject. :rtype: float .. attribute:: data_scale Multiply science value by this to determine data amount in mits. :rtype: float .. attribute:: subject_value Multiplier for specific Celestial Body/Experiment Situation combination. :rtype: float .. attribute:: scientific_value Diminishing value multiplier for decreasing the science value returned from repeated experiments. :rtype: float Fairing ^^^^^^^ .. class:: Fairing A fairing. Obtained by calling :attr:`Part.fairing`. .. note:: Includes the fairings of ProceduralFairings. .. attribute:: part The part object for this fairing. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. method:: jettison() Jettison the fairing. Has no effect if it has already been jettisoned. :Game Scenes: Flight .. attribute:: jettisoned Whether the fairing has been jettisoned. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight Intake ^^^^^^ .. class:: Intake An air intake. Obtained by calling :attr:`Part.intake`. .. attribute:: part The part object for this intake. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: open Whether the intake is open. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: speed Speed of the flow into the intake, in :math:`\mathrm{m/s}`. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: flow The rate of flow into the intake, in units of resource per second. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: area The area of the intake's opening, in :math:`\mathrm{m^{2}}`. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph Leg ^^^ .. class:: Leg A landing leg. Obtained by calling :attr:`Part.leg`. .. attribute:: part The part object for this landing leg. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: state The current state of the landing leg. :Attribute: Read-only, cannot be set :rtype: :class:`DeployableState` :Game Scenes: Flight .. attribute:: deployable Whether the leg is deployable. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: deployed Whether the landing leg is deployed. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. note:: Fixed landing legs are always deployed. Throws :class:`KRPC.InvalidOperationException` if set on a fixed landing leg. .. attribute:: is_grounded Returns whether the leg is touching the ground. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. attribute:: load The force pressing the leg's foot into the ground, in :math:`\mathrm{kN}`. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: The game raises the load of a grounded leg to at least 10 kN. :attr:`Leg.impact_tolerance` applies to the rise in this value. .. method:: contact_position(reference_frame) The position of the bottom of the leg's foot, in the given reference frame. While the leg is grounded, this is where it touches the ground. :param ReferenceFrame reference_frame: The reference frame that the returned position vector is in. :returns: The position as a vector. :rtype: tuple(float, float, float) :Game Scenes: Flight .. attribute:: suspension_spring_strength Suspension spring strength, as set in the editor. Throws an exception if the leg has no suspension. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: suspension_damper_strength Suspension damper strength, as set in the editor. Throws an exception if the leg has no suspension. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: suspension_spring The spring constant of the suspension, in :math:`\mathrm{kN/m}`, or ``None`` while the leg is not grounded. :Attribute: Read-only, cannot be set :rtype: float or None :Game Scenes: Flight .. note:: The game updates it while the leg is grounded, from :attr:`Leg.suspension_spring_strength`, the vessel's mass, the leg's compression and the local gravity. .. attribute:: suspension_damper The damping constant of the suspension, in :math:`\mathrm{kN \cdot s/m}`, or ``None`` while the leg is not grounded. :Attribute: Read-only, cannot be set :rtype: float or None :Game Scenes: Flight .. note:: The game updates it while the leg is grounded, from :attr:`Leg.suspension_damper_strength` and :attr:`Leg.suspension_spring`. .. attribute:: suspension_travel The travel of the suspension, in meters. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: impact_tolerance The rise in :attr:`Leg.load` over one physics tick that breaks the leg, in :math:`\mathrm{kN}`. Throws an exception if the leg is not breakable. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. note:: The game scales the rise by the local gravity divided by standard gravity before comparing it with this tolerance. .. attribute:: explode_multiplier The multiple of :attr:`Leg.impact_tolerance` that destroys the leg, in place of breaking it. Throws an exception if the leg is not breakable. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph Launch Clamp ^^^^^^^^^^^^ .. class:: LaunchClamp A launch clamp. Obtained by calling :attr:`Part.launch_clamp`. .. attribute:: part The part object for this launch clamp. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. method:: release() Releases the docking clamp. Has no effect if the clamp has already been released. :Game Scenes: Flight Light ^^^^^ .. class:: Light A light. Obtained by calling :attr:`Part.light`. .. attribute:: part The part object for this light. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: active Whether the light is switched on. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: color The color of the light. :Attribute: Can be read or written :rtype: :class:`StdLib.ColorRGB` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: blink Whether blinking is enabled. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: blink_rate The blink rate of the light. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: power_usage The current power usage, in units of charge per second. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight Parachute ^^^^^^^^^ .. class:: Parachute A parachute. Obtained by calling :attr:`Part.parachute`. .. note:: Includes the parachutes of RealChute. .. attribute:: part The part object for this parachute. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. method:: deploy() Deploys the parachute. This has no effect if the parachute has already been deployed. :Game Scenes: Flight .. attribute:: deployed Whether the parachute has been deployed. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. method:: arm() Deploys the parachute. This has no effect if the parachute has already been armed or deployed. :Game Scenes: Flight .. attribute:: armed Whether the parachute has been armed or deployed. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. method:: cut() Cuts the parachute. :Game Scenes: Flight .. attribute:: state The current state of the parachute. :Attribute: Read-only, cannot be set :rtype: :class:`ParachuteState` :Game Scenes: Flight .. attribute:: deploy_altitude The altitude at which the parachute will full deploy, in meters. Only applicable to stock parachutes. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: deploy_min_pressure The minimum pressure at which the parachute will semi-deploy, in atmospheres. Only applicable to stock parachutes. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: safe_state Whether it is currently safe to deploy the parachute, given the vessel's flight conditions. Computed by KSP from the current airspeed, pressure and temperature. Only applicable to stock parachutes. Note that KSP reports :attr:`ParachuteSafeState.unsafe` for the first second after the vessel unpacks, before its thermal data is valid. :Attribute: Read-only, cannot be set :rtype: :class:`ParachuteSafeState` :Game Scenes: Flight .. class:: ParachuteState The state of a parachute. See :attr:`Parachute.state`. .. data:: stowed The parachute is safely tucked away inside its housing. .. data:: armed The parachute is armed for deployment. .. data:: semi_deployed The parachute has been deployed and is providing some drag, but is not fully deployed yet. (Stock parachutes only) .. data:: deployed The parachute is fully deployed. .. data:: cut The parachute has been cut. .. class:: ParachuteSafeState The safety state of deploying a parachute. See :attr:`Parachute.safe_state`. .. data:: safe The parachute is safe to deploy. .. data:: risky Deploying the parachute is risky, and it may break off. .. data:: unsafe The parachute is unsafe to deploy, and will break off. .. data:: none The safety state is not available, because the vessel is not in an atmosphere or the parachute has already been deployed or cut. Radiator ^^^^^^^^ .. class:: Radiator A radiator. Obtained by calling :attr:`Part.radiator`. .. attribute:: part The part object for this radiator. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: deployable Whether the radiator is deployable. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: deployed For a deployable radiator, ``True`` if the radiator is extended. If the radiator is not deployable, this is always ``True``. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: state The current state of the radiator. :Attribute: Read-only, cannot be set :rtype: :class:`DeployableState` :Game Scenes: Flight .. note:: A fixed radiator is always :attr:`DeployableState.deployed`. Resource Converter ^^^^^^^^^^^^^^^^^^ .. class:: ResourceConverter A resource converter. Obtained by calling :attr:`Part.resource_converter`. .. attribute:: part The part object for this converter. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: count The number of converters in the part. :Attribute: Read-only, cannot be set :rtype: int :Game Scenes: Flight .. method:: name(index) The name of the specified converter. :param int index: Index of the converter. :rtype: str :Game Scenes: Flight .. method:: active(index) True if the specified converter is active. :param int index: Index of the converter. :rtype: bool :Game Scenes: Flight .. method:: start(index) Start the specified converter. :param int index: Index of the converter. :Game Scenes: Flight .. method:: stop(index) Stop the specified converter. :param int index: Index of the converter. :Game Scenes: Flight .. method:: state(index) The state of the specified converter. :param int index: Index of the converter. :rtype: :class:`ResourceConverterState` :Game Scenes: Flight .. method:: status_info(index) Status information for the specified converter. This is the full status message shown in the in-game UI. :param int index: Index of the converter. :rtype: str :Game Scenes: Flight .. method:: inputs(index) List of the names of resources consumed by the specified converter. :param int index: Index of the converter. :rtype: list(str) :Game Scenes: Flight .. method:: outputs(index) List of the names of resources produced by the specified converter. :param int index: Index of the converter. :rtype: list(str) :Game Scenes: Flight .. attribute:: optimum_core_temperature The core temperature at which the converter will operate with peak efficiency, in Kelvin. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: core_temperature The core temperature of the converter, in Kelvin. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: thermal_efficiency The thermal efficiency of the converter, as a percentage of its maximum. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. class:: ResourceConverterState The state of a resource converter. See :meth:`ResourceConverter.state`. .. data:: running Converter is running. .. data:: idle Converter is idle. .. data:: missing_resource Converter is missing a required resource. .. data:: storage_full No available storage for output resource. .. data:: capacity At preset resource capacity. .. data:: unknown Unknown state. Possible with modified resource converters. In this case, check :meth:`ResourceConverter.status_info` for more information. Resource Harvester ^^^^^^^^^^^^^^^^^^ .. class:: ResourceHarvester A resource harvester (drill). Obtained by calling :attr:`Part.resource_harvester`. .. attribute:: part The part object for this harvester. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: state The deployment state of the harvester. Whether it is drilling is reported separately by :attr:`ResourceHarvester.active`. :Attribute: Read-only, cannot be set :rtype: :class:`DeployableState` :Game Scenes: Flight .. note:: A harvester is never :attr:`DeployableState.broken`, as the game does not track damage for them. .. attribute:: deployed Whether the harvester is deployed. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: active Whether the harvester is actively drilling. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. note:: A value set while the harvester is deploying is applied when the deploy completes, so it can be set immediately after setting :attr:`ResourceHarvester.deployed` without waiting for the deploy animation. Setting it has no effect while the harvester is retracted or retracting. .. attribute:: extraction_rate The rate at which the drill is extracting ore, in :math:`\mathrm{units/s}`. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: thermal_efficiency The thermal efficiency of the drill, as a percentage of its maximum. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: core_temperature The core temperature of the drill, in Kelvin. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: optimum_core_temperature The core temperature at which the drill will operate with peak efficiency, in Kelvin. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight Reaction Wheel ^^^^^^^^^^^^^^ .. class:: ReactionWheel A reaction wheel. Obtained by calling :attr:`Part.reaction_wheel`. .. attribute:: part The part object for this reaction wheel. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: active Whether the reaction wheel is active. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: broken Whether the reaction wheel is broken. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. attribute:: available_torque The available torque, in :math:`\mathrm{N \cdot m}`, that can be produced by this reaction wheel, in the positive and negative pitch, roll and yaw axes of the vessel. These axes correspond to the coordinate axes of the :attr:`Vessel.reference_frame`. Returns zero if the reaction wheel is inactive or broken. :Attribute: Read-only, cannot be set :rtype: :class:`AxisRange` :Game Scenes: Flight .. attribute:: max_torque The maximum torque, in :math:`\mathrm{N \cdot m}`, that can be produced by this reaction wheel, when it is active, in the positive and negative pitch, roll and yaw axes of the vessel. These axes correspond to the coordinate axes of the :attr:`Vessel.reference_frame`. :Attribute: Read-only, cannot be set :rtype: :class:`AxisRange` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: authority_limiter The authority limiter for the reaction wheel, as a percentage of maximum torque. A value between 0 and 1. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph Resource Drain ^^^^^^^^^^^^^^ .. class:: ResourceDrain A resource drain. Obtained by calling :attr:`Part.resource_drain`. .. attribute:: part The part object for this resource drain. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: available_resources List of available resources. :Attribute: Read-only, cannot be set :rtype: list(:class:`Resource`) :Game Scenes: Flight .. method:: set_resource(resource, enabled) Whether the given resource should be drained. :param Resource resource: :param bool enabled: :Game Scenes: Flight .. method:: check_resource(resource) Whether the provided resource is enabled for draining. :param Resource resource: :rtype: bool :Game Scenes: Flight .. attribute:: drain_mode The drain mode. :Attribute: Can be read or written :rtype: :class:`DrainMode` :Game Scenes: Flight .. attribute:: min_rate Minimum possible drain rate :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: max_rate Maximum possible drain rate. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: rate Current drain rate. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. method:: start() Activates resource draining for all enabled parts. :Game Scenes: Flight .. method:: stop() Turns off resource draining. :Game Scenes: Flight .. class:: DrainMode Resource drain mode. See :attr:`ResourceDrain.drain_mode`. .. data:: part Drains from the parent part. .. data:: vessel Drains from all available parts. Robotic Controller ^^^^^^^^^^^^^^^^^^ .. class:: RoboticController A robotic controller. Obtained by calling :attr:`Part.robotic_controller`. .. attribute:: part The part object for this controller. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: enabled Whether the controller is enabled. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: playing Whether the controller's sequence is currently playing. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. attribute:: position The current position along the sequence, in seconds. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: length The length of the sequence, in seconds. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: play_speed The speed at which the sequence is played back, as a multiple of normal speed. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. method:: play() Start playing the controller's sequence. :Game Scenes: Flight .. method:: stop() Stop playing the controller's sequence. :Game Scenes: Flight .. method:: has_part(part) Whether the controller has a part. :param Part part: :rtype: bool :Game Scenes: Flight .. method:: axes() The axes for the controller. :rtype: list(:class:`RoboticAxis`) :Game Scenes: Flight .. method:: add_axis(module, field_name) Add an axis to the controller. :param Module module: The part module that the axis belongs to. :param str field_name: The name of the axis field, as returned by :meth:`RoboticController.axes`. :returns: Returns ``True`` if the axis is added successfully. :rtype: bool :Game Scenes: Flight .. method:: add_key_frame(module, field_name, time, value) Add key frame value for controller axis. :param Module module: The part module that the axis belongs to. :param str field_name: The name of the axis field, as returned by :meth:`RoboticController.axes`. :param float time: The time of the key frame. :param float value: The value of the key frame. :returns: Returns ``True`` if the key frame is added successfully. :rtype: bool :Game Scenes: Flight .. method:: clear_axis(module, field_name) Clear axis. :param Module module: The part module that the axis belongs to. :param str field_name: The name of the axis field, as returned by :meth:`RoboticController.axes`. :returns: Returns ``True`` if the axis is cleared successfully. :rtype: bool :Game Scenes: Flight .. class:: RoboticAxis(module, field_name) An axis of a robotic controller. .. note:: See :meth:`RoboticController.axes`. .. attribute:: module The part module the axis belongs to. :rtype: :class:`Module` .. attribute:: field_name The name of the field the axis controls. :rtype: str Robotic Hinge ^^^^^^^^^^^^^ .. class:: RoboticHinge A robotic hinge. Obtained by calling :attr:`Part.robotic_hinge`. .. attribute:: part The part object for this robotic hinge. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: target_angle Target angle. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: current_angle Current angle. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: min_angle The minimum angle the hinge can move to, in degrees. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: max_angle The maximum angle the hinge can move to, in degrees. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: rate Target movement rate in :math:`\mathrm{{}^{\circ}/s}`. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: damping Damping percentage. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: locked Lock movement. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: motor_engaged Whether the motor is engaged. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: is_moving Whether the servo is currently moving. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. method:: move_home() Move hinge to its built position. :Game Scenes: Flight Robotic Piston ^^^^^^^^^^^^^^ .. class:: RoboticPiston A robotic piston part. Obtained by calling :attr:`Part.robotic_piston`. .. attribute:: part The part object for this robotic piston. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: target_extension Target extension of the piston. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: current_extension Current extension of the piston. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: min_extension The minimum extension of the piston, in meters. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: max_extension The maximum extension of the piston, in meters. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: rate Target movement rate in :math:`\mathrm{m/s}`. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: damping Damping percentage. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: locked Lock movement. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: motor_engaged Whether the motor is engaged. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: is_moving Whether the servo is currently moving. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. method:: move_home() Move piston to its built position. :Game Scenes: Flight Robotic Rotation ^^^^^^^^^^^^^^^^ .. class:: RoboticRotation A robotic rotation servo. Obtained by calling :attr:`Part.robotic_rotation`. .. attribute:: part The part object for this robotic rotation servo. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: target_angle Target angle. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: current_angle Current angle. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: min_angle The minimum angle the servo can rotate to, in degrees. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: max_angle The maximum angle the servo can rotate to, in degrees. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: allow_full_rotation Whether the servo is allowed to rotate freely through a full revolution, ignoring the angle limits. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: rate Target movement rate in :math:`\mathrm{{}^{\circ}/s}`. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: damping Damping percentage. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: locked Lock Movement :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: motor_engaged Whether the motor is engaged. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: is_moving Whether the servo is currently moving. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. method:: move_home() Move rotation servo to its built position. :Game Scenes: Flight Robotic Rotor ^^^^^^^^^^^^^ .. class:: RoboticRotor A robotic rotor. Obtained by calling :attr:`Part.robotic_rotor`. .. attribute:: part The part object for this robotic rotor. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: target_rpm Target RPM. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: current_rpm Current RPM. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: inverted Whether the rotor direction is inverted. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: torque_limit Torque limit percentage. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: max_torque The maximum torque the rotor can generate, in kilonewtons. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: brake_percentage The percentage of braking force applied to the rotor. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight .. attribute:: locked Lock movement. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: motor_engaged Whether the motor is engaged. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: is_moving Whether the rotor is currently moving. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight RCS ^^^ .. class:: RCS An RCS block or thruster. Obtained by calling :attr:`Part.rcs`. .. attribute:: part The part object for this RCS. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: active Whether the RCS thrusters are active. An RCS thruster is inactive if the RCS action group is disabled (:attr:`Control.rcs`), the RCS thruster itself is not enabled (:attr:`RCS.enabled`), or it is covered by a fairing (:attr:`Part.shielded`) and cannot thrust while shielded. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. attribute:: enabled Whether the RCS thrusters are enabled. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: pitch_enabled Whether the RCS thruster will fire when pitch control input is given. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: yaw_enabled Whether the RCS thruster will fire when yaw control input is given. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: roll_enabled Whether the RCS thruster will fire when roll control input is given. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: forward_enabled Whether the RCS thruster will fire when forward control input is given. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: up_enabled Whether the RCS thruster will fire when up control input is given. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: right_enabled Whether the RCS thruster will fire when right control input is given. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: input_override Whether the RCS control is being set directly, bypassing the vessel's normal flight controls. When enabled, the rotation and translation demand is set by :attr:`RCS.rotation_override` and :attr:`RCS.translation_override` instead of the normal control inputs. The override is automatically released if the controlling client disconnects or the vessel changes. Precision mode leaves an overridden block at full thrust. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: rotation_override The rotation demand applied when :attr:`RCS.input_override` is enabled, in the pitch, roll and yaw axes. Each component is a normalized control input between -1 and 1. :Attribute: Can be read or written :rtype: tuple(float, float, float) :Game Scenes: Flight .. note:: The block ignores the component for an axis it is disabled for, such as pitch when :attr:`RCS.pitch_enabled` is ``False``. .. attribute:: translation_override The translation demand applied when :attr:`RCS.input_override` is enabled, in the right, up and forward axes. Each component is a normalized control input between -1 and 1. :Attribute: Can be read or written :rtype: tuple(float, float, float) :Game Scenes: Flight .. note:: The block ignores the component for an axis it is disabled for, such as right when :attr:`RCS.right_enabled` is ``False``. .. attribute:: available_torque The available torque, in :math:`\mathrm{N \cdot m}`, that can be produced by this RCS, in the positive and negative pitch, roll and yaw axes of the vessel. These axes correspond to the coordinate axes of the :attr:`Vessel.reference_frame`. Returns zero if RCS is disable. :Attribute: Read-only, cannot be set :rtype: :class:`AxisRange` :Game Scenes: Flight .. note:: Precision mode weakens the block, and the available torque follows it. A block driven by :attr:`RCS.input_override` is exempt, so :meth:`RCS.override_wrench` can report the larger torque an override reaches. .. attribute:: available_force The available force, in Newtons, that can be produced by this RCS, in the positive and negative x, y and z axes of the vessel. These axes correspond to the coordinate axes of the :attr:`Vessel.reference_frame`. Returns zero if RCS is disabled. :Attribute: Read-only, cannot be set :rtype: :class:`AxisRange` :Game Scenes: Flight .. note:: Precision mode weakens the block, and the available force follows it. A block driven by :attr:`RCS.input_override` is exempt, so :meth:`RCS.override_wrench` can report the larger force an override reaches. .. attribute:: force The force being applied by the RCS thrusters, in Newtons. The vector is in the vessel's reference frame (:attr:`Vessel.reference_frame`). Returns zero if the RCS is inactive. :Attribute: Read-only, cannot be set :rtype: tuple(float, float, float) :Game Scenes: Flight .. attribute:: torque The torque being applied by the RCS thrusters about the vessel's center of mass, in :math:`\mathrm{N \cdot m}`. The vector is in the vessel's reference frame (:attr:`Vessel.reference_frame`). Returns zero if the RCS is inactive. :Attribute: Read-only, cannot be set :rtype: tuple(float, float, float) :Game Scenes: Flight .. method:: override_wrench(rotation, translation) The force and torque the given demands would produce, in Newtons and :math:`\mathrm{N \cdot m}`. :param tuple rotation: A rotation demand, as set by :attr:`RCS.rotation_override`. :param tuple translation: A translation demand, as set by :attr:`RCS.translation_override`. :returns: The force, and the torque about the vessel's center of mass, in the vessel's reference frame (:attr:`Vessel.reference_frame`), or zero if the RCS is inactive. :rtype: :class:`Wrench` :Game Scenes: Flight .. note:: The demands do not have to be applied. The prediction leaves out full thrust, which :attr:`RCS.force` and :attr:`RCS.torque` include. .. attribute:: available_thrust The amount of thrust, in Newtons, that would be produced by the thruster when activated. Returns zero if the thruster does not have any fuel. Takes the thrusters current :attr:`RCS.thrust_limit` and atmospheric conditions into account. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: max_thrust The maximum amount of thrust that can be produced by the RCS thrusters when active, in Newtons, with the :attr:`RCS.thrust_limit` set to 100%. Takes atmospheric conditions into account. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: max_vacuum_thrust The maximum amount of thrust that can be produced by the RCS thrusters when active in a vacuum, in Newtons. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: thrust_limit The thrust limiter of the thruster. A value between 0 and 1. :Attribute: Can be read or written :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: thrusters A list of thrusters, one of each nozzel in the RCS part. :Attribute: Read-only, cannot be set :rtype: list(:class:`Thruster`) :Game Scenes: Flight .. attribute:: specific_impulse The current specific impulse of the RCS, in seconds. Returns zero if the RCS is not active. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: vacuum_specific_impulse The vacuum specific impulse of the RCS, in seconds. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: kerbin_sea_level_specific_impulse The specific impulse of the RCS at sea level on Kerbin, in seconds. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: propellants The names of resources that the RCS consumes. :Attribute: Read-only, cannot be set :rtype: list(str) :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: propellant_ratios The ratios of resources that the RCS consumes. A dictionary mapping resource names to the ratios at which they are consumed by the RCS. :Attribute: Read-only, cannot be set :rtype: dict(str, float) :Game Scenes: Flight .. attribute:: has_fuel Whether the RCS has fuel available. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight Sensor ^^^^^^ .. class:: Sensor A sensor, such as a thermometer. Obtained by calling :attr:`Part.sensor`. .. attribute:: part The part object for this sensor. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: active Whether the sensor is active. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: value The current value of the sensor. :Attribute: Read-only, cannot be set :rtype: str :Game Scenes: Flight .. note:: This is the same readout string shown in the part's right-click menu in-game, and is intended for display rather than for parsing. Both its units and the way it formats numbers follow the language the game is running in, so it is not stable across locales. For programmatic access to the underlying quantities, use :attr:`Part.temperature` (temperature sensors), :attr:`Flight.g_force` (accelerometers) or :attr:`Flight.static_pressure` (barometers). Solar Panel ^^^^^^^^^^^ .. class:: SolarPanel A solar panel. Obtained by calling :attr:`Part.solar_panel`. .. note:: Includes the curved solar panels of Near Future Solar. .. attribute:: part The part object for this solar panel. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: deployable Whether the solar panel is deployable. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight, Editor Vab, Editor Sph .. attribute:: deployed Whether the solar panel is extended. :Attribute: Can be read or written :rtype: bool :Game Scenes: Flight .. attribute:: state The current state of the solar panel. :Attribute: Read-only, cannot be set :rtype: :class:`DeployableState` :Game Scenes: Flight .. attribute:: energy_flow The current amount of energy being generated by the solar panel, in units of charge per second. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: sun_exposure The current amount of sunlight that is incident on the solar panel, as a percentage. A value between 0 and 1. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight Thruster ^^^^^^^^ .. class:: Thruster The component of an :class:`Engine` or :class:`RCS` part that generates thrust. Can obtained by calling :attr:`Engine.thrusters` or :attr:`RCS.thrusters`. .. note:: Engines can consist of multiple thrusters. For example, the S3 KS-25x4 "Mammoth" has four rocket nozzels, and so consists of four thrusters. .. attribute:: part The :attr:`Thruster.part` that contains this thruster. :Attribute: Read-only, cannot be set :rtype: :class:`Part` :Game Scenes: Flight .. attribute:: thrust The thrust being produced by the thruster, in Newtons. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. method:: thrust_position(reference_frame) The position at which the thruster generates thrust, in the given reference frame. For gimballed engines, this takes into account the current rotation of the gimbal. :param ReferenceFrame reference_frame: The reference frame that the returned position vector is in. :returns: The position as a vector. :rtype: tuple(float, float, float) :Game Scenes: Flight .. method:: thrust_direction(reference_frame) The direction of the force generated by the thruster, in the given reference frame. This is opposite to the direction in which the thruster expels propellant. For gimballed engines, this takes into account the current rotation of the gimbal. :param ReferenceFrame reference_frame: The reference frame that the returned direction is in. :returns: The direction as a unit vector. :rtype: tuple(float, float, float) :Game Scenes: Flight .. attribute:: thrust_reference_frame A reference frame that is fixed relative to the thruster and orientated with its thrust direction (:meth:`Thruster.thrust_direction`). For gimballed engines, this takes into account the current rotation of the gimbal. * The origin is at the position of thrust for this thruster (:meth:`Thruster.thrust_position`). * The axes rotate with the thrust direction. This is the direction in which the thruster expels propellant, including any gimballing. * The y-axis points along the thrust direction. * The x-axis and z-axis are perpendicular to the thrust direction. :Attribute: Read-only, cannot be set :rtype: :class:`ReferenceFrame` :Game Scenes: Flight .. attribute:: gimballed Whether the thruster is gimballed. :Attribute: Read-only, cannot be set :rtype: bool :Game Scenes: Flight .. method:: gimbal_position(reference_frame) Position around which the gimbal pivots. :param ReferenceFrame reference_frame: The reference frame that the returned position vector is in. :returns: The position as a vector. :rtype: tuple(float, float, float) :Game Scenes: Flight .. attribute:: gimbal_angle The current gimbal angle in the pitch, roll and yaw axes, in degrees. :Attribute: Read-only, cannot be set :rtype: tuple(float, float, float) :Game Scenes: Flight .. method:: initial_thrust_position(reference_frame) The position at which the thruster generates thrust, when the engine is in its initial position (no gimballing), in the given reference frame. :param ReferenceFrame reference_frame: The reference frame that the returned position vector is in. :returns: The position as a vector. :rtype: tuple(float, float, float) :Game Scenes: Flight .. note:: This position can move when the gimbal rotates. This is because the thrust position and gimbal position are not necessarily the same. .. method:: initial_thrust_direction(reference_frame) The direction of the force generated by the thruster, when the engine is in its initial position (no gimballing), in the given reference frame. This is opposite to the direction in which the thruster expels propellant. :param ReferenceFrame reference_frame: The reference frame that the returned direction is in. :returns: The direction as a unit vector. :rtype: tuple(float, float, float) :Game Scenes: Flight Wheel ^^^^^ .. class:: Wheel A wheel. Includes landing gear and rover wheels. Obtained by calling :attr:`Part.wheel`. Can be used to control the motors, steering and deployment of wheels, among other things. .. attribute:: part The part object for this wheel. :Attribute: Read-only, cannot be set :rtype: :class:`Part` .. attribute:: state The current state of the wheel. :Attribute: Read-only, cannot be set :rtype: :class:`DeployableState` .. attribute:: radius Radius of the wheel, in meters. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: grounded Whether the wheel is touching the ground. :Attribute: Read-only, cannot be set :rtype: bool .. attribute:: has_brakes Whether the wheel has brakes. :Attribute: Read-only, cannot be set :rtype: bool .. attribute:: brakes The braking force, as a percentage of maximum, when the brakes are applied. :Attribute: Can be read or written :rtype: float .. attribute:: auto_friction_control Whether automatic friction control is enabled. :Attribute: Can be read or written :rtype: bool .. attribute:: manual_friction_control Manual friction control value. Only has an effect if automatic friction control is disabled. A value between 0 and 5 inclusive. :Attribute: Can be read or written :rtype: float .. attribute:: deployable Whether the wheel is deployable. :Attribute: Read-only, cannot be set :rtype: bool .. attribute:: deployed Whether the wheel is deployed. :Attribute: Can be read or written :rtype: bool .. attribute:: powered Whether the wheel is powered by a motor. :Attribute: Read-only, cannot be set :rtype: bool .. attribute:: motor_enabled Whether the motor is enabled. :Attribute: Can be read or written :rtype: bool .. attribute:: motor_inverted Whether the direction of the motor is inverted. :Attribute: Can be read or written :rtype: bool .. attribute:: motor_state Whether the direction of the motor is inverted. :Attribute: Read-only, cannot be set :rtype: :class:`MotorState` .. attribute:: motor_output The output of the motor. This is the torque currently being generated, in :math:`\mathrm{N \cdot m}`. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: traction_control_enabled Whether automatic traction control is enabled. A wheel only has traction control if it is powered. :Attribute: Can be read or written :rtype: bool .. attribute:: traction_control Setting for the traction control. Only takes effect if the wheel has automatic traction control enabled. A value between 0 and 5 inclusive. :Attribute: Can be read or written :rtype: float .. attribute:: drive_limiter Manual setting for the motor limiter. Only takes effect if the wheel has automatic traction control disabled. A value between 0 and 100 inclusive. :Attribute: Can be read or written :rtype: float .. attribute:: steerable Whether the wheel has steering. :Attribute: Read-only, cannot be set :rtype: bool .. attribute:: steering_enabled Whether the wheel steering is enabled. :Attribute: Can be read or written :rtype: bool .. attribute:: steering_inverted Whether the wheel steering is inverted. :Attribute: Can be read or written :rtype: bool .. attribute:: steering_angle_auto Whether the steering angle is automatically limited based on the vessel's speed, reducing the maximum angle as the vessel moves faster. See also :attr:`Wheel.steering_angle_limit`. :Attribute: Can be read or written :rtype: bool .. attribute:: steering_angle_limit The steering angle limit. :Attribute: Can be read or written :rtype: float .. attribute:: steering_response_time Steering response time. :Attribute: Can be read or written :rtype: float .. attribute:: has_suspension Whether the wheel has suspension. :Attribute: Read-only, cannot be set :rtype: bool .. attribute:: suspension_spring_strength Suspension spring strength, as set in the editor. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: suspension_damper_strength Suspension damper strength, as set in the editor. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: suspension_spring The spring constant of the suspension, in :math:`\mathrm{kN/m}`, or ``None`` while the wheel is not grounded. Throws an exception if the wheel has no suspension. :Attribute: Read-only, cannot be set :rtype: float or None :Game Scenes: Flight .. note:: The game updates it while the wheel is grounded, from :attr:`Wheel.suspension_spring_strength`, the vessel's mass, the wheel's compression and the local gravity. .. attribute:: suspension_damper The damping constant of the suspension, in :math:`\mathrm{kN \cdot s/m}`, or ``None`` while the wheel is not grounded. Throws an exception if the wheel has no suspension. :Attribute: Read-only, cannot be set :rtype: float or None :Game Scenes: Flight .. note:: The game updates it while the wheel is grounded, from :attr:`Wheel.suspension_damper_strength` and :attr:`Wheel.suspension_spring`. .. attribute:: suspension_travel The travel of the suspension, in meters. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. attribute:: load The force pressing the wheel into the ground, in :math:`\mathrm{kN}`. :Attribute: Read-only, cannot be set :rtype: float :Game Scenes: Flight .. note:: The game raises the load of a grounded wheel to at least 0.5 kN, or 10 kN for a wheel with the old friction model. :attr:`Wheel.impact_tolerance` applies to the rise in this value. .. method:: contact_position(reference_frame) The position of the bottom of the wheel, in the given reference frame. While the wheel is grounded, this is where it touches the ground. :param ReferenceFrame reference_frame: The reference frame that the returned position vector is in. :returns: The position as a vector. :rtype: tuple(float, float, float) :Game Scenes: Flight .. attribute:: broken Whether the wheel is broken. :Attribute: Read-only, cannot be set :rtype: bool .. attribute:: repairable Whether the wheel is repairable. :Attribute: Read-only, cannot be set :rtype: bool .. attribute:: stress Current stress on the wheel. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: stress_tolerance Stress tolerance of the wheel. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: impact_tolerance The rise in :attr:`Wheel.load` over one physics tick that breaks the wheel, in :math:`\mathrm{kN}`. Throws an exception if the wheel is not breakable. :Attribute: Read-only, cannot be set :rtype: float .. note:: The game scales the rise by the local gravity divided by standard gravity before comparing it with this tolerance. .. attribute:: explode_multiplier The multiple of :attr:`Wheel.impact_tolerance` that destroys the wheel, in place of breaking it. Throws an exception if the wheel is not breakable. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: stress_percentage Current stress on the wheel as a percentage of its stress tolerance. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: deflection Current deflection of the wheel. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: slip Current slip of the wheel. :Attribute: Read-only, cannot be set :rtype: float .. class:: MotorState The state of the motor on a powered wheel. See :attr:`Wheel.motor_state`. .. data:: idle The motor is idle. .. data:: running The motor is running. .. data:: disabled The motor is disabled. .. data:: inoperable The motor is inoperable. .. data:: not_enough_resources The motor does not have enough resources to run.