Skip to main content

Class: JoinGreatCircleToPointBuilder

Builds paths connecting initial great-circle paths to final great-circle paths terminating at defined end points.

Constructors

constructor

new JoinGreatCircleToPointBuilder(): JoinGreatCircleToPointBuilder

Returns

JoinGreatCircleToPointBuilder

Methods

build

build(vectors, index, start, startPath, end, endPath, desiredTurnDirection?, minTurnRadius?, preferSingleTurn?, allowDirectFallback?, intersection?, flags?, includeTurnToCourseFlag?, includeDirectFlag?, includeInterceptFlag?): number

Builds a sequence of vectors representing a path from a defined start point and initial course which turns and joins a great-circle path which terminates at a defined end point.

This method will first attempt to connect the starting point and final path with a single constant-radius turn of at least the minimum turn radius and in the desired direction that joins the final path before the end point. If this is not possible, then what happens next depends on the preferSingleTurn argument:

  • If it is true, then another path connecting the starting point and final path with a single constant-radius turn will be computed - this path will respect the minimum turn radius but not necessarily the desired turn direction.
  • If it is false, then a path to intercept the final path at a 45-degree angle will be computed. If such a path is not possible or if the intercept point lies after the end point, and allowDirectFallback is true, a direct course to the end point will be computed. If allowDirectFallback is false and all attempts to compute a path have failed, then no vectors will be built.

Parameters

NameTypeDefault valueDescription
vectorsCircleVector[]undefinedThe flight path vector sequence to which to add the vectors.
indexnumberundefinedThe index in the sequence at which to add the vectors.
startReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">> | LatLonInterfaceundefinedThe start point.
startPathGeoCircleundefinedThe great-circle path defining the initial course.
endReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">> | LatLonInterfaceundefinedThe end point.
endPathGeoCircleundefinedThe great-circle path defining the final course.
desiredTurnDirection?VectorTurnDirectionundefinedThe desired initial turn direction. If not defined, the most efficient turn direction that satisfies the constraints will be chosen.
minTurnRadius?numberundefinedThe minimum turn radius, in meters. Defaults to 0.
preferSingleTurnbooleanfalseWhether to prefer flight path solutions that consist of a single constant-radius turn from the initial to final course. Defaults to false.
allowDirectFallbackbooleantrueWhether the computed path should fall back to a direct course to the end point if the final path cannot be joined before the end point. Defaults to true.
intersection?Readonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>undefinedThe point of intersection between the start and end paths closest to the start point. If not defined, it will be calculated.
flagsnumber0The flags to set on the vectors. Defaults to none (0).
includeTurnToCourseFlagbooleantrueWhether to include the TurnToCourse flag on the turn vectors. True by default.
includeDirectFlagbooleantrueWhether to include the Direct flag on vectors when falling back to a direct course. Defaults to true.
includeInterceptFlagbooleantrueWhether to include the InterceptCourse flag on vectors when building an intercept path. Defaults to true.

Returns

number

The number of vectors added to the sequence.

Defined in

src/sdk/flightplan/FlightPathVectorBuilder.ts:1282