Skip to main content

Class: AutopilotDriver

Defined in: src/sdk/autopilot/AutopilotDriver.ts:113

Processes pitch and bank commands for an autopilot.

Constructors

Constructor

new AutopilotDriver(bus, apValues, apMasterOn, options?): AutopilotDriver

Defined in: src/sdk/autopilot/AutopilotDriver.ts:139

Creates an instance of this Autopilot Driver.

Parameters

ParameterTypeDescription
busEventBusAn instance of the Event Bus.
apValuesAPValuesAutopilot values from this driver's parent autopilot.
apMasterOnSubscribable<boolean>Whether the AP is engaged.
options?Readonly<AutopilotDriverOptions>Options for this driver.

Returns

AutopilotDriver

Methods

driveBank()

driveBank(bank, rate): void

Defined in: src/sdk/autopilot/AutopilotDriver.ts:175

Drives the commanded bank angle toward a desired value.

Parameters

ParameterTypeDescription
banknumberThe desired bank angle, in degrees. Positive values indicate left bank.
ratenumberThe rate at which to drive the commanded bank angle, in degrees per second. Defaults to this driver's default bank servo rate.

Returns

void


drivePitch()

drivePitch(pitch, adjustForAoa, adjustForVerticalWind, rate, maxNoseDownPitch, maxNoseUpPitch): void

Defined in: src/sdk/autopilot/AutopilotDriver.ts:216

Drives the commanded pitch angle toward a desired value while optionally correcting for angle of attack and vertical wind.

Parameters

ParameterTypeDefault valueDescription
pitchnumberundefinedThe desired pitch angle, in degrees. Positive values indicate downward pitch.
adjustForAoabooleanfalseWhether to adjust the commanded pitch angle for angle of attack. If true, the provided pitch angle is treated as a desired flight path angle and a new commanded pitch angle will be calculated to produce the desired FPA given the airplane's current angle of attack. This correction can be used in conjunction with the vertical wind correction. Defaults to false.
adjustForVerticalWindbooleanfalseWhether to adjust the commanded pitch angle for vertical wind velocity. If true, the provided pitch angle is treated as a desired flight path angle and a new commanded pitch angle will be calculated to produce the desired FPA given the current vertical wind component. This correction can be used in conjunction with the angle of attack correction. Defaults to false.
ratenumber...The rate at which to drive the commanded pitch angle, in degrees per second. Defaults to this driver's default pitch servo rate.
maxNoseDownPitchnumber...The maximum nose-down pitch angle, in degrees. Defaults to the global autopilot nose-down pitch limit.
maxNoseUpPitchnumber...The maximum nose-up pitch angle, in degrees. Defaults to the global autopilot nose-up pitch limit.

Returns

void


getAdjustedPitch()

getAdjustedPitch(pitch, adjustForAoa, adjustForVerticalWind): number

Defined in: src/sdk/autopilot/AutopilotDriver.ts:263

Adjusts a pitch angle optionally for angle of attack and vertical wind.

Parameters

ParameterTypeDefault valueDescription
pitchnumberundefinedThe desired pitch angle, in degrees. Positive values indicate downward pitch.
adjustForAoabooleanfalseWhether to adjust the commanded pitch angle for angle of attack. If true, the provided pitch angle is treated as a desired flight path angle and a new commanded pitch angle will be calculated to produce the desired FPA given the airplane's current angle of attack. This correction can be used in conjunction with the vertical wind correction. Defaults to false.
adjustForVerticalWindbooleanfalseWhether to adjust the commanded pitch angle for vertical wind velocity. If true, the provided pitch angle is treated as a desired flight path angle and a new commanded pitch angle will be calculated to produce the desired FPA given the current vertical wind component. This correction can be used in conjunction with the angle of attack correction. Defaults to false.

Returns

number

The adjusted pitch angle, in degrees.


setBank()

setBank(bank, resetServo): void

Defined in: src/sdk/autopilot/AutopilotDriver.ts:189

Sets the commanded bank angle, in degrees.

Parameters

ParameterTypeDefault valueDescription
banknumberundefinedThe commanded bank angle to set, in degrees. Positive values indicate left bank.
resetServobooleantrueThis parameter is deprecated and has no effect.

Returns

void


setPitch()

setPitch(pitch, resetServo, maxNoseDownPitch, maxNoseUpPitch): void

Defined in: src/sdk/autopilot/AutopilotDriver.ts:242

Sets the commanded pitch angle, in degrees.

Parameters

ParameterTypeDefault valueDescription
pitchnumberundefinedThe commanded pitch angle to set, in degrees. Positive values indicate downward pitch.
resetServobooleantrueThis parameter is deprecated and has no effect.
maxNoseDownPitchnumber...The maximum nose-down pitch angle, in degrees. Defaults to the global autopilot nose-down pitch limit.
maxNoseUpPitchnumber...The maximum nose-up pitch angle, in degrees. Defaults to the global autopilot nose-up pitch limit.

Returns

void


update()

update(): void

Defined in: src/sdk/autopilot/AutopilotDriver.ts:154

Updates this driver.

Returns

void