Rigs of Rods 2026.01
Soft-body Physics Simulation
Loading...
Searching...
No Matches
Public Member Functions
Script2Game::AutopilotClass Class Reference

Description

Binding of RoR::Autopilot.

Controls the autopilot system.

Note
Obtain the object using BeamClass.getAutopilot().

Definition at line 15 of file AutopilotClass.h.

Public Member Functions

void disconnect ()
 
bool getForceDisabled ()
 
void setForceDisabled (bool disabled)
 
APHeadingMode toggleHeading (APHeadingMode headingMode)
 
APAltitudeMode toggleAltitude (APAltitudeMode altitudeMode)
 
bool toggleIAS ()
 
bool toggleGPWS ()
 
int adjustHeading (int addedHeading)
 
int adjustAltitude (int addedAltitude)
 
int adjustVerticalSpeed (int addedVS)
 
int adjustIAS (int addedIAS)
 
float getVerticalApproachDeviation ()
 
float getHorizontalApproachDeviation ()
 
bool isILSAvailable ()
 
APHeadingMode getHeadingMode ()
 
int getHeadingValue ()
 
APAltitudeMode getAltitudeMode ()
 
int getAltitudeValue ()
 
bool getIASMode ()
 
int getIASValue ()
 
bool getGPWSMode ()
 
int getVerticalSpeedValue ()
 

Member Function Documentation

◆ adjustAltitude()

int Script2Game::AutopilotClass::adjustAltitude ( int  addedAltitude)

Adds addedAltitude to the current altitude.

Parameters
addedAltitudeThe altitude (in feet) that will be added to the current altitude. Use negative numbers to subtract.

◆ adjustHeading()

int Script2Game::AutopilotClass::adjustHeading ( int  addedHeading)

Adds addedHeading to the current heading.

Parameters
addedHeadingThe heading (in degrees) that will be added to the current heading. Use negative numbers to subtract.

◆ adjustIAS()

int Script2Game::AutopilotClass::adjustIAS ( int  addedIAS)

Adds addedIAS to the current airspeed reference for the auto-throttle.

Parameters
addedIASThe airspeed (in knots) that will be added to the current airspeed reference. Use negative numbers to subtract.

◆ adjustVerticalSpeed()

int Script2Game::AutopilotClass::adjustVerticalSpeed ( int  addedVS)

Adds addedVS to the current vertical speed.

Parameters
addedVSThe vertical speed (in feet per minute) that will be added to the current vertical speed. Use negative numbers to subtract.

◆ disconnect()

void Script2Game::AutopilotClass::disconnect ( )

Disconnects the autopilot.

◆ getAltitudeMode()

APAltitudeMode Script2Game::AutopilotClass::getAltitudeMode ( )

Gets the current altitude mode.

Returns
The current altitude mode.

◆ getAltitudeValue()

int Script2Game::AutopilotClass::getAltitudeValue ( )

Gets the current altitude value.

Returns
The current altitude value (in feet).

◆ getForceDisabled()

bool Script2Game::AutopilotClass::getForceDisabled ( )

Returns whether the autopilot has been disabled forcefully.

◆ getGPWSMode()

bool Script2Game::AutopilotClass::getGPWSMode ( )

Returns whether the GPWS is engaged.

Returns
true if the GPWS is engaged, false otherwise.

◆ getHeadingMode()

APHeadingMode Script2Game::AutopilotClass::getHeadingMode ( )

Gets the current heading mode.

Returns
The current heading mode.

◆ getHeadingValue()

int Script2Game::AutopilotClass::getHeadingValue ( )

Gets the current heading value.

Returns
The current heading value (in degrees).

◆ getHorizontalApproachDeviation()

float Script2Game::AutopilotClass::getHorizontalApproachDeviation ( )

Returns the deviation (in degrees) from the ILS localizer, if available.

Returns
The deviation from the ILS localizer.
Note
Use isILSAvailable() to check if this value is available.

◆ getIASMode()

bool Script2Game::AutopilotClass::getIASMode ( )

Returns whether the auto-throttle is engaged.

Returns
true if the auto-throttle is engaged, false otherwise.

◆ getIASValue()

int Script2Game::AutopilotClass::getIASValue ( )

Gets the current airspeed reference for the auto-throttle.

Returns
The current airspeed reference for the auto-throttle (in knots).

◆ getVerticalApproachDeviation()

float Script2Game::AutopilotClass::getVerticalApproachDeviation ( )

Returns the deviation (in degrees) from the ILS glideslope, if available.

Returns
The deviation from the ILS glideslope.
Note
Use isILSAvailable() to check if this value is available.

◆ getVerticalSpeedValue()

int Script2Game::AutopilotClass::getVerticalSpeedValue ( )

Gets the current vertical speed value.

Returns
The current vertical speed value (in feet per minute).

◆ isILSAvailable()

bool Script2Game::AutopilotClass::isILSAvailable ( )

Returns whether the ILS is available.

Returns
true if the ILS information is available, false otherwise.

◆ setForceDisabled()

void Script2Game::AutopilotClass::setForceDisabled ( bool  disabled)

Forces the autopilot to be enabled/disabled.

When true, this prevents the default A/P from controlling the aircraft and disables the default logic (such as the A/P disengaging when NAV is engaged and ILS is not available).

This is useful for replacing the default autopilot logic with your own. It allows you to use all the settings and operate the controls without conflicts from the default autopilot.

◆ toggleAltitude()

APAltitudeMode Script2Game::AutopilotClass::toggleAltitude ( APAltitudeMode  altitudeMode)

Sets or toggles the altitude modes.

Parameters
altitudeModeThe altitude mode. If the autopilot is in the same mode as altitudeMode, it toggles it. Otherwise, it sets the new mode.
Returns
The new altitude mode.

◆ toggleGPWS()

bool Script2Game::AutopilotClass::toggleGPWS ( )

Toggles the ground proximity warning system (GPWS).

◆ toggleHeading()

APHeadingMode Script2Game::AutopilotClass::toggleHeading ( APHeadingMode  headingMode)

Sets or toggles the heading modes.

Parameters
headingModeThe heading mode. If the autopilot is in the same mode as headingMode, it toggles it. Otherwise, it sets the new mode.
Returns
The new heading mode.

◆ toggleIAS()

bool Script2Game::AutopilotClass::toggleIAS ( )

Toggles the auto-throttle.

The auto-throttle keeps a constant speed set by adjustIAS(int addedIAS)


The documentation for this class was generated from the following file: