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
| 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:397
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:438
The alt desc, but for display in a list.
altitude1
readonlyaltitude1:NumberUnitSubject<Distance,SimpleUnit<Distance>>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:400
The altitude 1 to use for the altitude constraint.
altitude1Display
readonlyaltitude1Display: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
readonlyaltitude2:NumberUnitSubject<Distance,SimpleUnit<Distance>>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:403
The altitude 2 to use for the altitude constraint.
altitude2Display
readonlyaltitude2Display: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
readonlycourseRounded:number
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:529
The leg course, rounded, and with 0 as 360.
distance
readonlydistance: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
readonlydistanceCumulative: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
readonlyestimatedTimeEnroute: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
readonlyestimatedTimeEnrouteCumulative: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
readonlyestimatedTimeOfArrival: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
readonlyfpa: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
readonlyfuelRemaining: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
readonlyglobalLegIndex:Subject<number>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:319
The global index of this leg.
grossWeight
readonlygrossWeight:NumberUnitSubject<Weight,SimpleUnit<Weight>>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:550
initialDtk
readonlyinitialDtk:BasicNavAngleSubject
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:526
The initial DTK of the leg. Magnetic.
isa
readonlyisa:NumberUnitSubject<Temperature,SimpleUnit<Temperature>>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:568
TODO: This leg's international standard atmosphere
isActiveLeg
readonlyisActiveLeg:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:368
Whether this is the active leg in the flight plan.
isAirport
readonlyisAirport:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:347
Whether this leg is an airport.
isAltitudeAdvisory
readonlyisAltitudeAdvisory:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:412
Whether this leg's altitude constraint is advisory (predicted).
isAltitudeCyan
readonlyisAltitudeCyan: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
readonlyisAltitudeDesignated:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:406
Whether the altitude constraint is designated or not.
isAltitudeEditable
readonlyisAltitudeEditable:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:418
Whether this leg's altitude constraint is editable.
isAltitudeEdited
readonlyisAltitudeEdited: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
readonlyisAltitudeEditedDisplay: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
readonlyisAltitudeInvalid:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:415
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:456
Whether the altitude is invalid, but for display in a list.
isAltitudeTempCompensated
readonlyisAltitudeTempCompensated:Subscribable<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:474
isAltitudeVisible
readonlyisAltitudeVisible:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:421
Whether this leg's altitude constraint is visible.
isApproachRunwayLeg
readonlyisApproachRunwayLeg:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:359
Whether this leg is a runway in the approach segment.
isArcLeg
readonlyisArcLeg:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:388
isBehindActiveLeg
readonlyisBehindActiveLeg:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:374
Whether this leg is before the active leg.
isDestination
readonlyisDestination:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:353
Whether this leg is the destination
isDirectToRandom
readonlyisDirectToRandom:boolean=false
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:599
Whether this leg is for a direct to random.
isDtoLeg
readonlyisDtoLeg:MappedSubscribable<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:377
Whether this is a direct to leg.
isEditableDisplay
readonlyisEditableDisplay: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
readonlyisFirstLegInPlan:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:365
Whether this is currently the first leg in the plan.
isFirstLegInSegment
readonlyisFirstLegInSegment:MappedSubscribable<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:325
Whether this leg is the first leg in its segment.
isFlyover
readonlyisFlyover:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:392
isFpaEdited
readonlyisFpaEdited:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:505
Whether this leg's fpa has been set by the user.
isFpaSpeedEditable
readonlyisFpaSpeedEditable:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:508
Whether this leg's fpa and speed constraint are editable.
isFromLeg
readonlyisFromLeg:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:371
Whether this is the FROM leg in the flight plan.
isHeadingLeg
readonlyisHeadingLeg:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:386
isHoldLeg
readonlyisHoldLeg:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:384
isInAirwaySegment
readonlyisInAirwaySegment:Subscribable<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:362
Whether this leg is in an airway segment.
isInApproachSegment
readonlyisInApproachSegment:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:338
Whether this leg is in the approach segment.
isInArrivalSegment
readonlyisInArrivalSegment:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:335
Whether this leg is in the arrival segment.
isInDepartureSegment
readonlyisInDepartureSegment:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:332
Whether this leg is in the departure segment.
isInMissedApproach
readonlyisInMissedApproach:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:341
Whether this leg is in the missed approach.
isLastLegInSegment
readonlyisLastLegInSegment:Subscribable<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:329
Whether this leg is the first leg in its segment.
isMissedApproachPoint
readonlyisMissedApproachPoint:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:356
Whether this leg is the MAP leg.
isOrigin
readonlyisOrigin:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:350
Whether this leg is the origin
isPriorToDtoLeg
readonlyisPriorToDtoLeg:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:380
Whether this leg is before the active DTO leg
isProcedureTurn
readonlyisProcedureTurn:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:390
isRunway
readonlyisRunway:boolean
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:344
Whether this leg is a runway.
isSpeedEdited
readonlyisSpeedEdited: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
readonlyisSpeedInvalid:Subject<boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:494
Whether this leg's speed constraint is invalid or not.
isVisibleLegType
readonlyisVisibleLegType: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
readonlylatLon:GeoPointSubject
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:570
leg
readonlyleg:LegDefinition
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:589
The leg definition.
perfPlanRepository
readonlyperfPlanRepository:PerformancePlanRepository<Epic2PerformancePlan>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:596
The performance plan repository.
plan
readonlyplan:FlightPlan
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:594
The flight plan that this leg exists in.
planIndex
readonlyplanIndex:number
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:592
The index of the flight plan that this leg belongs to.
segment
readonlysegment:FlightPlanSegment
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:590
The containing segment.
segmentData
readonlysegmentData:undefined|FlightPlanSegmentData
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:591
The containing segment data. Not needed for random direct to.
segmentLegIndex
readonlysegmentLegIndex:Subject<number>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:322
The index of this leg in its segment.
settings
readonlysettings:UserSettingManager<MfdAliasedUserSettingTypes>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:597
The settings manager.
showClimbFpa
readonlyshowClimbFpa:MappedSubject<[VerticalFlightPhase,boolean,boolean],boolean>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:516
Whether to show CLIMB for the fpa.
speed
readonlyspeed:Subject<number>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:482
This leg's speed constraint speed.
speedDesc
readonlyspeedDesc:Subject<SpeedRestrictionType>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:488
This leg's speed constraint type.
speedUnit
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:485
This leg's speed constraint units.
temperature
readonlytemperature:NumberUnitSubject<Temperature,SimpleUnit<Temperature>>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:565
TODO: This leg's temperature
type
readonlytype:"leg"='leg'
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:311
The type of flight plan list item.
Implementation of
vnavPhase
readonlyvnavPhase:Subject<VerticalFlightPhase>
Defined in: workingtitle-instruments-epic2/shared/FlightPlan/FlightPlanLegListData.ts:513
The vertical flight phase.
wind
readonlywind: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
| Parameter | Type | Description |
|---|---|---|
leg | LegDefinition | The 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
| Parameter | Type | Description |
|---|---|---|
globalLegIndex | number | The global leg index of the leg. |
Returns
void