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
| Parameter | Type | Default value | Description |
|---|---|---|---|
leg | LegDefinition | undefined | The leg definition. |
segment | FlightPlanSegment | undefined | The containing segment. |
segmentData | undefined | FlightPlanSegmentData | undefined | The containing segment data. Not needed for random direct to. |
planIndex | number | undefined | The index of the flight plan that this leg belongs to. |
store | FlightPlanStore | undefined | The flight plan store. |
plan | FlightPlan | undefined | The flight plan that this leg exists in. |
globalLegIndex | number | undefined | The global leg index. |
perfPlanRepository | PerformancePlanRepository<Epic2PerformancePlan> | undefined | The performance plan repository. |
settings | UserSettingManager<MfdAliasedUserSettingTypes> | undefined | The settings manager. |
speedPredictions? | Epic2SpeedPredictions | undefined | The active flight plan speed predictions |
isDirectToRandom? | boolean | false | Whether this leg is for a direct to random. |
Returns
FlightPlanLegData
Properties
altDesc
readonlyaltDesc:Subject<AltitudeRestrictionType>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:415
The altitude restriction type to use for the altitude constraint.
altDescDisplay
readonlyaltDescDisplay:MappedSubject<[AltitudeRestrictionType,boolean],AltitudeRestrictionType>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:453
The alt desc, but for display in a list.
altitude1
readonlyaltitude1:NumberUnitSubject<Distance,SimpleUnit<Distance>>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:418
The altitude 1 to use for the altitude constraint.
altitude1Display
readonlyaltitude1Display: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
readonlyaltitude2:NumberUnitSubject<Distance,SimpleUnit<Distance>>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:421
The altitude 2 to use for the altitude constraint.
altitude2Display
readonlyaltitude2Display: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
readonlycourseRounded:number
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:547
The leg course, rounded, and with 0 as 360.
distance
readonlydistance: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
readonlydistanceCumulative: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
readonlyestimatedTimeEnroute: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
readonlyestimatedTimeEnrouteCumulative: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
readonlyestimatedTimeOfArrival: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
readonlyfpa: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
readonlyfuelRemaining: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
readonlyglobalLegIndex:Subject<number>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:337
The global index of this leg.
grossWeight
readonlygrossWeight:NumberUnitSubject<Weight,SimpleUnit<Weight>>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:568
initialDtk
readonlyinitialDtk:BasicNavAngleSubject
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:541
The initial DTK of the leg. Magnetic.
isa
readonlyisa:NumberUnitSubject<Temperature,SimpleUnit<Temperature>>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:586
TODO: This leg's international standard atmosphere
isActiveLeg
readonlyisActiveLeg:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:386
Whether this is the active leg in the flight plan.
isAirport
readonlyisAirport:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:365
Whether this leg is an airport.
isAltitudeCyan
readonlyisAltitudeCyan: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
readonlyisAltitudeDesignated:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:424
Whether the altitude constraint is designated or not.
isAltitudeEditable
readonlyisAltitudeEditable:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:433
Whether this leg's altitude constraint is editable.
isAltitudeEdited
readonlyisAltitudeEdited: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
readonlyisAltitudeEditedDisplay: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
readonlyisAltitudeInvalid:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:430
Whether this leg's altitude constraint is invalid or not.
isAltitudeInvalidDisplay
readonlyisAltitudeInvalidDisplay: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
readonlyisAltitudeTempCompensated:Subscribable<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:489
isAltitudeVisible
readonlyisAltitudeVisible:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:436
Whether this leg's altitude constraint is visible.
isApproachRunwayLeg
readonlyisApproachRunwayLeg:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:377
Whether this leg is a runway in the approach segment.
isArcLeg
readonlyisArcLeg:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:406
isBehindActiveLeg
readonlyisBehindActiveLeg:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:392
Whether this leg is before the active leg.
isDestination
readonlyisDestination:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:371
Whether this leg is the destination
isDirectToRandom
readonlyisDirectToRandom:boolean=false
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:617
Whether this leg is for a direct to random.
isDtoLeg
readonlyisDtoLeg:MappedSubscribable<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:395
Whether this is a direct to leg.
isEditableDisplay
readonlyisEditableDisplay: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
readonlyisFirstLegInPlan:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:383
Whether this is currently the first leg in the plan.
isFirstLegInSegment
readonlyisFirstLegInSegment:MappedSubscribable<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:343
Whether this leg is the first leg in its segment.
isFlyover
readonlyisFlyover:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:410
isFpaEdited
readonlyisFpaEdited:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:520
Whether this leg's fpa has been set by the user.
isFpaSpeedEditable
readonlyisFpaSpeedEditable:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:523
Whether this leg's fpa and speed constraint are editable.
isFromLeg
readonlyisFromLeg:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:389
Whether this is the FROM leg in the flight plan.
isHeadingLeg
readonlyisHeadingLeg:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:404
isHoldLeg
readonlyisHoldLeg:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:402
isInAirwaySegment
readonlyisInAirwaySegment:Subscribable<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:380
Whether this leg is in an airway segment.
isInApproachSegment
readonlyisInApproachSegment:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:356
Whether this leg is in the approach segment.
isInArrivalSegment
readonlyisInArrivalSegment:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:353
Whether this leg is in the arrival segment.
isInDepartureSegment
readonlyisInDepartureSegment:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:350
Whether this leg is in the departure segment.
isInMissedApproach
readonlyisInMissedApproach:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:359
Whether this leg is in the missed approach.
isLargeTurn
readonlyisLargeTurn: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
readonlyisLastLegInSegment:Subscribable<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:347
Whether this leg is the first leg in its segment.
isMissedApproachPoint
readonlyisMissedApproachPoint:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:374
Whether this leg is the MAP leg.
isOrigin
readonlyisOrigin:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:368
Whether this leg is the origin
isPriorToDtoLeg
readonlyisPriorToDtoLeg:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:398
Whether this leg is before the active DTO leg
isProcedureTurn
readonlyisProcedureTurn:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:408
isRunway
readonlyisRunway:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:362
Whether this leg is a runway.
isSpeedEdited
readonlyisSpeedEdited: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
readonlyisSpeedInvalid:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:509
Whether this leg's speed constraint is invalid or not.
isVisibleLegType
readonlyisVisibleLegType: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
readonlylatLon:GeoPointSubject
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:588
leg
readonlyleg:LegDefinition
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:607
The leg definition.
perfPlanRepository
readonlyperfPlanRepository:PerformancePlanRepository<Epic2PerformancePlan>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:614
The performance plan repository.
plan
readonlyplan:FlightPlan
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:612
The flight plan that this leg exists in.
planIndex
readonlyplanIndex:number
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:610
The index of the flight plan that this leg belongs to.
segment
readonlysegment:FlightPlanSegment
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:608
The containing segment.
segmentData
readonlysegmentData:undefined|FlightPlanSegmentData
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:609
The containing segment data. Not needed for random direct to.
segmentLegIndex
readonlysegmentLegIndex:Subject<number>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:340
The index of this leg in its segment.
settings
readonlysettings:UserSettingManager<MfdAliasedUserSettingTypes>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:615
The settings manager.
showClimbFpa
readonlyshowClimbFpa:MappedSubject<[VerticalFlightPhase,boolean,boolean],boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:531
Whether to show CLIMB for the fpa.
speed
readonlyspeed:Subject<number>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:497
This leg's speed constraint speed.
speedDesc
readonlyspeedDesc:Subject<SpeedRestrictionType>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:503
This leg's speed constraint type.
speedUnit
readonlyspeedUnit:Subject<SpeedUnit>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:500
This leg's speed constraint units.
temperature
readonlytemperature:NumberUnitSubject<Temperature,SimpleUnit<Temperature>>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:583
TODO: This leg's temperature
type
readonlytype:"leg"='leg'
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:329
The type of flight plan list item.
Implementation of
vnavPhase
readonlyvnavPhase:Subject<VerticalFlightPhase>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:528
The vertical flight phase.
wind
readonlywind: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
| Parameter | Type | Description |
|---|---|---|
leg | LegDefinition | The 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
| Parameter | Type | Description |
|---|---|---|
globalLegIndex | number | The global leg index of the leg. |
Returns
void