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
| Parameter | Type | Description |
|---|---|---|
bus | EventBus | An instance of the Event Bus. |
apValues | APValues | Autopilot values from this driver's parent autopilot. |
apMasterOn | Subscribable<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
| Parameter | Type | Description |
|---|---|---|
bank | number | The desired bank angle, in degrees. Positive values indicate left bank. |
rate | number | The 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
| Parameter | Type | Default value | Description |
|---|---|---|---|
pitch | number | undefined | The desired pitch angle, in degrees. Positive values indicate downward pitch. |
adjustForAoa | boolean | false | Whether 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. |
adjustForVerticalWind | boolean | false | Whether 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. |
rate | number | ... | The rate at which to drive the commanded pitch angle, in degrees per second. Defaults to this driver's default pitch servo rate. |
maxNoseDownPitch | number | ... | The maximum nose-down pitch angle, in degrees. Defaults to the global autopilot nose-down pitch limit. |
maxNoseUpPitch | number | ... | 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
| Parameter | Type | Default value | Description |
|---|---|---|---|
pitch | number | undefined | The desired pitch angle, in degrees. Positive values indicate downward pitch. |
adjustForAoa | boolean | false | Whether 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. |
adjustForVerticalWind | boolean | false | Whether 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
| Parameter | Type | Default value | Description |
|---|---|---|---|
bank | number | undefined | The commanded bank angle to set, in degrees. Positive values indicate left bank. |
resetServo | boolean | true | This 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
| Parameter | Type | Default value | Description |
|---|---|---|---|
pitch | number | undefined | The commanded pitch angle to set, in degrees. Positive values indicate downward pitch. |
resetServo | boolean | true | This parameter is deprecated and has no effect. |
maxNoseDownPitch | number | ... | The maximum nose-down pitch angle, in degrees. Defaults to the global autopilot nose-down pitch limit. |
maxNoseUpPitch | number | ... | 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