![]() |
VR-Forces Developer's Guide
|
VR-Forces uses coordinates for various purposes throughout the API, and they can be in various different coordinate systems. This section lays out the naming conventions used in the API for coordinates and how they relate to each other.
The main terms used are:
It is possible to find geodetic (latitude-longitude) coordinates from these coordinate systems and vice versa, but there is no geodetic coordinate system per se in VR-Forces.
These terms are used in various functions and parameter names. For example:
World coordinates use an earth-centered-earth-fixed (ECEF) cartesian system. This system, also called geocentric coordinates, has its origin at Earth's center with axes:
This is the coordinate system used by DIS and RPR FOM network standards. API functions may refer to this system as "world", "geocentric", or "DIS" coordinates.
Local coordinates match the terrain database's native coordinate system. This system varies depending on the loaded terrain:
VR-Forces primarily stores and processes coordinates in this system for efficiency, avoiding frequent coordinate conversions when accessing terrain data. Some API components refer to these as "database" coordinates.
Each entity has a coordinate system attached to it. Per the SISO DIS Standard, this coordinate system has
The origin of a ground vehicle or human is generally at the bottom-center of its bounding volume; for a aircraft, the origin is at the center of mass; and for a surface or subsurface ship, the origin is at the waterline.
When a passenger entity is attached to a parent entity, its velocity and acceleration are defined to be relative to the velocity and acceleration of the parent. Thus body velocity (acceleration) has the same magnitude as parent velocity (acceleration), but is expressed in the body coordinate system of the passenger entity. This is a useful representation for body velocity (acceleration) for entities in contact with their parent, as the dynamics of their interactions with their support surface usually uses body velocity (acceleration) relative to that surface.
Parent coordinates are relative to the origin of a different simulation object, and are expressed in the body coordinate system of that object. This system is useful for embarked entities or describing points on an object.
For example, if a parent entity is facing east, and an attached passenger entity is 1m to the west of the parent's origin, and moving south at speed speed, the passenger parent location would be (-1, 0, 0) and its velocity would be (0, speed, 0).
This system is essential for:
Note that if an entity is not attached to a parent, parent coordinate values are the same as world coordinate values.
Relative coordinates are almost the same as parent coordinates, but they are always expressed in the Local coordinate system, whether the entity is attached to a parent or not (vs. being in the parent coordinate system when attached, and world if not).
Topographic coordinates (also called "topo" or ENU for east-north-up) provide a localized flat-earth approximation at a specific location with axes:
Key characteristics:
If the computation of some simulation component needs to refer to compass directions or altitudes (i.e., up or down from some location), then topographic coordinates provide the correct reference at a given point. However, the farther away from the origin that computations are done, the less accurate the computations are. Eventually, the altitude of the "horizontal" x-y plane of the topographic coordinate system gets far from the altitude of the origin, so z no longer is an accurate representation of altitude.
Geodetic coordinates use latitude, longitude, and altitude. While VR-Forces can convert to and from this system, it: