Skip to main content

Class: FlightPlanLegData

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:327

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, store, plan, globalLegIndex, perfPlanRepository, settings, speedPredictions?, isDirectToRandom?): FlightPlanLegData

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:606

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.
storeFlightPlanStoreundefinedThe flight plan store.
planFlightPlanundefinedThe flight plan that this leg exists in.
globalLegIndexnumberundefinedThe global leg index.
perfPlanRepositoryPerformancePlanRepository<Epic2PerformancePlan>undefinedThe performance plan repository.
settingsUserSettingManager<MfdAliasedUserSettingTypes>undefinedThe settings manager.
speedPredictions?Epic2SpeedPredictionsundefinedThe active flight plan speed predictions
isDirectToRandom?booleanfalseWhether this leg is for a direct to random.

Returns​

FlightPlanLegData

Properties​

altDesc​

readonly altDesc: Subject<AltitudeRestrictionType>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:415

The altitude restriction type to use for the altitude constraint.


altDescDisplay​

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

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:453

The alt desc, but for display in a list.


altitude1​

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

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:418

The altitude 1 to use for the altitude constraint.


altitude1Display​

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

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:439

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


altitude2​

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

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:421

The altitude 2 to use for the altitude constraint.


altitude2Display​

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

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:442

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


courseRounded​

readonly courseRounded: number

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:547

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


distance​

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

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:550

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: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:553

The cumulative distance up to the end of this leg.


estimatedTimeEnroute​

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

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:571

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: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:574

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


estimatedTimeOfArrival​

readonly estimatedTimeOfArrival: Subject<number>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:577

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


fpa​

readonly fpa: Subject<number>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:517

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: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:556

The estimated fuel remaining at the end of the leg.


globalLegIndex​

readonly globalLegIndex: Subject<number>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:337

The global index of this leg.


grossWeight​

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

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:568


initialDtk​

readonly initialDtk: BasicNavAngleSubject

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:541

The initial DTK of the leg. Magnetic.


isa​

readonly isa: NumberUnitSubject<Temperature, SimpleUnit<Temperature>>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:586

TODO: This leg's international standard atmosphere


isActiveLeg​

readonly isActiveLeg: Subject<boolean>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:386

Whether this is the active leg in the flight plan.


isAirport​

readonly isAirport: boolean

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:365

Whether this leg is an airport.


isAltitudeCyan​

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

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:445

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


isAltitudeDesignated​

readonly isAltitudeDesignated: Subject<boolean>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:424

Whether the altitude constraint is designated or not.


isAltitudeEditable​

readonly isAltitudeEditable: Subject<boolean>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:433

Whether this leg's altitude constraint is editable.


isAltitudeEdited​

readonly isAltitudeEdited: Subject<boolean>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:427

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


isAltitudeEditedDisplay​

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

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:462

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


isAltitudeInvalid​

readonly isAltitudeInvalid: Subject<boolean>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:430

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


isAltitudeInvalidDisplay​

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

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:471

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


isAltitudeTempCompensated​

readonly isAltitudeTempCompensated: Subscribable<boolean>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:489


isAltitudeVisible​

readonly isAltitudeVisible: Subject<boolean>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:436

Whether this leg's altitude constraint is visible.


isApproachRunwayLeg​

readonly isApproachRunwayLeg: boolean

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:377

Whether this leg is a runway in the approach segment.


isArcLeg​

readonly isArcLeg: boolean

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:406


isBehindActiveLeg​

readonly isBehindActiveLeg: Subject<boolean>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:392

Whether this leg is before the active leg.


isDestination​

readonly isDestination: boolean

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:371

Whether this leg is the destination


isDirectToRandom​

readonly isDirectToRandom: boolean = false

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:617

Whether this leg is for a direct to random.


isDtoLeg​

readonly isDtoLeg: MappedSubscribable<boolean>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:395

Whether this is a direct to leg.


isEditableDisplay​

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

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:480

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


isFirstLegInPlan​

readonly isFirstLegInPlan: Subject<boolean>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:383

Whether this is currently the first leg in the plan.


isFirstLegInSegment​

readonly isFirstLegInSegment: MappedSubscribable<boolean>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:343

Whether this leg is the first leg in its segment.


isFlyover​

readonly isFlyover: boolean

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:410


isFpaEdited​

readonly isFpaEdited: Subject<boolean>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:520

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


isFpaSpeedEditable​

readonly isFpaSpeedEditable: Subject<boolean>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:523

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


isFromLeg​

readonly isFromLeg: Subject<boolean>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:389

Whether this is the FROM leg in the flight plan.


isHeadingLeg​

readonly isHeadingLeg: boolean

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:404


isHoldLeg​

readonly isHoldLeg: Subject<boolean>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:402


isInAirwaySegment​

readonly isInAirwaySegment: Subscribable<boolean>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:380

Whether this leg is in an airway segment.


isInApproachSegment​

readonly isInApproachSegment: boolean

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:356

Whether this leg is in the approach segment.


isInArrivalSegment​

readonly isInArrivalSegment: boolean

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:353

Whether this leg is in the arrival segment.


isInDepartureSegment​

readonly isInDepartureSegment: boolean

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:350

Whether this leg is in the departure segment.


isInMissedApproach​

readonly isInMissedApproach: boolean

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:359

Whether this leg is in the missed approach.


isLargeTurn​

readonly isLargeTurn: Subject<boolean>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:544

Whether there is a 90 degree or more turn between this leg and the leg immediately prior


isLastLegInSegment​

readonly isLastLegInSegment: Subscribable<boolean>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:347

Whether this leg is the first leg in its segment.


isMissedApproachPoint​

readonly isMissedApproachPoint: boolean

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:374

Whether this leg is the MAP leg.


isOrigin​

readonly isOrigin: boolean

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:368

Whether this leg is the origin


isPriorToDtoLeg​

readonly isPriorToDtoLeg: Subject<boolean>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:398

Whether this leg is before the active DTO leg


isProcedureTurn​

readonly isProcedureTurn: boolean

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:408


isRunway​

readonly isRunway: boolean

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:362

Whether this leg is a runway.


isSpeedEdited​

readonly isSpeedEdited: Subject<boolean>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:506

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


isSpeedInvalid​

readonly isSpeedInvalid: Subject<boolean>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:509

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


isVisibleLegType​

readonly isVisibleLegType: boolean

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:332

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


latLon​

readonly latLon: GeoPointSubject

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:588


leg​

readonly leg: LegDefinition

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:607

The leg definition.


perfPlanRepository​

readonly perfPlanRepository: PerformancePlanRepository<Epic2PerformancePlan>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:614

The performance plan repository.


plan​

readonly plan: FlightPlan

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:612

The flight plan that this leg exists in.


planIndex​

readonly planIndex: number

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:610

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


segment​

readonly segment: FlightPlanSegment

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:608

The containing segment.


segmentData​

readonly segmentData: undefined | FlightPlanSegmentData

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:609

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


segmentLegIndex​

readonly segmentLegIndex: Subject<number>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:340

The index of this leg in its segment.


settings​

readonly settings: UserSettingManager<MfdAliasedUserSettingTypes>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:615

The settings manager.


showClimbFpa​

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

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:531

Whether to show CLIMB for the fpa.


speed​

readonly speed: Subject<number>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:497

This leg's speed constraint speed.


speedDesc​

readonly speedDesc: Subject<SpeedRestrictionType>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:503

This leg's speed constraint type.


speedUnit​

readonly speedUnit: Subject<SpeedUnit>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:500

This leg's speed constraint units.


temperature​

readonly temperature: NumberUnitSubject<Temperature, SimpleUnit<Temperature>>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:583

TODO: This leg's temperature


type​

readonly type: "leg" = 'leg'

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:329

The type of flight plan list item.

Implementation of​

FlightPlanBaseData.type


vnavPhase​

readonly vnavPhase: Subject<VerticalFlightPhase>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:528

The vertical flight phase.


wind​

readonly wind: NumberUnitSubject<Speed, CompoundUnit<Speed>>

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:580

TODO: This leg's wind speed.

Methods​

destroy()​

destroy(): void

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:782

Call when this leg is removed from the plan.

Returns​

void


handleLegChanged()​

handleLegChanged(leg): void

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:708

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: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:736

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

Returns​

void


updateLegPosition()​

updateLegPosition(globalLegIndex): void

Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:641

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