Skip to main content

Coordinates

The games uses two different coordinate systems for two different purposes:

  • The position of an airplane on the map is represented by a Point.
  • The flight plan of an airplane is a list of Nodes on a routing grid.

Both systems are described in more detail below.

Coordinate System

The coordinate system is used to describe the position of entities on the map. It uses the Point type, which has an x and y field. Every pixel in the game can be addressed with a Point.

The origin of the coordinate system is at the center of the map. The x-axis goes from left to right, and the y-axis goes from the bottom to the top.

coordinate system

Routing Grid

Airplanes are routed along the routing grid. The grid consists of Nodes that are distributed in an even pattern across the map. The following screenshots highlights the nodes that form the routing grid in red.

routing grid

The routing grid is part of the Map, and can be queried through the MapService.

Every Nodes has a field called restricted which indicates whether an airplane can pass through it. In the screenshot above, the nodes around the airport are restricted, and are thus not rendered on the map.

Airplanes fly from node to node. While in flight, their position is described by a Point. But their fligh plan, i.e. their route, is represented by a list of Nodes.

Since the routing grid overlays the map, the position of every Node can be converted to a Point in the coordinate system. See the documentation of the MapService for more information.