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
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, andallowDirectFallback
istrue
, a direct course to the end point will be computed. IfallowDirectFallback
isfalse
and all attempts to compute a path have failed, then no vectors will be built.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
vectors | CircleVector [] | undefined | The flight path vector sequence to which to add the vectors. |
index | number | undefined | The index in the sequence at which to add the vectors. |
start | Readonly <Omit <Float64Array , "set" | "sort" | "copyWithin" >> | LatLonInterface | undefined | The start point. |
startPath | GeoCircle | undefined | The great-circle path defining the initial course. |
end | Readonly <Omit <Float64Array , "set" | "sort" | "copyWithin" >> | LatLonInterface | undefined | The end point. |
endPath | GeoCircle | undefined | The great-circle path defining the final course. |
desiredTurnDirection? | VectorTurnDirection | undefined | The desired initial turn direction. If not defined, the most efficient turn direction that satisfies the constraints will be chosen. |
minTurnRadius? | number | undefined | The minimum turn radius, in meters. Defaults to 0. |
preferSingleTurn | boolean | false | Whether to prefer flight path solutions that consist of a single constant-radius turn from the initial to final course. Defaults to false . |
allowDirectFallback | boolean | true | Whether 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" >> | undefined | The point of intersection between the start and end paths closest to the start point. If not defined, it will be calculated. |
flags | number | 0 | The flags to set on the vectors. Defaults to none (0). |
includeTurnToCourseFlag | boolean | true | Whether to include the TurnToCourse flag on the turn vectors. True by default. |
includeDirectFlag | boolean | true | Whether to include the Direct flag on vectors when falling back to a direct course. Defaults to true . |
includeInterceptFlag | boolean | true | Whether 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