Skip to main content

Class: FlightPlanSegmentData

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanSegmentListData.ts:62

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

Implements

Constructors

Constructor

new FlightPlanSegmentData(segment, planIndex, store, plan): FlightPlanSegmentData

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanSegmentListData.ts:92

Creates a new leg list data object.

Parameters

ParameterTypeDescription
segmentFlightPlanSegmentThe containing segment.
planIndexnumberThe index of the flight plan that this leg belongs to.
storeFlightPlanStoreThe flight plan store.
planFlightPlanThe flight plan that this leg exists in.

Returns

FlightPlanSegmentData

Properties

airway

readonly airway: Subscribable<undefined | string>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanSegmentListData.ts:68

The airway name of the segment, or undefined if the segment is not an airway.


distance

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

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanSegmentListData.ts:78

The total distance of all legs in the segment.


estimatedTimeEnroute

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

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanSegmentListData.ts:81

The total estimated time enroute of all legs in the segment.


isAirway

readonly isAirway: Subscribable<boolean>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanSegmentListData.ts:71

Whether the segment is an airway.


plan

readonly plan: FlightPlan

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanSegmentListData.ts:97

The flight plan that this leg exists in.


planIndex

readonly planIndex: number

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanSegmentListData.ts:95

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/FlightPlanSegmentListData.ts:94

A reference to the segment in the flight plan.


segmentIndex

readonly segmentIndex: Subscribable<number>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanSegmentListData.ts:75

The index of the segment in the flight plan.


type

readonly type: "segment" = 'segment'

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanSegmentListData.ts:64

The type of flight plan list item.

Implementation of

FlightPlanBaseData.type

Methods

destroy()

destroy(): void

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanSegmentListData.ts:122

Call when this leg is rmoved from the plan.

Returns

void


onAirwayChanged()

onAirwayChanged(airway): void

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanSegmentListData.ts:117

Handles the airway changing.

Parameters

ParameterTypeDescription
airwayundefined | stringThe new airway.

Returns

void


updateSegmentIndex()

updateSegmentIndex(segmentIndex): void

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/FlightPlan/FlightPlanSegmentListData.ts:109

Sets the new segment index.

Parameters

ParameterTypeDescription
segmentIndexnumberThe new segment index.

Returns

void