space_ex v0.1.1 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.get_control/2.

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

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

The state of the abort action group

Returns true if the given action group is enabled

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

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

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

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 control state of the vessel

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

Remove all maneuver nodes

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

Returns whether all solar panels on the vessel are deployed, and sets the deployment state of all solar panels

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

Toggles the state of the given action group

Link to this section Functions

Link to this function activate_next_stage(conn, this)

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.get_active_vessel/1 no longer refer to the active vessel.

Link to this function add_node(conn, this, ut, prograde, normal, radial)

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.

Link to this function get_abort(conn, this)

The state of the abort action group.

Link to this function get_action_group(conn, this, group)

Returns true if the given action group is enabled.

Link to this function get_antennas(conn, this)

Returns whether all antennas on the vessel are deployed, and sets the deployment state of all antennas.

See SpaceEx.SpaceCenter.Antenna.get_deployed/2.

Link to this function get_brakes(conn, this)

The state of the wheel brakes.

Link to this function get_cargo_bays(conn, this)

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.get_open/2.

Link to this function get_current_stage(conn, this)

The current stage of the vessel.

Corresponds to the stage number in the in-game UI.

Link to this function get_forward(conn, this)

The state of the forward translational control.

A value between -1 and 1. Equivalent to the h and n keys.

Link to this function get_gear(conn, this)

The state of the landing gear/legs.

Link to this function get_input_mode(conn, this)

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.

Link to this function get_intakes(conn, this)

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.get_open/2.

Link to this function get_legs(conn, this)

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.get_deployed/2.

Link to this function get_lights(conn, this)

The state of the lights.

Link to this function get_nodes(conn, this)

Returns a list of all existing maneuver nodes, ordered by time from first to last.

Link to this function get_parachutes(conn, this)

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.get_deployed/2.

Link to this function get_pitch(conn, this)

The state of the pitch control.

A value between -1 and 1. Equivalent to the w and s keys.

Link to this function get_radiators(conn, this)

Returns whether all radiators on the vessel are deployed, and sets the deployment state of all radiators.

See SpaceEx.SpaceCenter.Radiator.get_deployed/2.

Link to this function get_rcs(conn, this)

The state of RCS.

Link to this function get_reaction_wheels(conn, this)

Returns whether all reactive wheels on the vessel are active, and sets the active state of all reaction wheels.

See SpaceEx.SpaceCenter.ReactionWheel.get_active/2.

Link to this function get_resource_harvesters(conn, this)

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.get_deployed/2.

Link to this function get_resource_harvesters_active(conn, this)

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.get_active/2.

Link to this function get_right(conn, this)

The state of the right translational control.

A value between -1 and 1. Equivalent to the j and l keys.

Link to this function get_roll(conn, this)

The state of the roll control.

A value between -1 and 1. Equivalent to the q and e keys.

Link to this function get_sas(conn, this)

The state of SAS.

Equivalent to SpaceEx.SpaceCenter.AutoPilot.get_sas/2

Link to this function get_sas_mode(conn, this)

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.get_sas_mode/2

Link to this function get_solar_panels(conn, this)

Returns whether all solar panels on the vessel are deployed, and sets the deployment state of all solar panels.

See SpaceEx.SpaceCenter.SolarPanel.get_deployed/2.

Link to this function get_source(conn, this)

The source of the vessels control, for example by a kerbal or a probe core.

Link to this function get_speed_mode(conn, this)

The current SpaceEx.SpaceCenter.SpeedMode of the navball.

This is the mode displayed next to the speed at the top of the navball.

Link to this function get_state(conn, this)

The control state of the vessel.

Link to this function get_throttle(conn, this)

The state of the throttle.

A value between 0 and 1.

Link to this function get_up(conn, this)

The state of the up translational control.

A value between -1 and 1. Equivalent to the i and k keys.

Link to this function get_wheel_steering(conn, this)

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.

Link to this function get_wheel_throttle(conn, this)

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.

Link to this function get_wheels(conn, this)

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.get_deployed/2.

Link to this function get_yaw(conn, this)

The state of the yaw control.

A value between -1 and 1. Equivalent to the a and d keys.

Link to this function remove_nodes(conn, this)

Remove all maneuver nodes.

Link to this function set_abort(conn, this, value)

The state of the abort action group.

Link to this function set_action_group(conn, this, group, state)

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

Link to this function set_antennas(conn, this, value)

Returns whether all antennas on the vessel are deployed, and sets the deployment state of all antennas.

See SpaceEx.SpaceCenter.Antenna.get_deployed/2.

Link to this function set_brakes(conn, this, value)

The state of the wheel brakes.

Link to this function set_cargo_bays(conn, this, value)

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.get_open/2.

Link to this function set_forward(conn, this, value)

The state of the forward translational control.

A value between -1 and 1. Equivalent to the h and n keys.

Link to this function set_gear(conn, this, value)

The state of the landing gear/legs.

Link to this function set_input_mode(conn, this, value)

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.

Link to this function set_intakes(conn, this, value)

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.get_open/2.

Link to this function set_legs(conn, this, value)

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.get_deployed/2.

Link to this function set_lights(conn, this, value)

The state of the lights.

Link to this function set_parachutes(conn, this, value)

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.get_deployed/2.

Link to this function set_pitch(conn, this, value)

The state of the pitch control.

A value between -1 and 1. Equivalent to the w and s keys.

Link to this function set_radiators(conn, this, value)

Returns whether all radiators on the vessel are deployed, and sets the deployment state of all radiators.

See SpaceEx.SpaceCenter.Radiator.get_deployed/2.

Link to this function set_rcs(conn, this, value)

The state of RCS.

Link to this function set_reaction_wheels(conn, this, value)

Returns whether all reactive wheels on the vessel are active, and sets the active state of all reaction wheels.

See SpaceEx.SpaceCenter.ReactionWheel.get_active/2.

Link to this function set_resource_harvesters(conn, this, value)

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.get_deployed/2.

Link to this function set_resource_harvesters_active(conn, this, value)

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.get_active/2.

Link to this function set_right(conn, this, value)

The state of the right translational control.

A value between -1 and 1. Equivalent to the j and l keys.

Link to this function set_roll(conn, this, value)

The state of the roll control.

A value between -1 and 1. Equivalent to the q and e keys.

Link to this function set_sas(conn, this, value)

The state of SAS.

Equivalent to SpaceEx.SpaceCenter.AutoPilot.get_sas/2

Link to this function set_sas_mode(conn, this, value)

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.get_sas_mode/2

Link to this function set_solar_panels(conn, this, value)

Returns whether all solar panels on the vessel are deployed, and sets the deployment state of all solar panels.

See SpaceEx.SpaceCenter.SolarPanel.get_deployed/2.

Link to this function set_speed_mode(conn, this, value)

The current SpaceEx.SpaceCenter.SpeedMode of the navball.

This is the mode displayed next to the speed at the top of the navball.

Link to this function set_throttle(conn, this, value)

The state of the throttle.

A value between 0 and 1.

Link to this function set_up(conn, this, value)

The state of the up translational control.

A value between -1 and 1. Equivalent to the i and k keys.

Link to this function set_wheel_steering(conn, this, value)

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.

Link to this function set_wheel_throttle(conn, this, value)

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.

Link to this function set_wheels(conn, this, value)

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.get_deployed/2.

Link to this function set_yaw(conn, this, value)

The state of the yaw control.

A value between -1 and 1. Equivalent to the a and d keys.

Link to this function toggle_action_group(conn, this, group)

Toggles the state of the given action group.