MASIVTOL - MOARdV/AvionicsSystems GitHub Wiki

MASIVTOL.cs

Contents

MASIVTOL is the AvionicsSystems interface with the Wild Blue Industries VTOL manager.


VTOL Capabilities Category

The WBI VTOL Manager has several features that it controls. The VTOL Capabilities category provides a way to query the availability of those features on a given craft.

vtol.Available()

Indicates whether the Wild Blue Industries VTOL manager mod is available.

vtol.HasAirPark()

Returns 1 if the current vessel supports Air Park mode.

vtol.HasCrazyMode()

Returns 1 if the current vessel has WBI Crazy Mode components.

vtol.HasHover()

Returns 1 if the current vessel has WBI Hover controller components.

vtol.HasRotationController()

Returns 1 if at least one WBI Rotation Controller is installed.

vtol.HasThrustVector()

Returns 1 if the current vessel has WBI Thrust Vector components.


VTOL Air Park Category

The VTOL Air Park category provides the interface to toggle and query the Air Park mode in vessels equipped with that capability.

vtol.GetParked()

Returns 1 if the Air Park feature is active. Returns 0 if it is inactive or unavailable.

vtol.ToggleAirPark()

Toggle the Air Park feature. Returns 1 if Air Park is now active, returns 0 otherwise (including if Air Park is unavailable).


VTOL Crazy Mode Category

The VTOL Crazy Mode category provides the interface with the WBI Flying Saucer mod's Crazy Mode warp features.

vtol.GetWarpDirection()

Returns: The current crazy mode warp direction, or 0 if crazy mode is unavailable.

Get the Crazy Mode Warp Direction as specified below:

  • 0: Stop
  • 1: Forward
  • 2: Back
  • 3: Left
  • 4: Right
  • 5: Up
  • 6: Down

vtol.SetWarpDirection(double direction)

  • direction: One of the values from the description.

Returns: 1 if the mode was set, 0 if it could not be set.

Set the Crazy Mode Warp Direction as specified below:

  • 0: Stop
  • 1: Forward
  • 2: Back
  • 3: Left
  • 4: Right
  • 5: Up
  • 6: Down

VTOL Hover Category

The VTOL Hover category provides the interface for controlling engines that function as VTOL thrusters. It allows MAS to query the current commanded vertical speed, as well as change it. It also allows VTOL engines to be switched on or off separately from the main fc.ToggleEnginesEnabled() command.

vtol.ChangeVerticalSpeed(double amount)

  • amount: The change in vertical speed in m/s. Positive is up, negative is down.

Returns: 1 if a change was commanded, 0 otherwise.

Increase (positive amount) or decrease (negative amount) the commanded vertical speed in m/s.

vtol.GetEnginesActive()

Returns: 1 if engines are active, otherwise 0.

Returns 1 if the engines managed by the VTOL manager are active, or 0 if they are shut down, or if there are no managed engines.

vtol.GetHover()

Returns 1 if the VTOL manager reports that this vessel is in hover mode. Returns 0 otherwise.

vtol.GetVerticalSpeed()

Returns: The vertical speed the VTOL manager is trying to hold, or 0.

Returns the commanded vertical speed in m/s.

vtol.KillVerticalSpeed()

Returns: 1 if the speed was updated, 0 otherwise.

Set the commanded vertical speed to zero.

vtol.SetVerticalSpeed(double vSpeed)

  • vSpeed: The new vertical speed, in m/s.

Returns: 1 if the speed was updated, 0 otherwise.

Set the commanded vertical speed to the rate selected.

vtol.ToggleEngines()

Returns: 1 if engines toggled, 0 if there is no manager.

Toggles engines managed by the VTOL manager.

Note that these engines are also reported and controlled through the standard fc engine interface, so it is possible to switch them on and off through both.

vtol.ToggleHover()

Toggles VTOL hover mode.


VTOL Rotation Controller Category

The VTOL Rotation Controller category provides the interface for controlling engines that support configurable positions, such as tilt-rotor engines.

vtol.ChangeRotation(double changeDegrees)

  • changeDegrees: The number of degrees to rotate the engines. Positive rotates towards the up position, negative rotates towards the down position.

Returns: 1 if a change was commanded, 0 otherwise.

Instructs the rotation controller to adjust the position of the rotatable engines by the specified number of degrees.

vtol.SetRotation(double position)

  • position: Either 0 (for neutral), a positive value (for full-up), or a negative value (for full-down).

Returns: 1 if a rotation was successfully commanded, 0 otherwise.

Instructs the rotation controller to set engines to either full-up, full-down, or neutral, depending on position.

If position is zero, the engines are moved to their neutral positions. If position is greater than zero, the engines are moved to their full-up position, as long as the engines support that rotation. If position is negative and the engines support a full-down position, the engines will be moved to their full-down position.


VTOL Thrust Vector Category

The VTOL Thrust Vector category provides methods to query and set the thrust mode of engines that may switch between VTOL and Forward thrust modes, as welll as potentially Reverse thrust.

vtol.GetThrustMode()

Returns the current thrust mode for the VTOL engines. If none are available, returns 1 (forward).

Valid return values:

  • -1: Reverse Thrust
  • 0: VTOL Thrust
  • 1: Forward Thrust

vtol.SetThrustMode(double mode)

Returns: 1 if the mode was changed, 0 if it was not

Set the VTOL manager thrust mode. Valid settings are:

  • -1: Reverse Thrust
  • 0: VTOL Thrust
  • 1: Forward Thrust

This documentation was automatically generated from source code at 14:05 UTC on 13/May/2019.