Class: GarminAPUtils
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:13
A utility class for working with Garmin autopilots.
Constructors
Constructor
new GarminAPUtils():
GarminAPUtils
Returns
GarminAPUtils
Methods
backCourseCanActivate()
staticbackCourseCanActivate(apValues,navData):boolean
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:127
Checks whether a localizer back-course director can be activated from an armed state.
Parameters
| Parameter | Type | Description |
|---|---|---|
apValues | APValues | Autopilot values from the director's parent autopilot. |
navData | Readonly<APBackCourseDirectorNavData> | The current radio navigation data received by the director. |
Returns
boolean
Whether the director can be activated from an armed state.
backCourseCanArm()
staticbackCourseCanArm(apValues,navData):boolean
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:115
Checks whether a localizer back-course director can be armed.
Parameters
| Parameter | Type | Description |
|---|---|---|
apValues | APValues | Autopilot values from the director's parent autopilot. |
navData | Readonly<APBackCourseDirectorNavData> | The current radio navigation data received by the director. |
Returns
boolean
Whether the director can be armed.
backCourseCanRemainActive()
staticbackCourseCanRemainActive(apValues,navData,activateNavData):boolean
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:152
Checks whether a localizer back-course director can remain in the active state.
Parameters
| Parameter | Type | Description |
|---|---|---|
apValues | APValues | Autopilot values from the director's parent autopilot. |
navData | Readonly<APBackCourseDirectorNavData> | The current radio navigation data received by the director. |
activateNavData | Readonly<APBackCourseDirectorActivateNavData> | The radio navigation data received by the director at the moment of activation. |
Returns
boolean
Whether the director can remain in the active state.
createEmptyFmaData()
staticcreateEmptyFmaData():FmaData
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:368
Creates an empty FmaData object.
Returns
A new empty FmaData object.
glidepathCanArm()
staticglidepathCanArm(apValues):boolean
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:258
Checks whether a glidepath director can be armed.
Parameters
| Parameter | Type | Description |
|---|---|---|
apValues | APValues | Autopilot values from the director's parent autopilot. |
Returns
boolean
Whether the director can be armed.
glideslopeCanActivate()
staticglideslopeCanActivate(apValues,navData):boolean
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:190
Checks whether a glideslope director can be activated from an armed state.
Parameters
| Parameter | Type | Description |
|---|---|---|
apValues | APValues | Autopilot values from the director's parent autopilot. |
navData | Readonly<APGSDirectorNavData> | The current radio navigation data received by the director. |
Returns
boolean
Whether the director can be activated from an armed state.
glideslopeCanArm()
staticglideslopeCanArm(apValues,navData):boolean
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:172
Checks whether a glideslope director can be armed.
Parameters
| Parameter | Type | Description |
|---|---|---|
apValues | APValues | Autopilot values from the director's parent autopilot. |
navData | Readonly<APGSDirectorNavData> | The current radio navigation data received by the director. |
Returns
boolean
Whether the director can be armed.
glideslopeCanRemainActive()
staticglideslopeCanRemainActive(apValues,navData,activateNavData):boolean
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:203
Checks whether a glideslope director can remain in the active state.
Parameters
| Parameter | Type | Description |
|---|---|---|
apValues | APValues | Autopilot values from the director's parent autopilot. |
navData | Readonly<APGSDirectorNavData> | The current radio navigation data received by the director. |
activateNavData | Readonly<APGSDirectorActivateNavData> | The radio navigation data received by the director at the moment of activation. |
Returns
boolean
Whether the director can remain in the active state.
glideslopeVsTarget()
staticglideslopeVsTarget(gsAngleError,gsAngle,currentAngleRate,distance,height,groundSpeed):number
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:226
Gets the desired vertical speed target to track a glideslope.
Parameters
| Parameter | Type | Description |
|---|---|---|
gsAngleError | number | The glideslope angle error, in degrees, defined as the difference between the angle from the glideslope antenna to the airplane and the glideslope angle. Positive values indicate deviation of the airplane above the glideslope. |
gsAngle | number | The glideslope angle, in degrees. |
currentAngleRate | number | The current rate of change of glideslope angle error, in degrees per second. |
distance | number | The lateral distance from the airplane to the glideslope antenna, in meters. |
height | number | The height of the airplane above the glideslope antenna, in meters. |
groundSpeed | number | The airplane's current ground speed, in meters per second. |
Returns
number
The desired vertical speed to target, in feet per minute.
gpssCanActivate()
staticgpssCanActivate(apValues,state):boolean
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:20
Checks whether a GPSS director can be activated from an armed state.
Parameters
| Parameter | Type | Description |
|---|---|---|
apValues | APValues | Autopilot values from the director's parent autopilot. |
state | Readonly<APGpsSteerDirectorState> | State provided by the director for use in determing whether the director can be activated. |
Returns
boolean
Whether the director can be activated from an armed state.
lnavIntercept()
staticlnavIntercept(dtk,xtk,tas):number
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:293
Calculates intercept angles for LNAV.
Parameters
| Parameter | Type | Description |
|---|---|---|
dtk | number | The desired track, in degrees true. |
xtk | number | The cross-track error, in nautical miles. Negative values indicate that the plane is to the left of the desired track. |
tas | number | The true airspeed of the plane, in knots. |
Returns
number
The intercept angle, in degrees, to capture the desired track from the navigation signal.
localizerIntercept()
staticlocalizerIntercept(xtk,tas):number
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:304
Calculates intercept angles for localizers.
Parameters
| Parameter | Type | Description |
|---|---|---|
xtk | number | The cross-track error of the plane from the desired track, in nautical miles. Positive values indicate indicate that the plane is to the right of the track. |
tas | number | The true airspeed of the plane, in knots. |
Returns
number
The intercept angle, in degrees, to capture the localizer course.
navCanActivate()
staticnavCanActivate(mode,apValues,navData):boolean
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:49
Checks whether a nav director can be activated from an armed state.
Parameters
| Parameter | Type | Description |
|---|---|---|
mode | APLateralModes | The director's lateral mode. |
apValues | APValues | Autopilot values from the director's parent autopilot. |
navData | Readonly<APNavDirectorNavData> | The current radio navigation data received by the director. |
Returns
boolean
Whether the director can be activated from an armed state.
navCanArm()
staticnavCanArm(mode,apValues,navData):boolean
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:34
Checks whether a nav director can be armed.
Parameters
| Parameter | Type | Description |
|---|---|---|
mode | APLateralModes | The director's lateral mode. |
apValues | APValues | Autopilot values from the director's parent autopilot. |
navData | Readonly<APNavDirectorNavData> | The current radio navigation data received by the director. |
Returns
boolean
Whether the director can be armed.
navCanRemainActive()
staticnavCanRemainActive(mode,apValues,navData,isInZoneOfConfusion,activateNavData):boolean
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:82
Checks whether a nav director can remain in the active state.
Parameters
| Parameter | Type | Description |
|---|---|---|
mode | APLateralModes | The director's lateral mode. |
apValues | APValues | Autopilot values from the director's parent autopilot. |
navData | Readonly<APNavDirectorNavData> | The current radio navigation data received by the director. |
isInZoneOfConfusion | boolean | Whether the source of the radio navigation data is a VOR and the airplane's position is close enough to the VOR to render lateral deviation values unreliable. |
activateNavData | Readonly<APNavDirectorActivateNavData> | The radio navigation data received by the director at the moment of activation. |
Returns
boolean
Whether the director can remain in the active state.
navIntercept()
staticnavIntercept(distanceToSource,deflection,xtk,tas,isLoc):number
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:277
Calculates intercept angles for radio nav.
Parameters
| Parameter | Type | Description |
|---|---|---|
distanceToSource | number | The distance from the plane to the source of the navigation signal, in nautical miles. |
deflection | number | The lateral deflection of the desired track relative to the plane, normalized from -1 to 1. Positive values indicate that the desired track is to the right of the plane. |
xtk | number | The cross-track error of the plane from the desired track, in nautical miles. Positive values indicate indicate that the plane is to the right of the track. |
tas | number | The true airspeed of the plane, in knots. |
isLoc | boolean | Whether the source of the navigation signal is a localizer. Defaults to false. |
Returns
number
The intercept angle, in degrees, to capture the desired track from the navigation signal.