Skip to main content

Location

In many cases specifying the position or orientation of components as numbers in 3D space is not user-friendly. For example, in a digital twin of a parking garage, it is more convenient to specify the location of a vehicle by a symbolic code like A23 instead of XYZ-coordinates in 3D space.

Solids

This example shows how we can locate a server in a rack in a data center. First, we create a solid that represents a single unit of space for a server, typically with a width of 19 inches.

A 19-inch rack with 19 units stacked vertically is defined, where each unit has a unique number between 1 and 19. This rack is repeated four times and each rack has a unique identifier between a - z. So the left lower unit has identifier a_1. When exporting this model to GLTF, each unit in the rack is represented by a node that calls the Unit part. By convention, the naming of the node will be at the form a_1_Unit, c_4_Unit, and so forth.

Topics

We create a topic to link the geometry of the rack to the GLTF file, and a subtopic for each unit in the rack that has a link to the name of the node in the GLTF file.

datacenter.rack.geometry = Rack19.gltf
datacenter.rack.a1.node = a_1_Unit
datacenter.rack.a2.node = a_2_Unit

Next, we define topics for servers that are placed in the rack. Each server has a link to the GLTF file. The subtopic location refers to another topic, such as datacenter.rack.a2, which is defined as the position of node a_1_Unit in the Rack19.gltf object.

datacenter.server.d_1.location = datacenter.rack.a2
datacenter.server.d_1.geometry = Server.gltf
datacenter.server.d_1.temperature = 65
datacenter.server.d_1.os = Ubuntu 22.4
datacenter.server.d_2.location = datacenter.rack.a3
datacenter.server.d_2.geometry = Server.gltf
datacenter.server.d_2.temperature = 65
datacenter.server.d_2.os = Ubuntu 22.4

Model

A digital twin of the data center is defined by including the datacenter.rack and datacenter.server topics. This will automatically include all subtopics such as for the rack units and servers. To place a specific server in the rack the user can click on the server and specify the location. In this example, a server if moved from rack position c9 to a17. You can also combine the location with a translation. In this case, the translation is done relative to the node defined by the location. For example, a translation with value 0.3, 0, 3 will move the server forward in the rack.

Explanation

When the GLTF of the rack is rendered the transformation matrices, which includes the position and orientation in world coordinates, of all nodes are stored in a table. When the servers are rendered the position has a reference to a topic in the rack. This topic has a subtopic .node that points to a node in the Rack19.gltf. The transformation matrix of this node is used to specify the position and orientation of the server. If there is an additional .translation subtopic, the translation is applied relative to the transformation matrix of the node in the rack.