Waypoints

Waypoints are the location markers you can see on the map view showing you where contracts are targeted for. With this structure, you can obtain coordinate data for the locations of these waypoints.

WAYPOINT(name)
Parameters
  • name – (String) Name of the waypoint as it appears on the map or in the contract description

Returns

Waypoint

This creates a new Waypoint from a name of a waypoint you read from the contract paramters. Note that this only works on contracts you’ve accpted. Waypoints for proposed contracts haven’t accepted yet do not actually work in kOS.

SET spot TO WAYPOINT(“herman’s folly beta”).

The name match is case-insensitive.

ALLWAYPOINTS()
Returns

List of Waypoint

This creates a List of Waypoint structures for all accepted contracts. Waypoints for proposed contracts you haven’t accepted yet do not appear in the list.

structure Waypoint
Members

Suffix

Type

NAME

String

BODY

BodyTarget

GEOPOSITION

GeoCoordinates

POSITION

Vector

ALTITUDE

Scalar

AGL

Scalar

NEARSURFACE

Boolean

GROUNDED

Boolean

INDEX

Scalar

CLUSTERED

Boolean

ISSELECTED

Boolean

Waypoint:NAME
Type

String

Access

Get only

Name of waypoint as it appears on the map and contract

Waypoint:BODY
Type

BodyTarget

Access

Get only

Celestial body the waypoint is attached to

Waypoint:GEOPOSITION
Type

GeoCoordinates

Access

Get only

The LATLNG of this waypoint

Waypoint:POSITION
Type

Vector

Access

Get only

The Vector position of this waypoint in 3D space, in ship-raw coords.

Waypoint:ALTITUDE
Type

Scalar

Access

Get only

Altitude of waypoint above “sea” level. Warning, this a point somewhere in the midst of the contract altitude range, not the edge of the altitude range. It corresponds towhere the marker tip hovers on the map, which is not actually at the very edge of the contract condition’s range. It represents a typical midling location inside the contract’s altitude range.

Waypoint:AGL
Type

Scalar

Access

Get only

Altitude of waypoint above ground. Warning, this a point somewhere in the midst of the contract altitude range, not the edge of the altitude range. It corresponds to where the marker tip hovers on the map, which is not actually at the very edge of the contract condition’s range. It represents a typical midling location inside the contract’s altitude range.

Waypoint:NEARSURFACE
Type

Boolean

Access

Get only

True if waypoint is a point near or on the body rather than high in orbit.

Waypoint:GROUNDED
Type

Boolean

Access

Get only

True if waypoint is actually glued to the ground.

Waypoint:INDEX
Type

Scalar

Access

Get only

The integer index of this waypoint amongst its cluster of sibling waypoints. In other words, when you have a cluster of waypoints called “Somewhere Alpha”, “Somewhere Beta”, and “Somewhere Gamma”, then the alpha site has index 0, the beta site has index 1 and the gamma site has index 2. When Waypoint:CLUSTERED is false, this value is zero but meaningless.

Waypoint:CLUSTERED
Type

Boolean

Access

Get only

True if this waypoint is part of a set of clustered waypoints with greek letter names appended (Alpha, Beta, Gamma, etc). If true, there should be a one-to-one correspondence with the greek letter name and the :INDEX suffix. (0 = Alpha, 1 = Beta, 2 = Gamma, etc).

Waypoint:ISSELECTED
Type

Boolean

Access

Get only

True if navigation has been activated on this waypoint.