I fixed it. I was told not to have global variables. And send an example
Now I need to see hwta is going on with this:
// --------------------------------------------------------------
// Vessel cleanup
// --------------------------------------------------------------
DLLCLBK void ovcExit (VESSEL *vessel)
{
if (vessel) delete (Chariot*)vessel;
}
void Chariot::clbkPreStep (double simt, double simdt, double mjd)
{
sprintf(oapiDebugString(),"start %2.2f", start );
if (0==start){
SetThrusterGroupLevel (THGROUP_MAIN, 0);
SetThrusterGroupLevel (THGROUP_RETRO, 0);
SetThrusterGroupLevel (THGROUP_ATT_YAWLEFT, 0);
SetThrusterGroupLevel (THGROUP_ATT_YAWRIGHT, 0);
}
}
What happens is event though start =1 the sprintf shows it is 0 and the set thrusterlevel part doesn't work.