Skip to main content

Class: JoinGreatCircleToPointVectorBuilder

Defined in: src/sdk/flightplan/flightpath/vectorbuilders/JoinGreatCircleToPointVectorBuilder.ts:19

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

Constructors

Constructor

new JoinGreatCircleToPointVectorBuilder(): JoinGreatCircleToPointVectorBuilder

Returns

JoinGreatCircleToPointVectorBuilder

Methods

build()

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

Defined in: src/sdk/flightplan/flightpath/vectorbuilders/JoinGreatCircleToPointVectorBuilder.ts:76

Builds a sequence of vectors representing a path from a defined start point and initial course that turns and joins a great-circle path that 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, then a direct path 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

ParameterTypeDefault valueDescription
vectorsFlightPathVector[]undefinedThe flight path vector array to which to add the vectors.
indexnumberundefinedThe index in the array at which to add the vectors.
startReadonly<Omit<Float64Array<ArrayBufferLike>, "set" | "sort" | "copyWithin">> | LatLonInterfaceundefinedThe start point.
startPathReadonlyGeoCircleundefinedA GeoCircle that defines the initial course. Must be a great circle and must include the start point.
endReadonly<Omit<Float64Array<ArrayBufferLike>, "set" | "sort" | "copyWithin">> | LatLonInterfaceundefinedThe end point.
endPathReadonlyGeoCircleundefinedA GeoCircle that defines the final course. Must be a great circle and must include the end point.
desiredTurnDirection?VectorTurnDirectionundefinedThe desired initial turn direction. If not defined, then the most efficient turn direction that satisfies the constraints will be chosen.
minTurnRadius?numberundefinedThe minimum turn radius, in meters. Defaults to 0.
preferSingleTurn?booleanfalseWhether to prefer flight path solutions that consist of a single constant-radius turn from the initial to final course. Defaults to false.
allowDirectFallback?booleantrueWhether the computed path should fall back to a direct path to the end point if the final path cannot be joined before the end point. Defaults to true.
intersection?Readonly<Omit<Float64Array<ArrayBufferLike>, "set" | "sort" | "copyWithin">>undefinedThe point of intersection between the start and end paths that lies closest to the start point. If not defined, then it will be calculated by this method.
flags?number0The flags to set on all built vectors. Defaults to none (0).
includeTurnToCourseFlag?booleantrueWhether to include the TurnToCourse flag on the vectors that comprise turns. Defaults to true.
includeDirectFlag?booleantrueWhether to include the Direct flag on all built vectors when falling back to a direct path. Defaults to true.
includeInterceptFlag?booleantrueWhether to include the InterceptCourse flag on all built vectors when building an intercept path. Defaults to true.
heading?null | numbernullThe heading-to-fly to assign to all built vectors, in degrees, or null if no heading is to be assigned. Defaults to null.
isHeadingTrue?booleanfalseWhether the heading-to-fly assigned to built vectors is relative to true north instead of magnetic north. Defaults to false.

Returns

number

The number of vectors that were built and added to the array.

Throws

Error if startPath or endPath is not a great circle.