.. default-domain:: py .. highlight:: py .. currentmodule:: SpaceCenter .. _python-api-stage: Stage ===== .. class:: Stage A single stage of a vessel. Obtain activation (burn) stages from ``Vessel.Stages`` / ``Vessel.StageAt``, and decouple stages from ``Vessel.DecoupleStages`` / ``Vessel.DecoupleStageAt``. .. note:: Delta-v, thrust, TWR, specific impulse, burn time and mass members are only available on activation stages. On decouple stages those members throw InvalidOperationException because stock delta-v data does not apply. Thrust is reported in newtons and masses in kilograms (stock values are converted from kilonewtons and tonnes). .. attribute:: number The stage number (activation stage for burn stages, decouple stage otherwise). :Attribute: Read-only, cannot be set :rtype: int .. attribute:: parts The parts that belong to this stage. :Attribute: Read-only, cannot be set :rtype: list(:class:`Part`) .. method:: resources([cumulative = True]) Returns a :meth:`Stage.resources` object for this stage. :param bool cumulative: When ``False``, only resources assigned to this stage. When ``True``, resources for this stage and all later activation or decouple stage numbers are included. On activation stages, unstaged resource containers (for example fuel tanks) are grouped with the first higher activation stage before they are detached. :rtype: :class:`Resources` .. note:: This is an RPC method: call ``resources()`` (optional ``cumulative`` argument). For activation stages, unstaged resource containers (for example fuel tanks) are grouped with the first higher activation stage before they detach, matching the C# ``Resources()`` documentation. .. attribute:: delta_v Delta-v for this stage in the current situation, in m/s. :Attribute: Read-only, cannot be set :rtype: float .. note:: Delta-v is only defined for **activation** stages (``decouple`` is ``false``). Calling this on a decouple stage raises an error. .. attribute:: vacuum_delta_v Vacuum delta-v for this stage, in m/s. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: sea_level_delta_v Sea-level delta-v for this stage, in m/s. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: thrust Thrust in the current situation, in newtons. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: vacuum_thrust Vacuum thrust, in newtons. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: sea_level_thrust Sea-level thrust, in newtons. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: twr Thrust-to-weight ratio in the current situation. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: vacuum_twr Vacuum thrust-to-weight ratio. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: sea_level_twr Sea-level thrust-to-weight ratio. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: specific_impulse Specific impulse in the current situation, in seconds. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: vacuum_specific_impulse Vacuum specific impulse, in seconds. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: sea_level_specific_impulse Sea-level specific impulse, in seconds. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: burn_time Burn time for this stage, in seconds. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: start_mass The mass of the vessel after the stage activates, in kg. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: end_mass The mass of the vessel when the stage burns out, in kg. :Attribute: Read-only, cannot be set :rtype: float .. attribute:: dry_mass The dry mass of the vessel after the stage activates, in kg. :Attribute: Read-only, cannot be set :rtype: float .. note:: Includes the parts of all later stages. .. attribute:: fuel_mass The fuel mass of the vessel when the stage activates, in kg. :Attribute: Read-only, cannot be set :rtype: float .. note:: Includes the fuel of all later stages, and the fuel left in the parts the stage decouples. The stage burns :attr:`Stage.start_mass` minus :attr:`Stage.end_mass`.