dumbo2007
Crazy about real time sims
Hi,
I want to convert and set the co-ordinates of another vessel from inside the vessel class of a vessel. I am using the following method.
I have the co-ordinates wrt the base Brighton Beach as _V(10,0,0). I want to convert these co-ordinates to global co-ordinates such that I can set them through v->DefSetStateEx(). But the above method places the vessel no where near brighton but somewhere in deep space. Any one knows what I could be doing wrong ?
Thanks
I want to convert and set the co-ordinates of another vessel from inside the vessel class of a vessel. I am using the following method.
Code:
VESSELSTATUS2 mystat;
memset(&mystat,0,sizeof(VESSELSTATUS2));
mystat.version = 2;
VESSEL* v = oapiGetVesselInterface(oapiGetObjectByName("GL-NT"));
v->GetStatusEx(&mystat);
VECTOR3 loc = _V(10,0,0), glob;
oapiLocalToGlobal(oapiGetBaseByName(oapiGetObjectByName("Moon"),"Brighton Beach"),&loc , &mystat.rpos);
//oapiGetRotationMatrix(mystat.rbody, &mat);
//mystat.rpos = mul(mat, position_wrt_moon_frame);
v->DefSetStateEx(&mystat);
Thanks