武器跟踪随动系统视景仿真_英文_

 收稿日期:2009-06-25 修回日期:2009-08-30*基金项目:教育部新世纪优秀人才支持计划资助项目(极

纪支[2005]290)

 作者简介:王金华(1979- ),男,浙江余姚人,博士生,研

究方向:系统建模与计算机应用。

文章编号:1002-0640(2010)08-0066-05

武器跟踪随动系统视景仿真*

王金华1

,严卫生2

,刘旭琳

2

(1.武警工程学院,西安 710086,2.西北工业大学航海学院,西安 710072)

摘 要:武器跟踪随动仿真系统是一个能够对武器跟瞄进行演示验证的虚拟现实系统,对虚拟军事训练的研究和探索,有着极其重要的意义。提出了一种简易的跟踪随动算法,可以对武器跟瞄运动目标进行有效的模拟;并建立V eg a Pr ime 与O penGL 混合编程机制解决了在场景中的画图问题,实现了对瞄准镜十字刻线的绘制;通过实验,实现了在计算机系统中一定范围的全天候自然实景的模拟。开发和应用结果表明,该方法具有可行性,仿真产生的图像与实际成像较为接近,并能大幅度减少训练成本。上述研究对于武器瞄准训练以及目标识别等具有一定的工程意义。

关键词:视景仿真,V ega P rime,跟踪,OpenGL ,十字刻线中图分类号:T P 391.9 文献标识码:A

A Visual Simulation System for the Weapon Tracking Servo

WA NG Jin-hua 1,YAN Wei-sheng 2,LIU Xu-lin 2

(1.Engineering College of A rmed Police For ce ,X i 'an 710086,China ,

2.College of M ar ine E ngineering ,N orthw ester n Poly technical U niv er sity ,X i ’an 710072,China )

Abstract :T he presented visual simulatio n sy stem for the w eapon tr acking servo is a virtual reality

sy stem that is used fo r the dem onstratio n of the collimation of aim .This sy stem w ill be the base and effectiv e method for the drill and tar get identification .A simulating of the w eapon tracking effect is established through the w ise alg orithm.Besides,generic r endering during the dr aw process is per for med thr oug h Vega Prim e and OpenGL.And it implements accurate simulatio n of a reticle placed in the eyepiece of an optical instrum ent.In addition,the all-w eather environment w ithin a r ang e in computer system is

show n realistically according to practice of ex perimenting.T he results of application show that the metho ds of simulatio n ar e feasible and the simulation images ar e close to the real im ages .Furtherm ore ,it can r educe the cost of the training .T his research has goo d pro spect in military training and targ et identificatio n.

Key words :visual sim ulation,Vega Prime,tracking,OpenGL,reticle

Intro ductio n

The V ir tual Reality for military affairs is an important ingr edient of future w ar.This technology is of sig nificance for shor tening per io ds of the new weapon design and curtailing product co st.A v isual sim ulation system for the W eapon Tr acking Serv o (WT S )w ill be the key facto r of

im ag ing reco gnition device ,w hich is applied w idely to the cog nitive domain ,such as tracking alg orithm tests and w ar g am es .This will give info rmation fusion and targ et identification an o pportunity to do things by offering huge graphics data -base of flight tar get,w hich w as close to the r eal imag es.So it w ill be the base and effective m ethod for the follow -up research .Furtherm ore ,the com puter simulation no t only cur tails training cost,but also obtains diversified g raphics of w eapo n,all-attitude targ et and all-w eather environment co ntrasted clearly w ith field m easur em ent.

M ore and m ore research and development

Vol.35,No.8

Aug,2010

 

 

火力与指挥控制

Fire Control &Command Control

 

 

第35卷 第8期2010年8月

personnel hav e developed the w eapon v ision sy stem.Weapon optical channel and lidar tr acking sy stem w ere present.T ao tang-fei and Han chong-zhao realized the optical channel of adjusting focus in Institute of Sy nthetic Automation,Schoo l of Electronic and Infor matio n Engineering,Xi’an Jiaotong U niv ersity[1].And Zhang yu-shuang, Yue y u-fang,T ao y in-x ue Realized a Visual Simulation for the Lidar Sy stem in Beijing Institute of Applied Physics and Computational M athematics[2].But the system s above did no t pr ovide the w ays of the all-w eather environment (such as terrain,stor m,etc.).Furthermor e,a visual simulatio n system for the WT S is characteristic of w ide terr ain,m ulti mo bile targets, and co mplex co nfiguration of sim ulated objects. Besides,it relates to modeling of natural scenery and repr esentation of third dimensio n,etc.U sers pr ocessing target identification,w ar situation analy sis and ev aluation of tactical effectiveness are affected by its verisimilitude.M oreover,its real-time idiosy ncrasy has a stro ng impact on operator eng ag ing a variety of exercitation and three-dimensional m aneuver s.Based o n causation afo rem entioned,we adopt Veg a Prime and OpenGL to design the sim ulation sy stem for the sake of constructing ter rain fleetly,fabr icating vivid model,and simulating pr ocess o f w eapon tracking targ ets.In addition,a series of alg orithm w as presented for the crucial problem s o f captur ing mov ing targ ets,all-w eather enviro nm ent and generic rendering dur ing the draw process.

The operating principle of a visual simulation sy stem for the WT S and flow diagr am of sim ulation sy stem w ere presented firstly in the paper.T hen w e realized the simulation of capturing mov ing targets,all-embracing w eather and the recreticle based o n Scene Simulation Technolo gy and the algor ithm presented abov e. All of this afford v isual testing instrument for identify o bject and arms drills.T his v isual sim ulator has been applied to cer tain w eapon dig ital platform s.T hus,the results of application show that the metho ds of simulation w ere feasible.

1 Specialty of the WT S[1,2]

Certain WTS is highly im po rtant co mponent part of the Visual Sim ulation Arm am ent System. Its principium and co nfiguratio n strong ly r esem bles telev ision camera optics,w hich is deeply affected by location,orientation,o bserv ational points.T her e is a g rid or pattern placed in the eyepiece o f an optical instrum ent,used to establish scale or po sitio n.Abov e all things,the imag e data engendered by the WT S is available for detecting, identifying and disting uishing.Beside,the factor s o f battlefield circumstance ought to be taken into account in order that the sim ulation images are close to the real images,w hich is able to affect capturing effect of targ ets.T he factors of battlefield circumstance inv olve w ar surro undings, g eography and atmospheric phenom ena,etc.And that,geogr aphy includes g eo graphic location, physio gnomy,terrain and the effect caused by o ther element.Atmospheric phenom ena also comprise gro und w eather,hig h altitude w eather and o cean w eather,etc.T hat is to say,ther e are m any factors influences on w arfare,for example, o cean current,clim atic co nditions,w eather, cloud,rain and brume,etc.So,to deal w ith previous problem,w e make use of the Scene Simulation T echnolog y to realize such three-dimensional effects o f tracking targets,w hich achieves the descriptio n of all-attitude targ et and all-w eather environment in order to affor d computer-g enerated holog ram fo r the subsequent studies of data fusio n and drills.

2 M o dels of the WT S

M ultiGen Creator3.0.1w as adopted for the simulated modeling of three-dim ensio nal real-time terrain and solid mo del;Veg a Prime2.0.1w as selected to depict and establish v ir tual environment;Visual C++.NET w as applied to develop simulation pr ocedure and user interface, and OpenGL was employ ed to draw the reticle.In addition,the visual sim ulation system for the W TS is able to run the com puter installed Windo w2000 Professional o r Window XP Professional.T he v isual simulation fo r the WTS falls into thr ee steps.1.Construct especially scene mo del, including three-dimensional terr ain and all-w eather environment.2.Fabricate m odel base of tar gets based on its practical geometric parameter,w e

?

67

?

王金华,等:武器跟踪随动系统视景仿真(总第35-1319)

Fig.1 Flow diagr am o f the sy stem

make a w ide choice of aim for the Subsequent research.3.Sim ulate the im ag ing characteristic of the WT S accor ding to the pr esented.T he algo rithm of simulating the w eapon tr acking effect and the reticle is pr esented in the paper as show n belo w (fig.1).

3 A lgorithm

3.1 Dynamic target tracking algorithm

The functio nality of alg orithm is im plemented by attaching an observer to a transfo rmation node nam ed attachment aim,w hich can fig ur e out w here the targ et is in the w o rld space.And then the m atr ix of the tar get directio n is transform ed till orient that point in the direction of the targ et. Finally,the weapon view ing direction is the normalized orientation m atrix.Accordingly,this algo rithm can carry out accurate tracking.The fo llow ing co des express ho w to achieve this function.

m traversalLo cate.setMode(vsTraversal Locate::M ODE M ATRIX ST ACK);//Setu p the o peratio nal mode fo r the locate traversal to collect the m atr ix stack.

vpKernel::instance()->addSubscriber (vpKernel::EVENT POST UPDAT E

T RA VERSAL,this)

;//Add a subscriber for the EVENT POST UPDAT E T RAVERSAL event.The subscriber p

erform s the computation that orients the transform ation node to po int in the direction of the im mobility node.}

m traversalLo cate.reset();//Reset the traversal(r esets matrix stack,etc.)

if(aim){m trav ersalLocate.visit(aim); //Do the tr av er sal(up).}

m fr om->g etT ranslate(&posFrom[0], &posFrom[1],&posFrom[2]);//Dompute location of the parent transfo rm in the w orld/scene space factor into the computation any tr anslational o ffset intr oduced by the transform.

m traversalLocate.g etT opMatrix Stack() .tr ansfor mPo int(&posAt);//T ransform the m atr ix of the targ et direction.

v uVec3y vec(posAt);yvec-= posFro m;y vec.norm alize();//Co mpute vector y, and no rmalize.

v uVec3upVector(0,0,1.0);// Define singularity(looking str aig ht up or dow n).

if(v uAbsGT(yv ec[0],v uM ath:: ZERO THRESHOLD)??v uAbsGT(y vec[1], v uM ath

::ZERO T HRESHOLD)){// No n-sing ular case,to perform dow nw ards.

v uVec3x vec;x vec.cross(yv ec, upVector);xv ec.normalize();//Co mpute v ector x,and no rmalize.(v ector x=vector y×Vector up)

v uVec3zvec;zvec.cro ss(xv ec, y vec);zvec.norm alize();//Compute v ecto r z,and norm alize.(v ector z=v ecto r x×v ector y) v uM atrixm at(x vec[0],xv ec[1], x vec[2],0.0,

y vec[0],yvec[1],yvec[2],0.0,

zvec[0],zvec[1],zvec[2],0.0,

posFro m[0],posFr om[1],posFrom[2], 1.0);//Creates a m atr ix initialized w ith the instance m atrix.

v uVec3d rotFro m,scale,shear;

m at.decom po se(&posFrom,&r otFro m, &scale,&shear);//Deco mpo ses the m atr ix into

?

68

? (总第35-1320)火力与指挥控制2010年 第8期

sim ple transformations :mat =scale *shear (x ,

y )^2*shear (x ,z )*shear (y ,z )*rotate *translate .

m from ->set (posFro m ,rotFro m ,scale );//Sets the translation,rotation,and scale co mpo nents o f the m atr ix to the given values.}

else {//A sing ular case w ill use previous view matrix.(T he r eason is that a w eapon cannot fire erectly)}}};

3.2 Drawing the reticle

Vega Pr im e is the advanced v isual simulation platform ,w hich furnishes m any optional m odules.But it cannot fulfill the purpo ses in special scopes so metim es,such as professional pro blems that w e need draw tw o dim ensional g raphics in three dimensional scenes.Here is the all-important

extension to Vega Prime using OpenGL.Tw o w orkspaces called each other can disposal the abo ve sim ulation pr oblem s.T he mixed pro gramm e mechanism o f OpenGL and Vega Prime presented in the paper run as follow s:1Create o ur ow n dr aw bin processor -class Draw Pro cessor :public vsChannelPr oxy ::BinProcessor {},and append the so und ,hig h efficient algo rithm of graphics .Befo re render ing using OpenGL ,w e need store the current g raphics state and reset all o f the gr aphics state elem ents to their default values by pushElements ()and restore all of the gr aphics state elements to their previous value thro ug h po pElements ().oRegister the channel prox y fr om the class kernel and r equest a channel bin .As a result,the bin m ust be reserved before any of the channels are created.Alter the sequence of the channel bin by v sChannelProx y::ORDER DEFAULT (The channel bin identifly ing code returned by reserveBin ).After new channel that gets created,and before fro nt,backg round stores that get substituted each other;w e ’ll call the default cull pro cessor and our o w n dr aw processor to draw the graphics.?Ow ing to the default reference frame of OpenGL and Vega Prim e are diverse fr om each other ,but the reticle placed in the eyepiece o f an o ptical instrum ent rem ains w ith tw o dimensional graphics.Thus disable the depth test and setup zero to z co ordinates in the

glVertex 3f().

The abov e pr ogram ming mechanism made a

r eticle using OpenGL and the scene built by Vega Prime into superposition of im ages .And it can be adequate for other draw ing function of OpenGL for ex panding and developing Vega Prime.

M odels o f SU -33carr ier based and f18c ho rnet navy w er e called fro m am ong the targets data-base

in the im ag es (Fig.2).T he tim e of the simulation is 04/23/2005,14:30p .m .clear day ,sparse clouds ,the hig h visibility .T he r esults of application show that the metho ds of simulation w ere r ealistic,w ith go od real-tim e characteristics and the simulation images were clo se to the real im ag es.So,it can be in use for the militar y training and data fusio n .

Fig .2 Imag es o f the v isual simulatio n (the left:SU -33,t he r ig ht :F 18c )

3.3 Realization of all -weather environment

T he sim ulation o f atmosphere is of influence to the credibility o f emulato r .And the sound design o f enviro nm ent mo del is able to enhance the reality o f battlefield to a great ex tent.T his sy stem permits on-line /off-line w or king.If cho ose off-line w orking,w e need adjust m anually the PARAM o f the environment.Else,it can be simulated accor ding to data packag e of data m anag em ent server for atmosphere .T he data package store a lot of param eter fo rmatted as follo w ,date,visibility color ,visibility range,cloud layer,wind speed,w ind direction,rain,snow ,tim e of day,sun,m oon,stars,sky do me,etc.We pro vided an illustration of the o ff-line w o rking in o rder to introduce Realization of all -w eather environment in the paper .By the m easure o f ex perimentation,the follow ing codes can r ealize the all-w eather environment by adjusting the tab of cloud layer,visibility,rain,snow and the tim e of simulation.The function consult the belo w note.

m env ->setVisibilityRang eOpaque (80000.0f );

m env ->getV isibilityRang e ()±100.0f ;//Increase/decrease the visibility range.

?

69?王金华,等:武器跟踪随动系统视景仿真

(总第35-1321)

m env ->g etT imeOfDay ()±0.1f ;//Increase /decr ease the time o f the system .

m skyDo me->setGroundColo r (0.33f,0.29f,0.15f, 1.0f);

m clo udLay er ->setT extureTiling (3.0f,3.0f );

m clo udLay er ->setColor (0.96f ,0.98f ,0.98f,1.0f);

m cloudLayer->setElev ation (3000.0f,5000.0f );//Control the cloud layer .

m sun ->setHor izonCo lor (1.0f ,0.6f ,0.29f,1.0f);

m skyDo me->setGroundColo r (0.33f,0.29f,0.15f, 1.0f);//Enable /disable the sky do me g round plane .

m w ind->setDirectio n(s,c,0.0f);

m w ind->getSpeed()±1.0f;//Adjust the w ind dir ectio n and the w ind speed.

m sno w ->setEnable (false );//Enable /disable the snow

m r ain->setEnable (false );//Enable/disable the rain

Besides ,w e need append headerfiles to the fo rehead of a project,as follo w s,vpEnv.h,vpEnvClo udLay er.h,vpEnv Mo on.h,vpEnv Sky Do me .h ,vpEnvStars .h ,vpEnvSun .h ,vpEnvW ind .h ,vpEnvSnow .h ,vpEnvRain .h ,etc .

Fig.3is the user -inter face of the v isual sim ulation system fo r the WT S .T he left windo w displays the parameter settings including the states of system,w eather ,mo dels,and v ideo recorder,of which “the system initialization ”button furnish the parameter of the simulation initialization and choice of w orking w ith regard to online or off-line.And the right seg ment show s the WT S v isual channel for video output (laid o ut uh 60-lstripped ,rainstorm and lo w range of visibility in the image).M oreover,the or dinary function o f the m edia play er w as prov ided such as Play or pause playing ,Stop playing ,Rew ind video,Fast fo rw ard/backward through video,dr ag ging and dropping,etc .

4 Conclusio n

A sim ulating of the w eapon tracking effect w as established through the present algor ithm.

And it implem ents accurate sim ulation of a reticle based on Vega Prim e and OpenGL .At the sam e

Fig .3 U ser -inter face of the v isua l simulatio n

time ,the all -w eather environment w ithin a rang e in computer sy stem is show n r ealistically.The result o f simulatio n w as perfect and the im ages were close to the real images also .Besides ,the simulato r can proffer rich g raphics of all -attitude targ ets and all-weather cir cumstance,w hich is able to afford a integr ated data-base of mov ing aim im ag es in order to military tr aining and data fusion .The applicatio n show that a visual simulation sy stem for the WT S mentioned in the paper has the advanced algor ithm,idea and large v alue in pr oject for w eapo n dem onstratio n and design .T his v isual simulator has been applied to a w eapo n digital platfo rm effectively.

5 A cknowledgement

T his w ork was supported by the National Natural Science Foundation of China #60875071.Ref erences :

[1]

T ao T F ,Ha n C Z.Study on O ptical Cha nnel in V isual Simulat ion Sy stem and Its Realizatio n [J ].Jo ur nal of Sy st em Simulat ion ,2004,16(4):708-710.

[2]

Z hang Y S,Y ue Y F ,T ao Y X.Realizatio n of V isual Simulat ion for the L idar T ra cking System [J].Journal of System Simulation,2004,16(8):1748-1749.

[3]

D ong B ,M a L Y ,Liu P Y .Simulation of a M issile ’s A iming T raining Based o n V ega [J ].Co mputer Simulat ion,2006,23(8):263-265.

[4]

Y ang Z B ,Zhu Y C ,Zhan W ,et al .T he M odeling a nd Scene Simulat ion Based on W eapon Serv o Sy stem [J].Electr onics Optics &Contr ol,2000,80(4):60-64.

[5]

W ang C ,L i L J ,Zhou J Q ,V ega -the r eal -tim e thr ee -dimensio nal V isual Simulat ion [M ].Wuhan:Huazhong U niv ersit y of Science and T echno log y bo ok Concern ,2005.

?

70? (总第35-1322)火力与指挥控制2010年 第8期

相关主题
相关文档
最新文档