IG主机
In the simulation industry, an image generator (IG) receives data from a host via an interface (such as CIGI). For demonstration of IG features and debugging purposes, we started developing IG Host — a cross-platform and cross-protocol solution. Currently, IG Host is a simplified version of CIGI HEMU and includes a number of useful advantages:在模拟行业中,图像生成器(IG)通过接口(例如CIGI)从主机接收数据。为了演示IG功能和调试目的,我们开始开发IG Host —一种跨平台和跨协议的解决方案。当前,IG Host是CIGI HEMU的简化版本,并具有许多有用的优点:
- Simplified entity control简化实体控制
- Transparent packet transfer (requests and responses can be viewed in the console)透明的数据包传输(请求和响应可以在控制台中查看)
- CIGI Debug modeCIGI调试模式
- Improved LOS responses改善LOS响应
It is planned to add the HLA and DIS protocols in next versions.计划在下一版本中添加HLA和DIS协议。
Running IG Host运行IG主机#
IG Host is a part of CIGI demo. Therefore, to try out IG Host, you need to download and run CIGI demo. In the IG Configurator window, click the RunIG Host button.IG Host是CIGI演示。因此,要试用IG Host,您需要下载并运行CIGI演示。在IG Configurator窗口中,单击RunIG Host按钮。
Then click Connect.然后单击Connect。
Using IG Host in IG Projects在IG项目中使用IG主机#
To run IG Host with your IG application, copy the ig_host binaries from the demos/cigi_demo/bin/ folder to your project:要将IG Host与IG应用程序一起运行,请将ig_host二进制文件从demos/cigi_demo/bin/文件夹复制到您的项目中:
- For Windows — ig_host_x64.pdb, ig_host_x64.exe, ig_host_x64d.exe对于Windows-ig_host_x64.pdb, ig_host_x64.exe, ig_host_x64d.exe
- For Linux — ig_host_x64, ig_host_x64d对于Linux-ig_host_x64, ig_host_x64d
IG Host Settings and ParametersIG主机设置和参数#
To make things work, you need to perform the following actions:为了使一切正常,您需要执行以下操作:
- Connect IG Host with IG.将IG Host与IG连接。
- Open the world (database) that provides the environment.开放世界(数据库)提供环境。
- Add an entity.添加实体。
- Create a view attached to the entity, which is displayed in IG.创建一个视图附加到实体(显示在IG中)。
- Enable control of the entity movements.使能够实体的控制动作。
General Settings常规设置#
In the IG Host window, open the Settings window (File -> Settings) and set the following parameters:在IG Host窗口中,打开Settings窗口(File -> Settings)并设置以下参数:
- Async Mode currently should be disabled.当前应禁用Async Mode。
- Geodetic Origin — the coordinates that are set for the Geodetic Pivot in the world you have created.Geodetic Origin-在您创建的世界中为Geodetic Pivot设置的坐标。
- Spawn Point — the coordinates of the entity spawn location.Spawn Point —实体产生位置的坐标。
- CIGIConnector settings, if necessary.CIGIConnector设置(如有必要)。
Adding and Loading the World添加和加载世界#
To have an environment displayed in IG, you need to load a world (database).要在IG中显示环境,您需要加载一个世界(数据库)。
- Open the Database List window (Windows -> Database List).打开Database List窗口(Windows -> Database List)。
- Select a database from the list.从列表中选择一个数据库。
- Click Load.点击Load。
- Check if the world has been loaded in the IG window. Click Connect/Reconnect in the Settings window, if necessary.在IG窗口中检查世界是否已加载。如有必要,请在Settings窗口中单击Connect/Reconnect。
You can add more databases to the list. The databases you want to add should be located inside the /data folder of the project you work with. To add another world to the database list:您可以将更多数据库添加到列表中。您要添加的数据库应位于您使用的项目的/data文件夹内。要将另一个世界添加到数据库列表中:
- Click Add.点击Add。
- Select the *.world file to be loaded.选择要加载的*.world文件。
- Specify the latitude and longitude of the geodetic pivot in that world.指定该世界中大地坐标的纬度和经度。
- Click OK.点击OK。
- Reopen IG and IG Host.重新打开IG和IG Host。
Adding an Entity添加实体#
The entity is added as follows:实体添加如下:
- Open the Entity List window (Windows -> Entity List).打开Entity List窗口(Windows -> Entity List)。
- Double-click an entity from the list to open Entity Properties.从列表中双击一个实体以打开Entity Properties。
- Set the entity Type, and check its position (most importantly along the Z axis to make sure it is not under the ground).设置实体类型,并检查其位置(最重要的是沿Z轴以确保其不在地下)。
- Set other parameters, if necessary.如有必要,设置其他参数。
Setting the View设置视图#
The view defines what actually is going to be displayed in IG.该视图定义了将在IG中实际显示的内容。
To open the view settings:要打开视图设置:
- Open the Views list (Windows -> Views List).打开Views列表(Windows -> Views List)。
- Double-click a view from the list to open its properties.从列表中双击一个视图以打开其属性。
- Use Position and Rotation to adjust the camera relative to the entity. Both positive and negative values can be used.使用Position和Rotation相对于实体调整摄影机。正值和负值均可使用。
- Parent Entity ID — ID of the entity to which camera is attached. By changing this ID, you can switch between entities.Parent Entity ID —摄像机所连接的实体的ID。通过更改此ID,您可以在实体之间切换。
Controlling the Entity控制实体#
To move the entity around in IG:要在IG中移动实体,请执行以下操作:
- Select the entity in the Entity List.在Entity List中选择实体。
- Open the EntityControl window (Windows -> Entity Control).打开EntityControl窗口(Windows -> Entity Control)。
- Activate the Enabled option.激活Enabled选项。
- Click in the black area within the IG Host window.单击“ IG Host”窗口中的黑色区域。
- Use WASDQE buttons and mouse movements to control the entity. Speed is controlled by using Shift + Mouse Scroll button.使用WASDQE按钮和鼠标移动来控制实体。使用Shift + Mouse Scroll按钮控制速度。
There are three Motion Types available:
共有三个Motion Types可用:
- Spectator — camera follows the entity.Spectator-摄影机跟随实体。
- Airplane — the entity moves with a predefined speed, the direction is controlled by the mouse movements.Airplane-实体以预定义的速度移动,方向由鼠标移动控制。
- Circle — entity moves circle-wise using the entered Radius and Circle Center coordinates.Circle-实体使用输入的Radius和Circle Center坐标沿圆周方向移动。
Only one entity can be controlled at a certain moment, switching to another entity stops the movement of the previous entity.
在某个时刻只能控制一个实体,切换到另一个实体将停止前一个实体的移动。
Setting the Weather设定天气#
To control the weather, open the Atmosphere window (Windows -> Atmosphere):要控制天气,请打开Global Weather窗口(Windows -> Global Weather):
Currently the weather settings are the same as in HEMU.当前的天气设置与中的相同HEMU。
Saving and Loading IG Host Settings保存和加载IG主机设置#
In the File menu, the Save State and Load State options are available. You can save all IG Host settings and load them as needed.在File菜单中,可以使用Save和Load选项。您可以保存所有IG Host设置并根据需要加载它们。
Sending CIGI Packets发送CIGI数据包#
To send packets, select the type of packets you want to send:要发送数据包,请选择要发送的数据包类型:
The corresponding window will open:相应的窗口将打开:
You can open as many windows and send as many requests as you want.您可以打开任意多个窗口,并发送任意数量的请求。
Logging CIGI Packets记录CIGI数据包#
IG Host allows tracing both sent and received packets.IG Host允许跟踪已发送和已接收的数据包。
In the Settings window (File -> Settings), click the Packet Logger Filter button to open the corresponding window:在Settings窗口(File -> Settings)中,单击Packet Logger Filter按钮以打开相应的窗口:
In the window that opens, enable the CIGI option and the packets that should be logged.在打开的窗口中,启用CIGI选项和应记录的数据包。
- Packets in the top area are the packets sent from Host to IG.顶部区域中的数据包是从主机发送到IG的数据包。
- Packets in the bottom area are the packets sent from IG to Host.底部的数据包是从IG发送到主机的数据包。
The information will be displayed in the console of the IG Host window (opened using the ` button).该信息将显示在IG Host窗口的控制台中(使用`按钮打开)。