Skip to main content

Class: FlightPlanLegData

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:227

Represents a flight plan leg data object. It stores lots of useful info about the leg in handy dandy subscribables.

Implements​

Constructors​

Constructor​

new FlightPlanLegData(leg, segment, segmentData, planIndex, isAdvancedVnav, store, plan, globalLegIndex, isDirectToRandom): FlightPlanLegData

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:475

Creates a new leg data object.

Parameters​

ParameterTypeDefault valueDescription
legLegDefinitionundefinedThe leg definition.
segmentFlightPlanSegmentundefinedThe containing segment.
segmentDataundefined | FlightPlanSegmentDataundefinedThe containing segment data. Not needed for random direct to.
planIndexnumberundefinedThe index of the flight plan that this leg belongs to.
isAdvancedVnavbooleanundefinedWhether this is for advanced vnav.
storeFlightPlanStoreundefinedThe flight plan store.
planFlightPlanundefinedThe flight plan that this leg exists in.
globalLegIndexnumberundefinedThe global leg index.
isDirectToRandombooleanfalseWhether this leg is for a direct to random.

Returns​

FlightPlanLegData

Properties​

altDesc​

readonly altDesc: Subject<AltitudeRestrictionType>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:292

The altitude restriction type to use for the altitude constraint.


altDescDisplay​

readonly altDescDisplay: MappedSubject<[boolean, AltitudeRestrictionType, boolean], AltitudeRestrictionType>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:336

The alt desc, but for display in a list.


altitude1​

readonly altitude1: NumberUnitSubject<Distance, SimpleUnit<Distance>>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:295

The altitude 1 to use for the altitude constraint.


altitude1Display​

readonly altitude1Display: NumberUnitSubject<Distance, SimpleUnit<Distance>>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:322

The altitude 1 to use for the altitude constraint, but for display in a list.


altitude2​

readonly altitude2: NumberUnitSubject<Distance, SimpleUnit<Distance>>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:298

The altitude 2 to use for the altitude constraint.


altitude2Display​

readonly altitude2Display: NumberUnitSubject<Distance, SimpleUnit<Distance>>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:325

The altitude 2 to use for the altitude constraint, but for display in a list.


courseRounded​

readonly courseRounded: number

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:441

The leg course, rounded, and with 0 as 360.


displayAltitude1AsFlightLevel​

readonly displayAltitude1AsFlightLevel: Subject<boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:301

Whether the altitude 1 should be displayed as a flight level.


displayAltitude1AsFlightLevelDisplay​

readonly displayAltitude1AsFlightLevelDisplay: MappedSubject<[boolean, boolean], boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:365

Whether to display altitude 1 as a flight level, but for display in a list.


displayAltitude2AsFlightLevel​

readonly displayAltitude2AsFlightLevel: Subject<boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:304

Whether the altitude 2 should be displayed as a flight level.


displayAltitude2AsFlightLevelDisplay​

readonly displayAltitude2AsFlightLevelDisplay: MappedSubject<[boolean, boolean], boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:374

Whether to display altitude 2 as a flight level, but for display in a list.


distance​

readonly distance: NumberUnitSubject<Distance, SimpleUnit<Distance>>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:444

The leg's total distance, not cut short by ingress/egress turn radii. Changes when active leg.


distanceCumulative​

readonly distanceCumulative: NumberUnitSubject<Distance, SimpleUnit<Distance>>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:447

The cumulative distance up to the end of this leg.


estimatedTimeEnroute​

readonly estimatedTimeEnroute: NumberUnitSubject<Duration, SimpleUnit<Duration>>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:453

Estimated time Enroute of the leg, in seconds duration. How long it will take to fly the leg.


estimatedTimeEnrouteCumulative​

readonly estimatedTimeEnrouteCumulative: NumberUnitSubject<Duration, SimpleUnit<Duration>>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:456

Cumulative ETE. How long it would take from the current position to the end of this leg.


estimatedTimeOfArrival​

readonly estimatedTimeOfArrival: Subject<number>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:459

Estimated Time of Arrival of the leg, in UTC milliseconds from midnight.


fpa​

readonly fpa: Subject<number>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:414

This leg's flight path angle, in degrees, or NaN if there is no defined flight path angle. Positive values indicate a descending path.


fuelRemaining​

readonly fuelRemaining: NumberUnitSubject<Weight, SimpleUnit<Weight>>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:450

The estimated fuel remaining at the end of the leg.


globalLegIndex​

readonly globalLegIndex: Subject<number>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:241

The global index of this leg.


initialDtk​

readonly initialDtk: BasicNavAngleSubject

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:438

The initial DTK of the leg. Magnetic.


isActiveLeg​

readonly isActiveLeg: Subject<boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:275

Whether this is the active leg in the flight plan.


isAltitudeCyan​

readonly isAltitudeCyan: MappedSubject<[boolean, NumberUnitInterface<Distance, SimpleUnit<Distance>>, boolean, boolean], boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:328

Whether this leg's altitude should be display in cyan or not.


isAltitudeDesignated​

readonly isAltitudeDesignated: Subject<boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:307

Whether the altitude constraint is designated or not.


isAltitudeEditable​

readonly isAltitudeEditable: Subject<boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:316

Whether this leg's altitude constraint is editable.


isAltitudeEdited​

readonly isAltitudeEdited: Subject<boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:310

Whether this leg's altitude constraint is different from the published constraint.


isAltitudeEditedDisplay​

readonly isAltitudeEditedDisplay: MappedSubject<[boolean, boolean], boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:347

Whether the altitude is edited, but for display in a list.


isAltitudeInvalid​

readonly isAltitudeInvalid: Subject<boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:313

Whether this leg's altitude constraint is invalid or not.


isAltitudeInvalidDisplay​

readonly isAltitudeInvalidDisplay: MappedSubject<[boolean, boolean], boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:356

Whether the altitude is invalid, but for display in a list.


isAltitudeVisible​

readonly isAltitudeVisible: Subject<boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:319

Whether this leg's altitude constraint is visible.


isApproachRunwayLeg​

readonly isApproachRunwayLeg: boolean

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:266

Whether this leg is a runway in the approach segment.


isBehindActiveLeg​

readonly isBehindActiveLeg: Subject<boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:278

Whether this leg is before the active leg.


isDirectToRandom​

readonly isDirectToRandom: boolean = false

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:484

Whether this leg is for a direct to random.


isDtoLeg​

readonly isDtoLeg: MappedSubscribable<boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:281

Whether this is a direct to leg.


isEditableDisplay​

readonly isEditableDisplay: MappedSubject<[boolean, boolean], boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:383

Whether the altitude is editable, but for display in a list.


isFirstLegInPlan​

readonly isFirstLegInPlan: Subject<boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:272

Whether this is currently the first leg in the plan.


isFirstLegInSegment​

readonly isFirstLegInSegment: MappedSubscribable<boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:247

Whether this leg is the first leg in its segment.


isFpaEdited​

readonly isFpaEdited: Subject<boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:417

Whether this leg's fpa has been set by the user.


isFpaSpeedEditable​

readonly isFpaSpeedEditable: Subject<boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:420

Whether this leg's fpa and speed constraint are editable.


isHeadingLeg​

readonly isHeadingLeg: boolean

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:287


isHoldLeg​

readonly isHoldLeg: boolean

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:285


isInAirwaySegment​

readonly isInAirwaySegment: Subscribable<boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:269

Whether this leg is in an airway segment.


isInApproachSegment​

readonly isInApproachSegment: boolean

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:257

Whether this leg is in the approach segment.


isInDepartureSegment​

readonly isInDepartureSegment: boolean

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:254

Whether this leg is in the departure segment.


isInMissedApproach​

readonly isInMissedApproach: boolean

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:260

Whether this leg is in the missed approach.


isLastLegInSegment​

readonly isLastLegInSegment: Subscribable<boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:251

Whether this leg is the first leg in its segment.


isRunway​

readonly isRunway: boolean

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:263

Whether this leg is a runway.


isSpeedEdited​

readonly isSpeedEdited: Subject<boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:403

Whether this leg's speed constraint is different from the published speed.


isSpeedInvalid​

readonly isSpeedInvalid: Subject<boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:406

Whether this leg's speed constraint is invalid or not.


isVisibleLegType​

readonly isVisibleLegType: boolean

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:232

Whether this leg's flags and leg type allow for the leg to be visible.


leg​

readonly leg: LegDefinition

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:476

The leg definition.


plan​

readonly plan: FlightPlan

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:482

The flight plan that this leg exists in.


planIndex​

readonly planIndex: number

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:479

The index of the flight plan that this leg belongs to.


segment​

readonly segment: FlightPlanSegment

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:477

The containing segment.


segmentData​

readonly segmentData: undefined | FlightPlanSegmentData

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:478

The containing segment data. Not needed for random direct to.


segmentLegIndex​

readonly segmentLegIndex: Subject<number>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:244

The index of this leg in its segment.


showClimbFpa​

readonly showClimbFpa: MappedSubject<[VerticalFlightPhase, boolean, boolean], boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:428

Whether to show CLIMB for the fpa.


speed​

readonly speed: Subject<number>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:394

This leg's speed constraint speed.


speedDesc​

readonly speedDesc: Subject<SpeedRestrictionType>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:400

This leg's speed constraint type.


speedUnit​

readonly speedUnit: Subject<SpeedUnit>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:397

This leg's speed constraint units.


type​

readonly type: "leg" = 'leg'

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:229

The type of flight plan list item.

Implementation of​

FlightPlanBaseData.type


vnavPhase​

readonly vnavPhase: Subject<VerticalFlightPhase>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:425

The vertical flight phase.

Methods​

destroy()​

destroy(): void

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:637

Call when this leg is removed from the plan.

Returns​

void


handleLegChanged()​

handleLegChanged(leg): void

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:539

Handles the leg changed event. Effectively when the vertical data object on the leg was modified.

Parameters​

ParameterTypeDescription
legLegDefinitionThe leg definition.

Returns​

void


updateLegListDataAltitudeStuffFromVerticalData()​

updateLegListDataAltitudeStuffFromVerticalData(): void

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:566

Updates a leg list data item's altitude info from the leg's vertical data object.

Returns​

void


updateLegPosition()​

updateLegPosition(globalLegIndex): void

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanLegListData.ts:501

Update leg based on it's global leg index. We avoid storing indexes to avoid stale indexes.

Parameters​

ParameterTypeDescription
globalLegIndexnumberThe global leg index of the leg.

Returns​

void