space_ex v0.5.1 SpaceEx.SpaceCenter.DockingPort

A docking port.

Obtained by calling SpaceEx.SpaceCenter.Part.docking_port/1

Link to this section Summary

Functions

The direction that docking port points in, in the given reference frame

The part that this docking port is docked to

Whether the docking port has a shield

The part object for this docking port

The position of the docking port, in the given reference frame

The distance a docking port must move away when it undocks before it becomes ready to dock with another port, in meters

The reference frame that is fixed relative to this docking port, and oriented with the port

The rotation of the docking port, in the given reference frame

The state of the docking ports shield, if it has one

The state of the docking ports shield, if it has one

The current state of the docking port

Undocks the docking port and returns the new SpaceEx.SpaceCenter.Vessel that is created

Link to this section Functions

Link to this function direction(this, reference_frame)

The direction that docking port points in, in the given reference frame.

Returns: The direction as a unit vector.

  • reference_frame — The reference frame that the returned direction is in.
Link to this function docked_part(this)

The part that this docking port is docked to.

Returns nil if this docking port is not docked to anything.

Link to this function has_shield(this)

Whether the docking port has a shield.

The part object for this docking port.

Link to this function position(this, reference_frame)

The position of the docking port, in the given reference frame.

Returns: The position as a vector.

  • reference_frame — The reference frame that the returned position vector is in.
Link to this function reengage_distance(this)

The distance a docking port must move away when it undocks before it becomes ready to dock with another port, in meters.

Link to this function reference_frame(this)

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.

This reference frame is not necessarily equivalent to the reference frame for the part, returned by SpaceEx.SpaceCenter.Part.reference_frame/1.

Link to this function rotation(this, reference_frame)

The rotation of the docking port, in the given reference frame.

Returns: The rotation as a quaternion of the form \((x, y, z, w)\).

  • reference_frame — The reference frame that the returned rotation is in.
Link to this function set_shielded(this, value)

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.

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.

The current state of the docking port.

Undocks the docking port and returns the new SpaceEx.SpaceCenter.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.

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.