# API Reference - LOCATION

Locations are a foundational concept within the mission platform.

# LOCATIONREF

A LOCATIONREF is one of the following:

  1. A string referencing an item in the locations table, or an object in the objects table.
  2. An array such as [34.29, -122.4] or [34.29, -122.4, 90]. The latter 90 being a heading if provided.
  3. A special location string like $USER.
  4. A bearing/dist command
  5. a closest command

Examples:

"my_location"
"object_name"
"$USER"
[34.29, -122.4]
[34.29, -122.4, 90]
{"bearing": 100, "dist": 100}
{"bearing2": 100, "dist": 100}
{"location_alter": ...}
{"closest": ...}

# bearing

bearing will calculate a bearing based on an input.

  • dist: meters
  • heading: optional, defaults to zero

Examples:

{
  "bearing": 100,
  "object": "$USER",
  "hearing": 0,
  "dist": 100
}

# bearing2

bearing2 will calculate a bearing without considering the user aircraft heading.

  • dist: meters
  • heading: optional, defaults to zero

Examples:

{
  "bearing2": 100,
  "object": "$USER",
  "hearing": 0,
  "dist": 100
}

# location_alter

location_alter will create a location reference with a modified heading.

Examples:

{"location_alter":"$USER", "hdg": 0}

# closest

closest will pick the closest location to to. to will default to $USER if not provided.

Examples:

{"closest": [LOCATIONREF, LOCATIONREF, ...]}
{"closest": [LOCATIONREF, LOCATIONREF, ...], "to": LOCATIONREF}

# Special Locations

  • $USER: resolves to [lat,lon] of the user aircraft
  • $USER:HOIST: resolves to [lat,lon] of the user aircraft hoist position.
  • $MISSION_START_LOCATION: resolves to the [lat,lon] which was the start point on the map.
  • $MISSION_SELECTED_POI_LOCATION: resolves to the [lat,lon] which is currently selected by the user, on the mission map.