Class: GarminAPUtils
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:10
A utility class for working with Garmin autopilots.
Constructors
Constructor
new GarminAPUtils():
GarminAPUtils
Returns
GarminAPUtils
Methods
backCourseCanActivate()
static
backCourseCanActivate(apValues
,navData
):boolean
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:124
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()
static
backCourseCanArm(apValues
,navData
):boolean
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:112
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()
static
backCourseCanRemainActive(apValues
,navData
,activateNavData
):boolean
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:149
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.
glidepathCanArm()
static
glidepathCanArm(apValues
):boolean
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:255
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()
static
glideslopeCanActivate(apValues
,navData
):boolean
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:187
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()
static
glideslopeCanArm(apValues
,navData
):boolean
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:169
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()
static
glideslopeCanRemainActive(apValues
,navData
,activateNavData
):boolean
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:200
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()
static
glideslopeVsTarget(gsAngleError
,gsAngle
,currentAngleRate
,distance
,height
,groundSpeed
):number
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:223
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()
static
gpssCanActivate(apValues
,state
):boolean
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:17
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()
static
lnavIntercept(dtk
,xtk
,tas
):number
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:290
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()
static
localizerIntercept(xtk
,tas
):number
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:301
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()
static
navCanActivate(mode
,apValues
,navData
):boolean
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:46
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()
static
navCanArm(mode
,apValues
,navData
):boolean
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:31
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()
static
navCanRemainActive(mode
,apValues
,navData
,isInZoneOfConfusion
,activateNavData
):boolean
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:79
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()
static
navIntercept(distanceToSource
,deflection
,xtk
,tas
,isLoc
):number
Defined in: src/garminsdk/autopilot/GarminAPUtils.ts:274
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.