Information Technology Reference
In-Depth Information
5.2 Two-Way Data Transmission between VP and GL Studio
1. D ATA TRANSFERRING FROM VP TO GLS
First, activate the vpGLStudio optional module in the Vega Prime, and create a virtual
instrument instance. Then load and generate a dynamic link library files *.dll in the
instance, and enter the class name. The plug-in named vp GLStudioPlugin supported
by GL Studio, can have the dynamic-link library files (DLL) compiled from the code
generated by the GL Studi3.2 loaded directly into the Lynx Prime editor [5].
In the vpGLStudio module editor of Lynx Prime, users can choose a variety of pa-
rameters to transfer the current incoming data to GLS component, as shown in Fig.7,
the parameters provided by the VP include free speed, altitude, heading, pitch angle
roll angle and so on. But the choice of the parameters is limited in VP Resource Name
and they can not be added and modified.
Therefore, for certain special parameters of the node, such as the relative coordi-
nate value or the control instruction of the simulation, they can not be associated with
the instrumentation through this simple method, and need to change the instrumented
initial value to achieve association. For instance, distance between carrier aircraft
and target, while relative position relationship are not found correspondingly in VP
Resource Name, so, it is need to obtain the value calculated, then assign values to
the corresponding variables of the GL Studio Resource Name, which can make in-
strument indicating change depending on different value. Development steps are as
follows:
1)Add following code:
vpGLStudioComponent*Cockpit=vpGLStudioComponent:: find ("Cockpit");
//define instrument instance and an instance of the instrument
char buf [50]; // define a character string array Sprintf (buf, "% 3f", Value);
//assign needed data to be transferred to a string array
cockpit-> addAttribute ("VPValuePassToGLS", buf,);
//pass the value into the interface function called VPValuePassToGLS.
2) Write the response function code into the components created by GL Studio,
such as VPValuePassToGLS ().
Fig. 8. Position relationships between carrier
aircraft and target in the virtual scene
Fig. 9. The relationship between carrier air-
craft and target location in MFD
Search WWH ::




Custom Search