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, andallowDirectFallback
istrue
, then a direct path 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
Parameter | Type | Default value | Description |
---|---|---|---|
vectors | FlightPathVector [] | undefined | The flight path vector array to which to add the vectors. |
index | number | undefined | The index in the array at which to add the vectors. |
start | Readonly <Omit <Float64Array <ArrayBufferLike >, "set" | "sort" | "copyWithin" >> | LatLonInterface | undefined | The start point. |
startPath | ReadonlyGeoCircle | undefined | A GeoCircle that defines the initial course. Must be a great circle and must include the start point. |
end | Readonly <Omit <Float64Array <ArrayBufferLike >, "set" | "sort" | "copyWithin" >> | LatLonInterface | undefined | The end point. |
endPath | ReadonlyGeoCircle | undefined | A GeoCircle that defines the final course. Must be a great circle and must include the end point. |
desiredTurnDirection? | VectorTurnDirection | undefined | The desired initial turn direction. If not defined, then 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 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" >> | undefined | The 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? | number | 0 | The flags to set on all built vectors. Defaults to none (0). |
includeTurnToCourseFlag? | boolean | true | Whether to include the TurnToCourse flag on the vectors that comprise turns. Defaults to true . |
includeDirectFlag? | boolean | true | Whether to include the Direct flag on all built vectors when falling back to a direct path. Defaults to true . |
includeInterceptFlag? | boolean | true | Whether to include the InterceptCourse flag on all built vectors when building an intercept path. Defaults to true . |
heading? | null | number | null | The heading-to-fly to assign to all built vectors, in degrees, or null if no heading is to be assigned. Defaults to null . |
isHeadingTrue? | boolean | false | Whether 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.