dumbo2007
Crazy about real time sims
More issues.....it seems some special callback needs to be implemented by a derived class of VESSEL3 or some flag needs to be set for the following to work on the vessel.
For this to work on vessel v some callback or flag has to be set which I dont seem to be able to figure out. I tried setting different types of Vessel in the scenario file :
So Ferrari
eltaGlider works and I see Ferrari positioned at every step correctly. But Ferrari:ShuttlePB or Ferrari:BulletBaseVehicle (my class) does not. I am guessing the ShuttlePB class is too basic and for the same reason DefSetState() does not work if called on the same BulletBaseVehicle (my VESSEL3 derived class) itself.
The delta glider code is too huge....and eliminating members one by one will take me too long to find the required mechanism I am missing.
Code:
[B]VESSELSTATUS2 mystat;
memset(&mystat,0,sizeof(VESSELSTATUS2));
mystat.version = 2;
VESSEL* v = oapiGetVesselInterface(oapiGetObjectByName("Ferrari"));
v->GetStatusEx(&mystat);[/B]
VECTOR3 loc = _V(pkt.shapes.m[12] + 400, 0.2, pkt.shapes.m[14] + 500);//_V(400,10,500);
VECTOR3 moonpos, correct_ecliptic_orientation;
oapiLocalToGlobal(oapiGetBaseByName(oapiGetObjectByName("Moon"),"Brighton Beach"),&loc , &correct_ecliptic_orientation);
oapiGetGlobalPos(oapiGetObjectByName("Moon"), &moonpos);
mystat.rpos = correct_ecliptic_orientation - moonpos;
v->DefSetStateEx(&mystat);
For this to work on vessel v some callback or flag has to be set which I dont seem to be able to figure out. I tried setting different types of Vessel in the scenario file :
Code:
...
BEGIN_SHIPS
Brighton2:BulletBase
STATUS Landed Moon
BASE Brighton Beach:4
HEADING 70.00
FUEL 1.000
GEAR 1 1.0
NOSECONE 0 0.0000
END
[B]Ferrari:DeltaGlider[/B]
STATUS Landed Moon
BASE Brighton Beach:3
HEADING 70.00
FUEL 1.000
GEAR 1 1.0
NOSECONE 0 0.0000
END
.....
So Ferrari
The delta glider code is too huge....and eliminating members one by one will take me too long to find the required mechanism I am missing.
Last edited: