PROPELLANT_HANDLE TANK;
TANK = CreatePropellantResource (FUELMASS);
// ***************** thruster definitions *******************
th_main = CreateThruster (_V(0,1,-94.3), _V(0,0,1), MAXMAINTH, TANK, ISP);
CreateThrusterGroup (&th_main, 1, THGROUP_MAIN);
th_retro = CreateThruster (_V(0,1,94.3), _V(0,0,-1), MAXRETROTH, TANK, ISP);
CreateThrusterGroup (&th_retro, 1, THGROUP_RETRO);
th_rcs[0] = CreateThruster (_V( 1,1, 1), _V(0,0,1),MAXRCSTH, TANK, ISP);
//left front tread
th_rcs[1] = CreateThruster (_V(-1,1, 1), _V(0,0,1), MAXRCSTH, TANK, ISP);
// right front tread
th_rcs[2] = CreateThruster (_V( 1,1,-1), _V(0,0,-1), MAXRCSTH, TANK, ISP);
//left rear tread
th_rcs[3] = CreateThruster (_V(-1,1,-1), _V(0,0,-1), MAXRCSTH, TANK, ISP);
// right rear tread
th_rcs[4] = CreateThruster (_V( 1,1, 1), _V(0,0,1),MAXRCSTH, TANK, ISP);
//left front tread
th_rcs[5] = CreateThruster (_V(-1,1, 1), _V(0,0,1), MAXRCSTH, TANK, ISP);
// right front tread
th_rcs[6] = CreateThruster (_V( 1,1,-1), _V(0,0,-1), MAXRCSTH, TANK, ISP);
//left rear tread
th_rcs[7] = CreateThruster (_V(-1,1,-1), _V(0,0,-1), MAXRCSTH, TANK, ISP);
th_rcs[4] = CreateThruster (_V(0,0,1), _V(1,0,0), MAXRCSTH, TANK, ISP);
th_rcs[5] = CreateThruster (_V(0,0,-1), _V(1,0,0), MAXRCSTH, TANK, ISP);
th_rcs[6] = CreateThruster (_V(0,0,1), _V(-1,0,0), MAXRCSTH, TANK, ISP);
th_rcs[7] = CreateThruster (_V(0,0,-1), _V(-1,0,0), MAXRCSTH, TANK, ISP);
th_group[0] = th_rcs[0];
th_group[1] = th_rcs[3];
CreateThrusterGroup (th_group, 2, THGROUP_ATT_YAWLEFT);
th_group[0] = th_rcs[1];
th_group[1] = th_rcs[2];
CreateThrusterGroup (th_group, 2, THGROUP_ATT_YAWRIGHT);
th_group[0] = th_rcs[4];
th_group[1] = th_rcs[6];
CreateThrusterGroup (th_group, 2, THGROUP_ATT_LEFT);
th_group[0] = th_rcs[5];
th_group[1] = th_rcs[7];
CreateThrusterGroup (th_group, 2, THGROUP_ATT_RIGHT);