space_ex v0.8.0 SpaceEx.SpaceCenter.Control
Used to manipulate the controls of a vessel.
This includes adjusting the
throttle, enabling/disabling systems such as SAS and RCS, or altering the
direction in which the vessel is pointing.
Obtained by calling SpaceEx.SpaceCenter.Vessel.control/1.
Control inputs (such as pitch, yaw and roll) are zeroed when all clients that have set one or more of these inputs are no longer connected.
Link to this section Summary
Functions
The state of the abort action group
Activates the next stage
Creates a maneuver node at the given universal time, and returns a
SpaceEx.SpaceCenter.Node object that can be used to modify it
Returns whether all antennas on the vessel are deployed, and sets the deployment state of all antennas
The state of the wheel brakes
Returns whether any of the cargo bays on the vessel are open, and sets the open state of all cargo bays
The current stage of the vessel
The state of the forward translational control
The state of the landing gear/legs
Returns true if the given action group is enabled
Sets the behavior of the pitch, yaw, roll and translation control inputs
Returns whether all of the air intakes on the vessel are open, and sets the open state of all air intakes
Returns whether all landing legs on the vessel are deployed, and sets the deployment state of all landing legs
The state of the lights
Returns a list of all existing maneuver nodes, ordered by time from first to last
Returns whether all parachutes on the vessel are deployed, and sets the deployment state of all parachutes
The state of the pitch control
Returns whether all radiators on the vessel are deployed, and sets the deployment state of all radiators
The state of RCS
Returns whether all reactive wheels on the vessel are active, and sets the active state of all reaction wheels
Remove all maneuver nodes
Returns whether all of the resource harvesters on the vessel are deployed, and sets the deployment state of all resource harvesters
Returns whether any of the resource harvesters on the vessel are active, and sets the active state of all resource harvesters
The state of the right translational control
The state of the roll control
The state of SAS
The current SpaceEx.SpaceCenter.SASMode
The state of the abort action group
Sets the state of the given action group
Returns whether all antennas on the vessel are deployed, and sets the deployment state of all antennas
The state of the wheel brakes
Returns whether any of the cargo bays on the vessel are open, and sets the open state of all cargo bays
The state of the forward translational control
The state of the landing gear/legs
Sets the behavior of the pitch, yaw, roll and translation control inputs
Returns whether all of the air intakes on the vessel are open, and sets the open state of all air intakes
Returns whether all landing legs on the vessel are deployed, and sets the deployment state of all landing legs
The state of the lights
Returns whether all parachutes on the vessel are deployed, and sets the deployment state of all parachutes
The state of the pitch control
Returns whether all radiators on the vessel are deployed, and sets the deployment state of all radiators
The state of RCS
Returns whether all reactive wheels on the vessel are active, and sets the active state of all reaction wheels
Returns whether all of the resource harvesters on the vessel are deployed, and sets the deployment state of all resource harvesters
Returns whether any of the resource harvesters on the vessel are active, and sets the active state of all resource harvesters
The state of the right translational control
The state of the roll control
The state of SAS
The current SpaceEx.SpaceCenter.SASMode
Returns whether all solar panels on the vessel are deployed, and sets the deployment state of all solar panels
The current SpaceEx.SpaceCenter.SpeedMode of the navball
The state of the throttle
The state of the up translational control
The state of the wheel steering
The state of the wheel throttle
Returns whether all wheels on the vessel are deployed, and sets the deployment state of all wheels
The state of the yaw control
Returns whether all solar panels on the vessel are deployed, and sets the deployment state of all solar panels
The source of the vessels control, for example by a kerbal or a probe core
The current SpaceEx.SpaceCenter.SpeedMode of the navball
The control state of the vessel
The state of the throttle
Toggles the state of the given action group
The state of the up translational control
The state of the wheel steering
The state of the wheel throttle
Returns whether all wheels on the vessel are deployed, and sets the deployment state of all wheels
The state of the yaw control
Link to this section Functions
The state of the abort action group.
Returns: true or false
Activates the next stage.
Equivalent to pressing the space bar in-game.
Returns a list of vessel objects that are jettisoned from the active vessel.
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
SpaceEx.SpaceCenter.active_vessel/1 no longer refer to the active vessel.
Returns: [vessel, ...], where vessel is a reference to a SpaceEx.SpaceCenter.Vessel object
Creates a maneuver node at the given universal time, and returns a
SpaceEx.SpaceCenter.Node object that can be used to modify it.
Optionally sets the magnitude of the delta-v for the maneuver node in the prograde, normal and radial directions.
ut— Universal time of the maneuver node.prograde— Delta-v in the prograde direction.normal— Delta-v in the normal direction.radial— Delta-v in the radial direction.
Returns: a reference to a SpaceEx.SpaceCenter.Node object
Returns whether all antennas on the vessel are deployed, and sets the deployment state of all antennas.
See SpaceEx.SpaceCenter.Antenna.deployed/1.
Returns: true or false
The state of the wheel brakes.
Returns: true or false
Returns whether any of the cargo bays on the vessel are open, and sets the open state of all cargo bays.
See SpaceEx.SpaceCenter.CargoBay.open/1.
Returns: true or false
The current stage of the vessel.
Corresponds to the stage number in the in-game UI.
Returns: an integer
The state of the forward translational control.
A value between -1 and 1. Equivalent to the h and n keys.
Returns: a low-precision decimal
The state of the landing gear/legs.
Returns: true or false
Returns true if the given action group is enabled.
group— A number between 0 and 9 inclusive, or between 0 and 250 inclusive when the Extended Action Groups mod is installed.
Returns: true or false
Sets the behavior of the pitch, yaw, roll and translation control inputs.
When set to additive, these inputs are added to the vessels current inputs. This mode is the default. When set to override, these inputs (if non-zero) override the vessels inputs. This mode prevents keyboard control, or SAS, from interfering with the controls when they are set.
Returns: a Elixir.SpaceEx.SpaceCenter.ControlInputMode value in atom form
Returns whether all of the air intakes on the vessel are open, and sets the open state of all air intakes.
See SpaceEx.SpaceCenter.Intake.open/1.
Returns: true or false
Returns whether all landing legs on the vessel are deployed, and sets the deployment state of all landing legs.
Does not include wheels (for example landing gear).
See SpaceEx.SpaceCenter.Leg.deployed/1.
Returns: true or false
The state of the lights.
Returns: true or false
Returns a list of all existing maneuver nodes, ordered by time from first to last.
Returns: [node, ...], where node is a reference to a SpaceEx.SpaceCenter.Node object
Returns whether all parachutes on the vessel are deployed, and sets the deployment state of all parachutes.
Cannot be set to false.
See SpaceEx.SpaceCenter.Parachute.deployed/1.
Returns: true or false
The state of the pitch control.
A value between -1 and 1. Equivalent to the w and s keys.
Returns: a low-precision decimal
Returns whether all radiators on the vessel are deployed, and sets the deployment state of all radiators.
See SpaceEx.SpaceCenter.Radiator.deployed/1.
Returns: true or false
The state of RCS.
Returns: true or false
Returns whether all reactive wheels on the vessel are active, and sets the active state of all reaction wheels.
See SpaceEx.SpaceCenter.ReactionWheel.active/1.
Returns: true or false
Remove all maneuver nodes.
Returns: :ok
Returns whether all of the resource harvesters on the vessel are deployed, and sets the deployment state of all resource harvesters.
See SpaceEx.SpaceCenter.ResourceHarvester.deployed/1.
Returns: true or false
Returns whether any of the resource harvesters on the vessel are active, and sets the active state of all resource harvesters.
See SpaceEx.SpaceCenter.ResourceHarvester.active/1.
Returns: true or false
The state of the right translational control.
A value between -1 and 1. Equivalent to the j and l keys.
Returns: a low-precision decimal
The state of the roll control.
A value between -1 and 1. Equivalent to the q and e keys.
Returns: a low-precision decimal
The state of SAS.
Equivalent to SpaceEx.SpaceCenter.AutoPilot.sas/1
Returns: true or false
The current SpaceEx.SpaceCenter.SASMode.
These modes are equivalent to the mode buttons to the left of the navball that appear when SAS is enabled.
Equivalent to SpaceEx.SpaceCenter.AutoPilot.sas_mode/1
Returns: a Elixir.SpaceEx.SpaceCenter.SASMode value in atom form
The state of the abort action group.
Returns: :ok
Sets the state of the given action group.
group— A number between 0 and 9 inclusive, or between 0 and 250 inclusive when the Extended Action Groups mod is installed.state—
Returns: :ok
Returns whether all antennas on the vessel are deployed, and sets the deployment state of all antennas.
See SpaceEx.SpaceCenter.Antenna.deployed/1.
Returns: :ok
The state of the wheel brakes.
Returns: :ok
Returns whether any of the cargo bays on the vessel are open, and sets the open state of all cargo bays.
See SpaceEx.SpaceCenter.CargoBay.open/1.
Returns: :ok
The state of the forward translational control.
A value between -1 and 1. Equivalent to the h and n keys.
Returns: :ok
The state of the landing gear/legs.
Returns: :ok
Sets the behavior of the pitch, yaw, roll and translation control inputs.
When set to additive, these inputs are added to the vessels current inputs. This mode is the default. When set to override, these inputs (if non-zero) override the vessels inputs. This mode prevents keyboard control, or SAS, from interfering with the controls when they are set.
Returns: :ok
Returns whether all of the air intakes on the vessel are open, and sets the open state of all air intakes.
See SpaceEx.SpaceCenter.Intake.open/1.
Returns: :ok
Returns whether all landing legs on the vessel are deployed, and sets the deployment state of all landing legs.
Does not include wheels (for example landing gear).
See SpaceEx.SpaceCenter.Leg.deployed/1.
Returns: :ok
The state of the lights.
Returns: :ok
Returns whether all parachutes on the vessel are deployed, and sets the deployment state of all parachutes.
Cannot be set to false.
See SpaceEx.SpaceCenter.Parachute.deployed/1.
Returns: :ok
The state of the pitch control.
A value between -1 and 1. Equivalent to the w and s keys.
Returns: :ok
Returns whether all radiators on the vessel are deployed, and sets the deployment state of all radiators.
See SpaceEx.SpaceCenter.Radiator.deployed/1.
Returns: :ok
The state of RCS.
Returns: :ok
Returns whether all reactive wheels on the vessel are active, and sets the active state of all reaction wheels.
See SpaceEx.SpaceCenter.ReactionWheel.active/1.
Returns: :ok
Returns whether all of the resource harvesters on the vessel are deployed, and sets the deployment state of all resource harvesters.
See SpaceEx.SpaceCenter.ResourceHarvester.deployed/1.
Returns: :ok
Returns whether any of the resource harvesters on the vessel are active, and sets the active state of all resource harvesters.
See SpaceEx.SpaceCenter.ResourceHarvester.active/1.
Returns: :ok
The state of the right translational control.
A value between -1 and 1. Equivalent to the j and l keys.
Returns: :ok
The state of the roll control.
A value between -1 and 1. Equivalent to the q and e keys.
Returns: :ok
The state of SAS.
Equivalent to SpaceEx.SpaceCenter.AutoPilot.sas/1
Returns: :ok
The current SpaceEx.SpaceCenter.SASMode.
These modes are equivalent to the mode buttons to the left of the navball that appear when SAS is enabled.
Equivalent to SpaceEx.SpaceCenter.AutoPilot.sas_mode/1
Returns: :ok
Returns whether all solar panels on the vessel are deployed, and sets the deployment state of all solar panels.
See SpaceEx.SpaceCenter.SolarPanel.deployed/1.
Returns: :ok
The current SpaceEx.SpaceCenter.SpeedMode of the navball.
This is the mode displayed next to the speed at the top of the navball.
Returns: :ok
The state of the throttle.
A value between 0 and 1.
Returns: :ok
The state of the up translational control.
A value between -1 and 1. Equivalent to the i and k keys.
Returns: :ok
The state of the wheel steering.
A value between -1 and 1. A value of 1 steers to the left, and a value of -1 steers to the right.
Returns: :ok
The state of the wheel throttle.
A value between -1 and 1. A value of 1 rotates the wheels forwards, a value of -1 rotates the wheels backwards.
Returns: :ok
Returns whether all wheels on the vessel are deployed, and sets the deployment state of all wheels.
Does not include landing legs.
See SpaceEx.SpaceCenter.Wheel.deployed/1.
Returns: :ok
The state of the yaw control.
A value between -1 and 1. Equivalent to the a and d keys.
Returns: :ok
Returns whether all solar panels on the vessel are deployed, and sets the deployment state of all solar panels.
See SpaceEx.SpaceCenter.SolarPanel.deployed/1.
Returns: true or false
The source of the vessels control, for example by a kerbal or a probe core.
Returns: a Elixir.SpaceEx.SpaceCenter.ControlSource value in atom form
The current SpaceEx.SpaceCenter.SpeedMode of the navball.
This is the mode displayed next to the speed at the top of the navball.
Returns: a Elixir.SpaceEx.SpaceCenter.SpeedMode value in atom form
The control state of the vessel.
Returns: a Elixir.SpaceEx.SpaceCenter.ControlState value in atom form
The state of the throttle.
A value between 0 and 1.
Returns: a low-precision decimal
Toggles the state of the given action group.
group— A number between 0 and 9 inclusive, or between 0 and 250 inclusive when the Extended Action Groups mod is installed.
Returns: :ok
The state of the up translational control.
A value between -1 and 1. Equivalent to the i and k keys.
Returns: a low-precision decimal
The state of the wheel steering.
A value between -1 and 1. A value of 1 steers to the left, and a value of -1 steers to the right.
Returns: a low-precision decimal
The state of the wheel throttle.
A value between -1 and 1. A value of 1 rotates the wheels forwards, a value of -1 rotates the wheels backwards.
Returns: a low-precision decimal
Returns whether all wheels on the vessel are deployed, and sets the deployment state of all wheels.
Does not include landing legs.
See SpaceEx.SpaceCenter.Wheel.deployed/1.
Returns: true or false
The state of the yaw control.
A value between -1 and 1. Equivalent to the a and d keys.
Returns: a low-precision decimal