void GEMINI::ConfigureACMEGroups(bool OAMS, bool sysA, bool sysB)
{
THRUSTER_HANDLE thT[6];
int a = 0;
//PITCH UP
if (OAMS && EquipmentSectionAvailable())
{
thT[a++] = thOAMS25[4]; //THRUSTER 5
thT[a++] = thOAMS25[5]; //THRUSTER 6
}
if (sysA) {
thT[a++] = thRCS_A[4]; //THRUSTER 5
thT[a++] = thRCS_A[5]; //THRUSTER 6
}
if (sysB) {
thT[a++] = thRCS_B[4]; //THRUSTER 5
thT[a++] = thRCS_B[5]; //THRUSTER 6
}
if (a > 0)
CreateThrusterGroup(thT, a, THGROUP_ATT_PITCHUP);
else
DelThrusterGroup(THGROUP_ATT_PITCHUP);
a = 0;
//PITCH DOWN
if (OAMS && EquipmentSectionAvailable())
{
thT[a++] = thOAMS25[0]; //THRUSTER 1
thT[a++] = thOAMS25[1]; //THRUSTER 2
}
if (sysA) {
thT[a++] = thRCS_A[0]; //THRUSTER 1
thT[a++] = thRCS_A[1]; //THRUSTER 2
}
if (sysB) {
thT[a++] = thRCS_B[0]; //THRUSTER 1
thT[a++] = thRCS_B[1]; //THRUSTER 2
}
if (a > 0)
CreateThrusterGroup(thT, a, THGROUP_ATT_PITCHDOWN);
else
DelThrusterGroup(THGROUP_ATT_PITCHDOWN);
//YAW RIGHT
a = 0;
if (OAMS && EquipmentSectionAvailable())
{
thT[a++] = thOAMS25[2]; //THRUSTER 3
thT[a++] = thOAMS25[3]; //THRUSTER 4
}
if (sysA) {
thT[a++] = thRCS_A[2]; //THRUSTER 3
thT[a++] = thRCS_A[3]; //THRUSTER 4
}
if (sysB) {
thT[a++] = thRCS_B[2]; //THRUSTER 3
thT[a++] = thRCS_B[3]; //THRUSTER 4
}
if (a > 0)
CreateThrusterGroup(thT, a, THGROUP_ATT_YAWRIGHT);
else
DelThrusterGroup(THGROUP_ATT_YAWRIGHT);
//YAW LEFT
a = 0;
if (OAMS && EquipmentSectionAvailable())
{
thT[a++] = thOAMS25[6]; //THRUSTER 7
thT[a++] = thOAMS25[7]; //THRUSTER 8
}
if (sysA) {
thT[a++] = thRCS_A[6]; //THRUSTER 7
thT[a++] = thRCS_A[7]; //THRUSTER 8
}
if (sysB) {
thT[a++] = thRCS_B[6]; //THRUSTER 7
thT[a++] = thRCS_B[7]; //THRUSTER 8
}
if (a > 0)
CreateThrusterGroup(thT, a, THGROUP_ATT_YAWLEFT);
else
DelThrusterGroup(THGROUP_ATT_YAWLEFT);
//ROLL RIGHT
a = 0;
if (OAMS && EquipmentSectionAvailable())
{
thT[a++] = thOAMS25[2]; //THRUSTER 3
thT[a++] = thOAMS25[6]; //THRUSTER 7
}
if (sysA) {
thT[a++] = thRCS_A[2]; //THRUSTER 3
thT[a++] = thRCS_A[6]; //THRUSTER 7
}
if (sysB) {
thT[a++] = thRCS_B[2]; //THRUSTER 3
thT[a++] = thRCS_B[6]; //THRUSTER 7
}
if (a > 0)
CreateThrusterGroup(thT, a, THGROUP_ATT_BANKRIGHT);
else
DelThrusterGroup(THGROUP_ATT_BANKRIGHT);
//ROLL LEFT
a = 0;
if (OAMS && EquipmentSectionAvailable())
{
thT[a++] = thOAMS25[3]; //THRUSTER 4
thT[a++] = thOAMS25[7]; //THRUSTER 8
}
if (sysA) {
thT[a++] = thRCS_A[3]; //THRUSTER 4
thT[a++] = thRCS_A[7]; //THRUSTER 8
}
if (sysB) {
thT[a++] = thRCS_B[3]; //THRUSTER 4
thT[a++] = thRCS_B[7]; //THRUSTER 8
}
if (a > 0)
CreateThrusterGroup(thT, a, THGROUP_ATT_BANKLEFT);
else
DelThrusterGroup(THGROUP_ATT_BANKLEFT);
//FORWARD
a = 0;
if (OAMS && EquipmentSectionAvailable())
{
thT[a++] = thOAMS100[0]; //THRUSTER 9
thT[a++] = thOAMS100[1]; //THRUSTER 10
}
if (a > 0)
{
CreateThrusterGroup(thT, a, THGROUP_ATT_FORWARD);
CreateThrusterGroup(thT, a, THGROUP_MAIN);
}
else
{
DelThrusterGroup(THGROUP_ATT_FORWARD);
DelThrusterGroup(THGROUP_MAIN);
}
//AFT
a = 0;
if (OAMS && EquipmentSectionAvailable())
{
thT[a++] = thOAMS85[0]; //THRUSTER 11
thT[a++] = thOAMS85[1]; //THRUSTER 12
}
if (a > 0)
{
CreateThrusterGroup(thT, a, THGROUP_ATT_BACK);
CreateThrusterGroup(thT, a, THGROUP_RETRO);
}
else
{
DelThrusterGroup(THGROUP_ATT_BACK);
DelThrusterGroup(THGROUP_RETRO);
}
//RIGHT
a = 0;
if (OAMS && EquipmentSectionAvailable())
{
thT[a++] = thOAMS100[2]; //THRUSTER 13
}
if (a > 0)
{
CreateThrusterGroup(thT, a, THGROUP_ATT_RIGHT);
}
else
{
DelThrusterGroup(THGROUP_ATT_RIGHT);
}
//LEFT
a = 0;
if (OAMS && EquipmentSectionAvailable())
{
thT[a++] = thOAMS100[3]; //THRUSTER 14
}
if (a > 0)
{
CreateThrusterGroup(thT, a, THGROUP_ATT_LEFT);
}
else
{
DelThrusterGroup(THGROUP_ATT_LEFT);
}
//UP
a = 0;
if (OAMS && EquipmentSectionAvailable())
{
thT[a++] = thOAMS100[4]; //THRUSTER 15
}
if (a > 0)
{
CreateThrusterGroup(thT, a, THGROUP_ATT_UP);
}
else
{
DelThrusterGroup(THGROUP_ATT_UP);
}
//DOWN
a = 0;
if (OAMS && EquipmentSectionAvailable())
{
thT[a++] = thOAMS100[5]; //THRUSTER 16
}
if (a > 0)
{
CreateThrusterGroup(thT, a, THGROUP_ATT_DOWN);
}
else
{
DelThrusterGroup(THGROUP_ATT_DOWN);
}
}
void GEMINI::CreateOAMSThrusters()
{
thOAMS25[0] = CreateThruster(OAMS_THRUSTER1_POS + COG_OFFSET_FULL, OAMS_THRUSTER1_DIR, OAMS25_THRUST, phOAMS, RCS_ISP0, RCS_ISPSL);
thOAMS25[1] = CreateThruster(OAMS_THRUSTER2_POS + COG_OFFSET_FULL, OAMS_THRUSTER2_DIR, OAMS25_THRUST, phOAMS, RCS_ISP0, RCS_ISPSL);
thOAMS25[2] = CreateThruster(OAMS_THRUSTER3_POS + COG_OFFSET_FULL, OAMS_THRUSTER3_DIR, OAMS25_THRUST, phOAMS, RCS_ISP0, RCS_ISPSL);
thOAMS25[3] = CreateThruster(OAMS_THRUSTER4_POS + COG_OFFSET_FULL, OAMS_THRUSTER4_DIR, OAMS25_THRUST, phOAMS, RCS_ISP0, RCS_ISPSL);
thOAMS25[4] = CreateThruster(OAMS_THRUSTER5_POS + COG_OFFSET_FULL, OAMS_THRUSTER5_DIR, OAMS25_THRUST, phOAMS, RCS_ISP0, RCS_ISPSL);
thOAMS25[5] = CreateThruster(OAMS_THRUSTER6_POS + COG_OFFSET_FULL, OAMS_THRUSTER6_DIR, OAMS25_THRUST, phOAMS, RCS_ISP0, RCS_ISPSL);
thOAMS25[6] = CreateThruster(OAMS_THRUSTER7_POS + COG_OFFSET_FULL, OAMS_THRUSTER7_DIR, OAMS25_THRUST, phOAMS, RCS_ISP0, RCS_ISPSL);
thOAMS25[7] = CreateThruster(OAMS_THRUSTER8_POS + COG_OFFSET_FULL, OAMS_THRUSTER8_DIR, OAMS25_THRUST, phOAMS, RCS_ISP0, RCS_ISPSL);
thOAMS100[0] = CreateThruster(OAMS_THRUSTER9_POS + COG_OFFSET_FULL, OAMS_THRUSTER9_DIR, OAMS100_THRUST, phOAMS, RCS_ISP0, RCS_ISPSL);
thOAMS100[1] = CreateThruster(OAMS_THRUSTER10_POS + COG_OFFSET_FULL, OAMS_THRUSTER10_DIR, OAMS100_THRUST, phOAMS, RCS_ISP0, RCS_ISPSL);
thOAMS85[0] = CreateThruster(OAMS_THRUSTER11_POS + COG_OFFSET_FULL, OAMS_THRUSTER11_DIR, OAMS85_THRUST, phOAMS, RCS_ISP0, RCS_ISPSL);
thOAMS85[1] = CreateThruster(OAMS_THRUSTER12_POS + COG_OFFSET_FULL, OAMS_THRUSTER12_DIR, OAMS85_THRUST, phOAMS, RCS_ISP0, RCS_ISPSL);
thOAMS100[2] = CreateThruster(OAMS_THRUSTER13_POS + COG_OFFSET_FULL, OAMS_THRUSTER13_DIR, OAMS100_THRUST, phOAMS, RCS_ISP0, RCS_ISPSL);
thOAMS100[3] = CreateThruster(OAMS_THRUSTER14_POS + COG_OFFSET_FULL, OAMS_THRUSTER14_DIR, OAMS100_THRUST, phOAMS, RCS_ISP0, RCS_ISPSL);
thOAMS100[4] = CreateThruster(OAMS_THRUSTER15_POS + COG_OFFSET_FULL, OAMS_THRUSTER15_DIR, OAMS100_THRUST, phOAMS, RCS_ISP0, RCS_ISPSL);
thOAMS100[5] = CreateThruster(OAMS_THRUSTER16_POS + COG_OFFSET_FULL, OAMS_THRUSTER16_DIR, OAMS100_THRUST, phOAMS, RCS_ISP0, RCS_ISPSL);
for (int i = 0; i < 8; ++i)
{
AddExhaust(thOAMS25[i], 1.5, 0.1);
}
for (int i = 0; i < 2; ++i)
{
AddExhaust(thOAMS85[i], 2.5, 0.2);
}
for (int i = 0; i < 6; ++i)
{
AddExhaust(thOAMS100[i], 3, 0.25);
}
SetDefaultPropellantResource(phOAMS);
}
void GEMINI::CreateRCSThrustersA()
{
thRCS_A[0] = CreateThruster(THRUSTER1_POS + OFFSET_SYSTEM_A + COG_OFFSET_FULL, THRUSTER1_DIR, RCS_THRUST, phRCS_A, RCS_ISP0, RCS_ISPSL);
thRCS_A[1] = CreateThruster(THRUSTER2_POS + OFFSET_SYSTEM_A + COG_OFFSET_FULL, THRUSTER2_DIR, RCS_THRUST, phRCS_A, RCS_ISP0, RCS_ISPSL);
thRCS_A[2] = CreateThruster(THRUSTER3_POS + OFFSET_SYSTEM_A + COG_OFFSET_FULL, THRUSTER3_DIR, RCS_THRUST, phRCS_A, RCS_ISP0, RCS_ISPSL);
thRCS_A[3] = CreateThruster(THRUSTER4_POS + OFFSET_SYSTEM_A + COG_OFFSET_FULL, THRUSTER4_DIR, RCS_THRUST, phRCS_A, RCS_ISP0, RCS_ISPSL);
thRCS_A[4] = CreateThruster(THRUSTER5_POS + OFFSET_SYSTEM_A + COG_OFFSET_FULL, THRUSTER5_DIR, RCS_THRUST, phRCS_A, RCS_ISP0, RCS_ISPSL);
thRCS_A[5] = CreateThruster(THRUSTER6_POS + OFFSET_SYSTEM_A + COG_OFFSET_FULL, THRUSTER6_DIR, RCS_THRUST, phRCS_A, RCS_ISP0, RCS_ISPSL);
thRCS_A[6] = CreateThruster(THRUSTER7_POS + OFFSET_SYSTEM_A + COG_OFFSET_FULL, THRUSTER7_DIR, RCS_THRUST, phRCS_A, RCS_ISP0, RCS_ISPSL);
thRCS_A[7] = CreateThruster(THRUSTER8_POS + OFFSET_SYSTEM_A + COG_OFFSET_FULL, THRUSTER8_DIR, RCS_THRUST, phRCS_A, RCS_ISP0, RCS_ISPSL);
for (int i = 0; i < 8; ++i)
{
AddExhaust(thRCS_A[i], 1.5, 0.1);
}
}
void GEMINI::CreateRCSThrustersB()
{
thRCS_B[0] = CreateThruster(THRUSTER1_POS + OFFSET_SYSTEM_B + COG_OFFSET_FULL, THRUSTER1_DIR, RCS_THRUST, phRCS_B, RCS_ISP0, RCS_ISPSL);
thRCS_B[1] = CreateThruster(THRUSTER2_POS + OFFSET_SYSTEM_B + COG_OFFSET_FULL, THRUSTER2_DIR, RCS_THRUST, phRCS_B, RCS_ISP0, RCS_ISPSL);
thRCS_B[2] = CreateThruster(THRUSTER3_POS + OFFSET_SYSTEM_B + COG_OFFSET_FULL, THRUSTER3_DIR, RCS_THRUST, phRCS_B, RCS_ISP0, RCS_ISPSL);
thRCS_B[3] = CreateThruster(THRUSTER4_POS + OFFSET_SYSTEM_B + COG_OFFSET_FULL, THRUSTER4_DIR, RCS_THRUST, phRCS_B, RCS_ISP0, RCS_ISPSL);
thRCS_B[4] = CreateThruster(THRUSTER5_POS + OFFSET_SYSTEM_B + COG_OFFSET_FULL, THRUSTER5_DIR, RCS_THRUST, phRCS_B, RCS_ISP0, RCS_ISPSL);
thRCS_B[5] = CreateThruster(THRUSTER6_POS + OFFSET_SYSTEM_B + COG_OFFSET_FULL, THRUSTER6_DIR, RCS_THRUST, phRCS_B, RCS_ISP0, RCS_ISPSL);
thRCS_B[6] = CreateThruster(THRUSTER7_POS + OFFSET_SYSTEM_B + COG_OFFSET_FULL, THRUSTER7_DIR, RCS_THRUST, phRCS_B, RCS_ISP0, RCS_ISPSL);
thRCS_B[7] = CreateThruster(THRUSTER8_POS + OFFSET_SYSTEM_B + COG_OFFSET_FULL, THRUSTER8_DIR, RCS_THRUST, phRCS_B, RCS_ISP0, RCS_ISPSL);
for (int i = 0; i < 8; ++i)
{
AddExhaust(thRCS_B[i], 1.5, 0.1);
}
}