Page tree
Skip to end of metadata
Go to start of metadata

Description

An array (with either two or three elements), containing positional information.

[x,y,z]

  • x: East-West coordinate, where 0 is the western side of the map
  • y: South-North coordinate, where 0 is the southern side of the map
  • z: Elevation. This value can be relative to different "base" definitions (e.g. above ground or above water).

Formats

Position

Position arrays containing either 2 or 3 elements.

Position2D

Position arrays containing 2 elements.

Position3D

Position arrays containing 3 elements.

PositionAGL

3D position where z (elevation) is measured from the nearest "ground" level.
The "ground" level is determined in the following order: 1. Snow level, 2. Object roadways, 3. Water, including waves and tides; 4. Terrain.
Read via: getPos, see also: convertToAGL, convertToASL, position, modelToWorld, worldToModel

PositionASL

3D position where z (elevation) is measured from the sea level. Elevated roadways and snow are not considered.
Read via: getPosASL, see also: getPosASL2, ASLToATL, ATLToASL, convertToAGL, convertToASL, getGroundInterceptASL, modelToWorldASL2, terrainIntersectASL

PositionASL2

3D position where z (elevation) is measured from the sea level, considering any elevated roadways. Snow is not considered.
Read via: getPosASL, see also: getPosASL2, ASLToATL, ATLToASL, convertToAGL, convertToASL,

PositionATL

3D position where z (elevation) is measured from the terrain level (ground or sea floor). Elevated roadways and snow are not considered.
Read via: getPosATL, see also: ASLToATL, ATLToASL

Other related commands: aimPos, eyePos, fn vbs relativeModelPos, getGroundIntercept, placeOnSurface, positionCameraToWorld, roadSurfaceHeight, terrainHeight (or Category VBS Command Group OEP General Positioning Get & Category VBS Command Group Variables Geometry)

Examples

The following examples show some typical z-values for different positions and commands, and how the returned values compare in the old engine (V 1.x) and the new ones (V 2.x+ & V 3.x+):
(The offset used for modelToWorld & modelToWorldASL2 is [0,0,0])

on groundCommandV 1.x+V 2.x+V 3.x+
getPos000
getPosASL17.1517.2417.24
getPosASL217.1517.2417.24
modelToWorld000
modelToWorldASL2-17.2417.24
getPosATL-00
eyePos-18.9618.96
on snowCommandV 1.x+V 2.x+V 3.x+
getPos--0
getPosASL--17.94
getPosASL2--17.94
modelToWorld--0.7
modelToWorldASL2--17.94
getPosATL--0.7
eyePos--19.65
on roofCommandV 1.x+V 2.x+V 3.x+
getPos000
getPosASL17.3120.6717.31
getPosASL220.7620.6720.76
modelToWorld3.453.363.45
modelToWorldASL2-20.6720.76
getPosATL-3.363.45
eyePos-22.2922.47
in vehicleCommandV 1.x+V 2.x+V 3.x+
getPos1.051.051.18
getPosASL18.3218.3218.45
getPosASL218.3218.3218.45
modelToWorld1.051.051.18
modelToWorldASL2-18.3218.45
getPosATL-1.051.18
eyePos-19.0219.16
in waterCommandV 1.x+V 2.x+V 3.x+
getPos00.060.06
getPosASL0.710.760.87
getPosASL20.710.760.87
modelToWorld00.060.06
modelToWorldASL2-0.760.87
getPosATL-2.562.67
eyePos-0.921.03
V3.x: All values are affected by waves.
All, except getPos & modelToWorld, are affected by tides.
on pierCommandV 1.x+V 2.x+V 3.x+
getPos000
getPosASL0.592.850.86
getPosASL22.852.852.85
modelToWorld2.262.151.99
modelToWorldASL2-2.852.85
getPosATL-3.923.92
eyePos-4.574.57
V3.x: getPosASL & modelToWorld are affected by waves and tides.
on ship (static)CommandV 1.x+V 2.x+V 3.x+
getPos000
getPosASL0.887.240.84
getPosASL27.267.247.24
modelToWorld6.386.596.40
modelToWorldASL2-7.247.24
getPosATL-11.8811.85
eyePos-8.918.96
V3.x: getPosASL & modelToWorld are affected by waves and tides.
on ship (dynamic)CommandV 1.x+V 2.x+V 3.x+
getPos--0
getPosASL--0.81
getPosASL2--7.09
modelToWorld--6.29
modelToWorldASL2--7.09
getPosATL--27.4
eyePos--8.82
V3.x: All commands (except getPos) are affected by waves and tides.