Skip to main content

Class: MapFlightPlanFocusCalculator

Calculates map projection parameters to fit flight plan foci.

Constructors

constructor

new MapFlightPlanFocusCalculator(mapProjection): MapFlightPlanFocusCalculator

Constructor.

Parameters

NameTypeDescription
mapProjectionMapProjectionThis calculator's map projection.

Returns

MapFlightPlanFocusCalculator

Defined in

src/garminsdk/components/map/flightplan/MapFlightPlanFocusCalculator.ts:24

Methods

calculateRangeTarget

calculateRangeTarget(focus, margins, ppos, out): MapFieldOfView

Calculates a maximum range and target center for a given flight plan focus such that the terminators of all legs in the focus are visible in this calculator's map projection. If there is only one leg terminator in the specified focus, the calculated range will be equal to 0. If a range and target could not be calculated, NaN will be written to the results.

Parameters

NameTypeDescription
focusFlightPlanFocusThe array of legs on which to focus.
marginsFloat64ArrayThe margins around the projected map boundaries to respect. Expressed as [left, top, right, bottom].
pposLatLonInterfaceThe current position of the airplane.
outMapFieldOfViewThe object to which to write the results.

Returns

MapFieldOfView

The calculated range and target for the specified focus.

Defined in

src/garminsdk/components/map/flightplan/MapFlightPlanFocusCalculator.ts:38