Class: FlightPathCircleToCircleTurn
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:19
A representation of a "turn" (a geo-circle path) that connects two other geo circles (the FROM and TO circles). The turn is always tangent to the FROM and TO circles and is parallel to these circles at the respective tangent points; the turn starts at the tangent point with the FROM circle and ends at the tangent point with the TO circle. The turn can be adjusted by specifying either its turn radius or the distance (angular offset) of its start or end point from an anchor point as measured along the FROM or TO circle. Anchor points are those points that minimize the distance from both the FROM and TO circles and therefore the turn radius is minimized at the anchor point.
Constructors
Constructor
new FlightPathCircleToCircleTurn():
FlightPathCircleToCircleTurn
Returns
FlightPathCircleToCircleTurn
Properties
fromCircle
readonly
fromCircle:ReadonlyGeoCircle
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:25
The circle on which this turn begins (the FROM circle).
toCircle
readonly
toCircle:ReadonlyGeoCircle
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:29
The circle on which this turn ends (the TO circle).
Methods
areAnchorsUpdated()
areAnchorsUpdated():
boolean
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:88
Checks whether the potential anchor points for this turn have been updated since the last time the FROM or TO
circle was changed. The anchor points can be updated by calling updateAnchors()
.
Returns
boolean
Whether the potential anchor points for this turn have been updated since the last time the FROM or TO circle was changed.
getAnchors()
getAnchors(): readonly
Readonly
<Omit
<Float64Array
<ArrayBufferLike
>,"set"
|"sort"
|"copyWithin"
>>[]
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:117
Gets the potential anchor points for this turn. If this turn's FROM and TO circles intersect at a finite number
of points (if the array returned by this.getIntersections()
is not empty), then the potential anchor points are
the same as the intersection points. If this turn's FROM and TO circles do not intersect, then any potential
anchor points are floating anchor points that do not lie on either the FROM or TO circle. Floating anchor points
are always positioned such that they are equidistant from the FROM and TO circles and the distance from the point
to both circles is minimized.
Returns
readonly Readonly
<Omit
<Float64Array
<ArrayBufferLike
>, "set"
| "sort"
| "copyWithin"
>>[]
The potential anchor points for this turn.
Throws
Error if the potential anchor points have not been updated since the last time either the FROM or TO circle was changed.
getAngleDelta()
getAngleDelta():
undefined
|number
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:160
Gets the angular difference, in radians, between the course along this turn's FROM circle and the course along this turn's TO circle at the selected anchor point. If the anchor point is a floating anchor point, then the courses along the FROM and TO circles are measured at the projections of the anchor point onto the circles.
Returns
undefined
| number
The angular difference, in radians, between the course along this turn's FROM circle and the course along
this turn's TO circle at the selected anchor point (or its projections onto the circles), or undefined
if no
anchor point has been selected. Positive values indicate the shortest turn from the course along the FROM circle
to the course along the TO circle is to the right. Negative values indicate shortest turn is to the left.
Throws
Error if the potential anchor points have not been updated since the last time either the FROM or TO circle was changed.
getEndAngularOffset()
getEndAngularOffset():
number
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:216
Gets the angular offset from this turn's anchoring intersection point to the end of this turn, as measured along this turn's TO circle in radians.
Returns
number
The angular offset from this turn's anchoring intersection point to the end of this turn, as measured along this turn's TO circle in radians.
Throws
Error if this turn is not valid.
getEndAngularOffsetForMaxTurnRadius()
getEndAngularOffsetForMaxTurnRadius():
number
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:285
Gets the angular offset from this turn's anchor point to the end of this turn, as measured along this turn's TO circle in radians, assuming this turn takes the maximum possible turn radius.
Returns
number
The angular offset from this turn's anchor point to the end of this turn, as measured along this turn's TO circle in radians, assuming this turn takes the maximum possible turn radius.
Throws
Error if this turn is not valid.
getEndAngularOffsetForTurnRadius()
getEndAngularOffsetForTurnRadius(
radius
):number
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:332
Gets the angular offset from this turn's anchor point to the end of this turn, as measured along this turn's TO circle in radians, assuming this turn takes a given turn radius.
Parameters
Parameter | Type | Description |
---|---|---|
radius | number | The turn radius, in great-arc radians. The radius will be clamped to be greater than or equal to the minimum possible turn radius and less than or equal to the maximum possible turn radius. Values greater than pi / 2 are acceptable (as long as they are not greater than the maximum possible turn radius) and represent a reversal of the normal direction for this turn. |
Returns
number
The angular offset from this turn's anchor point to the end of this turn, as measured along this turn's TO circle in radians, assuming this turn takes the specified turn radius.
Throws
Error if this turn is not valid.
getIntersections()
getIntersections(): readonly
Readonly
<Omit
<Float64Array
<ArrayBufferLike
>,"set"
|"sort"
|"copyWithin"
>>[]
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:98
Gets the intersection points between this turn's FROM and TO circles.
Returns
readonly Readonly
<Omit
<Float64Array
<ArrayBufferLike
>, "set"
| "sort"
| "copyWithin"
>>[]
The intersection points between this turn's FROM and TO circles.
Throws
Error if the potential anchor points have not been updated since the last time either the FROM or TO circle was changed.
getMaxTurnRadius()
getMaxTurnRadius():
number
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:255
Gets the maximum possible turn radius for this turn, in great-arc radians. Values greater than pi / 2
represent
a reversal of the normal direction for this turn; in this case the physical turn radius can be obtained as
pi - [turn radius]
.
Returns
number
The maximum possible turn radius for this turn, in great-arc radians.
Throws
Error if this turn is not valid.
getMinTurnRadius()
getMinTurnRadius():
number
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:240
Gets the minimum possible turn radius for this turn, in great-arc radians. This is the equivalent to the required turn radius when the angular offsets between this turn's start and end points to the anchor point, as measured along the FROM and TO circles, are both zero.
Returns
number
The minimum possible turn radius for this turn, in great-arc radians.
Throws
Error if this turn is not valid.
getSelectedAnchor()
getSelectedAnchor():
undefined
|Readonly
<Omit
<Float64Array
<ArrayBufferLike
>,"set"
|"sort"
|"copyWithin"
>>
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:131
Gets the selected anchor point for this turn.
Returns
undefined
| Readonly
<Omit
<Float64Array
<ArrayBufferLike
>, "set"
| "sort"
| "copyWithin"
>>
The selected anchor point for this turn, or undefined
if no anchor point has been selected.
Throws
Error if the potential anchor points have not been updated since the last time either the FROM or TO circle was changed.
getSelectedAnchorSide()
getSelectedAnchorSide():
-1
|1
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:145
Gets the selected side of this turn's anchor point on which the turn starts.
Returns
-1
| 1
The selected side of this turn's anchor point on which the turn starts. A value of -1
indicates that
the turn starts prior to the anchor point, as measured along the FROM circle. A value of 1
indicates that the
turn starts after the anchor point, as measured along the FROM circle.
getStartAngularOffset()
getStartAngularOffset():
number
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:201
Gets the angular offset from the start of this turn to this turn's anchoring intersection point, as measured along this turn's FROM circle in radians.
Returns
number
The angular offset from the start of this turn to this turn's anchoring intersection point, as measured along this turn's FROM circle in radians.
Throws
Error if this turn is not valid.
getStartAngularOffsetForMaxTurnRadius()
getStartAngularOffsetForMaxTurnRadius():
number
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:270
Gets the angular offset from the start of this turn to this turn's anchor point, as measured along this turn's FROM circle in radians, assuming this turn takes the maximum possible turn radius.
Returns
number
The angular offset from the start of this turn to this turn's anchor point, as measured along this turn's FROM circle in radians, assuming this turn takes the maximum possible turn radius.
Throws
Error if this turn is not valid.
getStartAngularOffsetForTurnRadius()
getStartAngularOffsetForTurnRadius(
radius
):number
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:304
Gets the angular offset from the start of this turn to this turn's anchor point, as measured along this turn's FROM circle in radians, assuming this turn takes a given turn radius.
Parameters
Parameter | Type | Description |
---|---|---|
radius | number | The turn radius, in great-arc radians. The radius will be clamped to be greater than or equal to the minimum possible turn radius and less than or equal to the maximum possible turn radius. Values greater than pi / 2 are acceptable (as long as they are not greater than the maximum possible turn radius) and represent a reversal of the normal direction for this turn. |
Returns
number
The angular offset from the start of this turn to this turn's anchor point, as measured along this turn's FROM circle in radians, assuming this turn takes the specified turn radius.
Throws
Error if this turn is not valid.
getTurnCircle()
getTurnCircle(
out
):GeoCircle
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:456
Gets a geo circle that defines the path of this turn.
Parameters
Parameter | Type | Description |
---|---|---|
out | GeoCircle | The geo circle to which to write the result. |
Returns
A geo circle that defines the path of this turn.
Throws
Error if this turn is not valid.
getTurnDirection()
getTurnDirection():
VectorTurnDirection
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:229
Gets the direction of this turn.
Returns
The direction of this turn.
Throws
Error if this turn is not valid.
getTurnDirectionEndAngularOffset()
getTurnDirectionEndAngularOffset(
angle
):VectorTurnDirection
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:446
Gets the direction of this turn, assuming the angular offset from this turn's anchor point to the end of this turn, as measured along this turn's TO circle, takes a given value.
Parameters
Parameter | Type | Description |
---|---|---|
angle | number | The angular offset from this turn's anchor point to the end of this turn, as measured along this turn's TO circle, in radians. The angular offset will be clamped to be greater than or equal to zero and less than or equal to the angular offset of the maximum-radius turn. |
Returns
The direction of this turn, assuming the angular offset from this turn's anchor point to the end of this turn, as measured along this turn's TO circle, takes the specified value.
Throws
Error if this turn is not valid.
getTurnDirectionForTurnRadius()
getTurnDirectionForTurnRadius(
radius
):VectorTurnDirection
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:414
Gets the direction of this turn, assuming this turn takes a given turn radius.
Parameters
Parameter | Type | Description |
---|---|---|
radius | number | The turn radius, in great-arc radians. The radius will be clamped to be greater than or equal to zero and less than or equal to the maximum possible turn radius. Values greater than pi / 2 are acceptable (as long as they are not greater than the maximum possible turn radius) and represent a reversal of the normal direction for this turn. |
Returns
The direction of this turn, assuming this turn takes the specified turn radius.
Throws
Error if this turn is not valid.
getTurnDirectionStartAngularOffset()
getTurnDirectionStartAngularOffset(
angle
):VectorTurnDirection
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:432
Gets the direction of this turn, assuming the angular offset from the start of this turn to this turn's anchor point, as measured along this turn's FROM circle, takes a given value.
Parameters
Parameter | Type | Description |
---|---|---|
angle | number | The angular offset from the start of the turn to the anchor point, as measured along the FROM circle, in radians. The angular offset will be clamped to be greater than or equal to zero and less than or equal to the angular offset of the maximum-radius turn. |
Returns
The direction of this turn, assuming the angular offset from the start of this turn to this turn's anchor point, as measured along this turn's FROM circle, takes the specified value.
Throws
Error if this turn is not valid.
getTurnEnd()
getTurnEnd<
T
>(out
):T
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:493
Gets the end point of this turn.
Type Parameters
Type Parameter |
---|
T extends Float64Array <ArrayBufferLike > | GeoPoint |
Parameters
Parameter | Type | Description |
---|---|---|
out | T | The GeoPoint or 3D vector to which to write the result. |
Returns
T
The end point of this turn.
Throws
Error if this turn is not valid.
getTurnRadius()
getTurnRadius():
number
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:186
Gets this turn's turn radius, in great-arc radians. Values greater than pi / 2
represent a reversal of the
normal direction for this turn; in this case the physical turn radius can be obtained as pi - [turn radius]
.
Returns
number
This turn's turn radius, in great-arc radians.
Throws
Error if this turn is not valid.
getTurnRadiusForEndAngularOffset()
getTurnRadiusForEndAngularOffset(
angle
):number
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:387
Gets the radius of this turn, in great-arc radians, assuming the angular offset from this turn's anchor point to the end of this turn, as measured along this turn's TO circle, takes a given value.
Parameters
Parameter | Type | Description |
---|---|---|
angle | number | The angular offset from this turn's anchor point to the end of this turn, as measured along this turn's TO circle, in radians. The angular offset will be clamped to be greater than or equal to zero and less than or equal to the angular offset of the maximum-radius turn. |
Returns
number
The radius of this turn, in great-arc radians, assuming the angular offset from this turn's anchor point to the end of this turn, as measured along this turn's TO circle, takes the specified value.
Throws
Error if this turn is not valid.
getTurnRadiusForStartAngularOffset()
getTurnRadiusForStartAngularOffset(
angle
):number
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:359
Gets the radius of this turn, in great-arc radians, assuming the angular offset from the start of this turn to this turn's anchor point, as measured along this turn's FROM circle, takes a given value.
Parameters
Parameter | Type | Description |
---|---|---|
angle | number | The angular offset from the start of the turn to the anchor point, as measured along the FROM circle, in radians. The angular offset will be clamped to be greater than or equal to zero and less than or equal to the angular offset of the maximum-radius turn. |
Returns
number
The radius of this turn, in great-arc radians, assuming the angular offset from the start of this turn to this turn's anchor point, as measured along this turn's FROM circle, takes the specified value.
Throws
Error if this turn is not valid.
getTurnStart()
getTurnStart<
T
>(out
):T
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:475
Gets the start point of this turn.
Type Parameters
Type Parameter |
---|
T extends Float64Array <ArrayBufferLike > | GeoPoint |
Parameters
Parameter | Type | Description |
---|---|---|
out | T | The GeoPoint or 3D vector to which to write the result. |
Returns
T
The start point of this turn.
Throws
Error if this turn is not valid.
isTurnValid()
isTurnValid():
boolean
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:176
Checks whether this turn is valid. A turn is considered valid if all of the following conditions are satisfied:
- The FROM and TO circles are well-defined with non-zero radii.
- The FROM and TO circles are not coincident or concentric.
- The anchor points between the FROM and TO circles have been updated.
- An anchor point has been selected.
Returns
boolean
Whether this turn is valid.
selectAnchor()
selectAnchor(
index
):this
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:699
Selects the anchor point for this turn.
Changing the anchor point will also reset this turn's turn radius to zero.
Parameters
Parameter | Type | Description |
---|---|---|
index | number | The index of the anchor point to select in the array returned by getAnchors() . Specifying a negative index will unselect the currently selected point, if any. |
Returns
this
This turn, after the anchor point has been selected.
Throws
Error if the potential anchor points have not been updated since the last time either the FROM or TO circle was changed.
Throws
RangeError if index
is greater than or equal to the length of the array returned by
getAnchors()
.
selectAnchorSide()
selectAnchorSide(
side
):this
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:795
Selects the side of this turn's anchor point on which the turn starts.
Parameters
Parameter | Type | Description |
---|---|---|
side | -1 | 1 | The side to select. A value of -1 sets the turn to start prior to the anchor point, as measured along the FROM circle. A value of 1 sets the turn to start after the anchor point, as measured along the FROM circle. |
Returns
this
This turn, after the side has been selected.
selectClosestAnchor()
selectClosestAnchor(
point
):this
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:724
Selects the anchor point for this turn that is closest to a given point. If there are no potential anchor points, then no point will be selected. If there are two anchor points and they are equidistant from the specified point, then the anchor point at index zero will be arbitrarily selected.
Changing the anchor point will also reset this turn's turn radius to zero.
Parameters
Parameter | Type | Description |
---|---|---|
point | Readonly <Omit <Float64Array <ArrayBufferLike >, "set" | "sort" | "copyWithin" >> | Readonly <LatLonInterface > | The point to which the selected anchor point should be closest. |
Returns
this
This turn, after the anchor point has been selected.
Throws
Error if the potential anchor points have not been updated since the last time either the FROM or TO circle was changed.
setEndAngularOffset()
setEndAngularOffset(
angle
):this
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:896
Sets the angular offset from this turn's anchor point to the end of this turn, as measured along this turn's TO circle. This will also change this turn's turn radius and the angular offset of this turn's start point from the anchor point to be consistent with the new end point angular offset.
Parameters
Parameter | Type | Description |
---|---|---|
angle | number | The angular offset to set, in radians. The angular offset will be clamped to be greater than or equal to zero and less than or equal to the angular offset of the maximum-radius turn. |
Returns
this
This turn, after the angular offset has been set.
Throws
Error if this turn is not valid.
setFromCircle()
Call Signature
setFromCircle(
center
,radius
):this
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:511
Sets the center and radius of the circle on which this turn begins (the FROM circle).
Parameters
Parameter | Type | Description |
---|---|---|
center | Readonly <Omit <Float64Array <ArrayBufferLike >, "set" | "sort" | "copyWithin" >> | Readonly <LatLonInterface > | The center to set. |
radius | number | The radius to set, in great-arc radians. |
Returns
this
This turn, after the FROM circle has been set.
Call Signature
setFromCircle(
circle
):this
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:517
Sets the circle on which this turn begins (the FROM circle) to be equal to a given geo circle.
Parameters
Parameter | Type | Description |
---|---|---|
circle | ReadonlyGeoCircle | The circle to which to set the FROM circle. |
Returns
this
This turn, after the FROM circle has been set.
setStartAngularOffset()
setStartAngularOffset(
angle
):this
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:856
Sets the angular offset from the start of this turn to this turn's anchor point, as measured along this turn's FROM circle. This will also change this turn's turn radius and the angular offset of this turn's end point from the anchor point to be consistent with the new start point angular offset.
Parameters
Parameter | Type | Description |
---|---|---|
angle | number | The angular offset to set, in radians. The angular offset will be clamped to be greater than or equal to zero and less than or equal to the angular offset of the maximum-radius turn. |
Returns
this
This turn, after the angular offset has been set.
Throws
Error if this turn is not valid.
setToCircle()
Call Signature
setToCircle(
center
,radius
):this
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:537
Sets the center and radius of the circle on which this turn ends (the TO circle).
Parameters
Parameter | Type | Description |
---|---|---|
center | Readonly <Omit <Float64Array <ArrayBufferLike >, "set" | "sort" | "copyWithin" >> | Readonly <LatLonInterface > | The center to set. |
radius | number | The radius to set, in great-arc radians. |
Returns
this
This turn, after the TO circle has been set.
Call Signature
setToCircle(
circle
):this
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:543
Sets the circle on which this turn ends (the TO circle) to be equal to a given geo circle.
Parameters
Parameter | Type | Description |
---|---|---|
circle | ReadonlyGeoCircle | The circle to which to set the TO circle. |
Returns
this
This turn, after the TO circle has been set.
setTurnRadius()
setTurnRadius(
radius
):this
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:817
Sets this turn's turn radius. This will also change the angular offsets of this turn's start and end points from the anchor point to be consistent with the new radius.
Parameters
Parameter | Type | Description |
---|---|---|
radius | number | The turn radius to set, in great-arc radians. The radius will be clamped to be greater than or equal to the minimum possible turn radius and less than or equal to the maximum possible turn radius. Values greater than pi / 2 are acceptable (as long as they are not greater than the maximum possible turn radius) and represent a reversal of the normal direction for this turn. |
Returns
this
This turn, after the turn radius has been set.
Throws
Error if this turn is not valid.
updateAnchors()
updateAnchors(
tolerance
):this
Defined in: src/sdk/flightplan/flightpath/FlightPathCircleToCircleTurn.ts:572
Updates the potential anchor points for this turn. This will also deselect the selected anchor point, if any, and reset this turn's turn radius to zero.
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
tolerance | number | 0 | The error tolerance with which to calculate anchor points, in great-arc radians. Defaults to zero. |
Returns
this
This turn, after the potential anchor points have been updated.