Patrol Mission

This class describes a patrol mission where units randomly patrol a defined area.

ATTRIBUTES

  • id: (str) unique identifier for the mission.

    • Example: "a8ab936c-184b-42bf-aa83-abca31bb2e73"

  • name: (str) name of the mission.

    • Example: "Andersen Patrol"

  • sideId: (str) the side that owns the mission.

    • Example: "BLUE"

  • assignedUnitIds: (list[str]) list of unit IDs assigned to the mission.

    • Example: ["7bc96d3b-ffe7-4469-b976-893e7fa5deca", "46e0ab0f-b49c-4961-b265-ce93dd163c21"]

  • assignedArea: (list[list[str]]) geographical coordinates that define the patrol or mission area.

    • Example: [[21.800061432629548, 149.8482617352473], [14.753441339796368, 150.96692676017133]]

  • active: (bool) whether the mission is active.

METHODS

  • checkIfCoordinatesIsWithinPatrolArea(coordinates: list[float]): (bool) returns true if the input coordinates is within the mission's patrol area.

  • generateRandomCoordinatesWithinPatrolArea(): (list[float]) generates a random waypoint within the patrol area.

  • toJSON(): (str) returns this object as a JSON.

Last updated