Skip to main content

Class: FlightPlanLegData

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

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:588

Creates a new leg data object.

Parameters​

ParameterTypeDefault valueDescription
legLegDefinitionundefinedThe leg definition.
segmentFlightPlanSegmentundefinedThe containing segment.
segmentDataFlightPlanSegmentData | undefinedundefinedThe 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:397

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:438

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:400

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:424

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:403

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:427

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:529

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:532

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:535

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:553

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:556

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:559

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:502

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:538

The estimated fuel remaining at the end of the leg.


globalLegIndex​

readonly globalLegIndex: Subject<number>

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

The global index of this leg.


grossWeight​

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

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


initialDtk​

readonly initialDtk: BasicNavAngleSubject

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

The initial DTK of the leg. Magnetic.


isa​

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

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

TODO: This leg's international standard atmosphere


isActiveLeg​

readonly isActiveLeg: Subject<boolean>

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

Whether this is the active leg in the flight plan.


isAirport​

readonly isAirport: boolean

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

Whether this leg is an airport.


isAltitudeAdvisory​

readonly isAltitudeAdvisory: Subject<boolean>

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

Whether this leg's altitude constraint is advisory (predicted).


isAltitudeCyan​

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

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

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:406

Whether the altitude constraint is designated or not.


isAltitudeEditable​

readonly isAltitudeEditable: Subject<boolean>

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

Whether this leg's altitude constraint is editable.


isAltitudeEdited​

readonly isAltitudeEdited: Subject<boolean>

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

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:447

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:415

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:456

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:474


isAltitudeVisible​

readonly isAltitudeVisible: Subject<boolean>

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

Whether this leg's altitude constraint is visible.


isApproachRunwayLeg​

readonly isApproachRunwayLeg: boolean

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

Whether this leg is a runway in the approach segment.


isArcLeg​

readonly isArcLeg: boolean

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


isBehindActiveLeg​

readonly isBehindActiveLeg: Subject<boolean>

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

Whether this leg is before the active leg.


isDestination​

readonly isDestination: boolean

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

Whether this leg is the destination


isDirectToRandom​

readonly isDirectToRandom: boolean = false

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

Whether this leg is for a direct to random.


isDtoLeg​

readonly isDtoLeg: MappedSubscribable<boolean>

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

Whether this is a direct to leg.


isEditableDisplay​

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

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

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:365

Whether this is currently the first leg in the plan.


isFirstLegInSegment​

readonly isFirstLegInSegment: MappedSubscribable<boolean>

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

Whether this leg is the first leg in its segment.


isFlyover​

readonly isFlyover: boolean

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


isFpaEdited​

readonly isFpaEdited: Subject<boolean>

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

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:508

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


isFromLeg​

readonly isFromLeg: Subject<boolean>

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

Whether this is the FROM leg in the flight plan.


isHeadingLeg​

readonly isHeadingLeg: boolean

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


isHoldLeg​

readonly isHoldLeg: Subject<boolean>

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


isInAirwaySegment​

readonly isInAirwaySegment: Subscribable<boolean>

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

Whether this leg is in an airway segment.


isInApproachSegment​

readonly isInApproachSegment: boolean

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

Whether this leg is in the approach segment.


isInArrivalSegment​

readonly isInArrivalSegment: boolean

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

Whether this leg is in the arrival segment.


isInDepartureSegment​

readonly isInDepartureSegment: boolean

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

Whether this leg is in the departure segment.


isInMissedApproach​

readonly isInMissedApproach: boolean

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

Whether this leg is in the missed approach.


isLastLegInSegment​

readonly isLastLegInSegment: Subscribable<boolean>

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

Whether this leg is the first leg in its segment.


isMissedApproachPoint​

readonly isMissedApproachPoint: boolean

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

Whether this leg is the MAP leg.


isOrigin​

readonly isOrigin: boolean

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

Whether this leg is the origin


isPriorToDtoLeg​

readonly isPriorToDtoLeg: Subject<boolean>

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

Whether this leg is before the active DTO leg


isProcedureTurn​

readonly isProcedureTurn: boolean

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


isRunway​

readonly isRunway: boolean

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

Whether this leg is a runway.


isSpeedEdited​

readonly isSpeedEdited: Subject<boolean>

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

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:494

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


isVisibleLegType​

readonly isVisibleLegType: boolean

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

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:570


leg​

readonly leg: LegDefinition

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

The leg definition.


perfPlanRepository​

readonly perfPlanRepository: PerformancePlanRepository<Epic2PerformancePlan>

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

The performance plan repository.


plan​

readonly plan: FlightPlan

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

The flight plan that this leg exists in.


planIndex​

readonly planIndex: number

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

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


segment​

readonly segment: FlightPlanSegment

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

The containing segment.


segmentData​

readonly segmentData: FlightPlanSegmentData | undefined

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

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


segmentLegIndex​

readonly segmentLegIndex: Subject<number>

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

The index of this leg in its segment.


settings​

readonly settings: UserSettingManager<MfdAliasedUserSettingTypes>

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

The settings manager.


showClimbFpa​

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

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

Whether to show CLIMB for the fpa.


speed​

readonly speed: Subject<number>

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

This leg's speed constraint speed.


speedDesc​

readonly speedDesc: Subject<SpeedRestrictionType>

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

This leg's speed constraint type.


speedUnit​

readonly speedUnit: Subject<SpeedUnit>

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

This leg's speed constraint units.


temperature​

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

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

TODO: This leg's temperature


type​

readonly type: "leg" = 'leg'

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

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:513

The vertical flight phase.


wind​

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

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

TODO: This leg's wind speed.

Methods​

destroy()​

destroy(): void

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

Call when this leg is removed from the plan.

Returns​

void


handleLegChanged()​

handleLegChanged(leg): void

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

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:718

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:623

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