class Energia5V_booster : public VESSEL4 {
public:
Energia5V_booster(OBJHANDLE hVessel, int flightmodel);
~Energia5V_booster();
void clbkSetClassCaps(FILEHANDLE cfg);
void clbkPostCreation();
void clbkPostStep(double simt, double simdt, double mjd);
private:
...
THRUSTER_HANDLE th_boosterA[4], th_boosterB[4], th_boosterV[4], th_boosterG[4];
...
};
void Energia5V_booster::clbkPostCreation()
{
char *myName = GetName();
if (strcmp(myName, "E5VBoosterA") == 0) // Which booster am I ? A
{
th_boosterA[0] = CreateThruster(_V(0.8515, 0.8515, -17.55), _V(0, 0, 1), 1976000, KeroLOX, 3305.97, 3031.29);
th_boosterA[1] = CreateThruster(_V(0.8515, -0.8515, -17.55), _V(0, 0, 1), 1976000, KeroLOX, 3305.97, 3031.29);
th_boosterA[2] = CreateThruster(_V(-0.8515, 0.8515, -17.55), _V(0, 0, 1), 1976000, KeroLOX, 3305.97, 3031.29);
th_boosterA[3] = CreateThruster(_V(-0.8515, -0.8515, -17.55), _V(0, 0, 1), 1976000, KeroLOX, 3305.97, 3031.29);
CreateThrusterGroup(th_boosterA, 4, THGROUP_MAIN);
AddExhaust(th_boosterA[0], 10, 0.4);
AddExhaust(th_boosterA[1], 10, 0.4);
AddExhaust(th_boosterA[2], 10, 0.4);
AddExhaust(th_boosterA[3], 10, 0.4);
}
if (strcmp(myName, "E5VBoosterB") == 0) // Which booster am I ? B
{
th_boosterB[0] = CreateThruster(_V(0.8515, 0.8515, -17.55), _V(0, 0, 1), 1976000, KeroLOX, 3305.97, 3031.29);
th_boosterB[1] = CreateThruster(_V(0.8515, -0.8515, -17.55), _V(0, 0, 1), 1976000, KeroLOX, 3305.97, 3031.29);
th_boosterB[2] = CreateThruster(_V(-0.8515, 0.8515, -17.55), _V(0, 0, 1), 1976000, KeroLOX, 3305.97, 3031.29);
th_boosterB[3] = CreateThruster(_V(-0.8515, -0.8515, -17.55), _V(0, 0, 1), 1976000, KeroLOX, 3305.97, 3031.29);
CreateThrusterGroup(th_boosterB, 4, THGROUP_MAIN);
AddExhaust(th_boosterB[0], 10, 0.4);
AddExhaust(th_boosterB[1], 10, 0.4);
AddExhaust(th_boosterB[2], 10, 0.4);
AddExhaust(th_boosterB[3], 10, 0.4);
}
if (strcmp(myName, "E5VBoosterV") == 0) // Which booster am I ? V
{
th_boosterV[0] = CreateThruster(_V(0.8515, 0.8515, -17.55), _V(0, 0, 1), 1976000, KeroLOX, 3305.97, 3031.29);
th_boosterV[1] = CreateThruster(_V(0.8515, -0.8515, -17.55), _V(0, 0, 1), 1976000, KeroLOX, 3305.97, 3031.29);
th_boosterV[2] = CreateThruster(_V(-0.8515, 0.8515, -17.55), _V(0, 0, 1), 1976000, KeroLOX, 3305.97, 3031.29);
th_boosterV[3] = CreateThruster(_V(-0.8515, -0.8515, -17.55), _V(0, 0, 1), 1976000, KeroLOX, 3305.97, 3031.29);
CreateThrusterGroup(th_boosterV, 4, THGROUP_MAIN);
AddExhaust(th_boosterV[0], 10, 0.4);
AddExhaust(th_boosterV[1], 10, 0.4);
AddExhaust(th_boosterV[2], 10, 0.4);
AddExhaust(th_boosterV[3], 10, 0.4);
}
if (strcmp(myName, "E5VBoosterG") == 0) // Which booster am I ? G
{
th_boosterG[0] = CreateThruster(_V(0.8515, 0.8515, -17.55), _V(0, 0, 1), 1976000, KeroLOX, 3305.97, 3031.29);
th_boosterG[1] = CreateThruster(_V(0.8515, -0.8515, -17.55), _V(0, 0, 1), 1976000, KeroLOX, 3305.97, 3031.29);
th_boosterG[2] = CreateThruster(_V(-0.8515, 0.8515, -17.55), _V(0, 0, 1), 1976000, KeroLOX, 3305.97, 3031.29);
th_boosterG[3] = CreateThruster(_V(-0.8515, -0.8515, -17.55), _V(0, 0, 1), 1976000, KeroLOX, 3305.97, 3031.29);
CreateThrusterGroup(th_boosterG, 4, THGROUP_MAIN);
AddExhaust(th_boosterG[0], 10, 0.4);
AddExhaust(th_boosterG[1], 10, 0.4);
AddExhaust(th_boosterG[2], 10, 0.4);
AddExhaust(th_boosterG[3], 10, 0.4);
}
...
}