Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 41 additions & 4 deletions Orbitersdk/samples/ProjectApollo/src_launch/rtcc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15407,7 +15407,7 @@ int RTCC::PMMMCD(PMMMCDInput in, MPTManeuver &man)
RTCC_PMMMCD_6_1:
Thrust = GetOnboardComputerThrust(in.Thruster);
Ind = 0;
ExtDV = PIEXDV(sv_GMTI.R, sv_GMTI.V, in.WTMI, Thrust, _V(in.BurnParm75, in.BurnParm76, in.BurnParm77), EXDVIND);
ExtDV = PIEXDV(sv_GMTI.R, sv_GMTI.V, in.WTMI, Thrust, ExtDV, EXDVIND);
goto RTCC_PMMMCD_7_3;
RTCC_PMMMCD_6_2:
PMMMCDCallEMSMISS(in.sv_anchor, GMT_begin, sv_GMTI);
Expand All @@ -15425,8 +15425,8 @@ int RTCC::PMMMCD(PMMMCDInput in, MPTManeuver &man)
if (J != 0)
{
man.dV_inertial = ExtDV;
goto RTCC_PMMMCD_12_1;
}
goto RTCC_PMMMCD_12_1;
RTCC_PMMMCD_7_2:
man.dV_LVLH = ExtDV;
goto RTCC_PMMMCD_12_1;
Expand Down Expand Up @@ -15509,8 +15509,8 @@ int RTCC::PMMMCD(PMMMCDInput in, MPTManeuver &man)
}
goto RTCC_PMMMCD_B;
}
double dv = length(DV_A);
if (dv > 1e-10)
in.BurnParm72 = length(DV_A);
if (in.BurnParm72 > 1e-10)
{
man.A_T = unit(DV_A);
}
Expand Down Expand Up @@ -21691,6 +21691,18 @@ int RTCC::PMMXFR(int id, void *data)
BurnParm76 = PZBURN.P2_DV.y;
BurnParm77 = PZBURN.P2_DV.z;
}
else if (inp->BurnParameterNumber == 3)
{
BurnParm75 = PZBURN.P3_DV.x;
BurnParm76 = PZBURN.P3_DV.y;
BurnParm77 = PZBURN.P3_DV.z;
}
else if (inp->BurnParameterNumber == 4)
{
BurnParm75 = PZBURN.P4_DV.x;
BurnParm76 = PZBURN.P4_DV.y;
BurnParm77 = PZBURN.P4_DV.z;
}
BPIND = inp->BurnParameterNumber;
}
//TLI
Expand Down Expand Up @@ -21800,6 +21812,30 @@ int RTCC::PMMXFR(int id, void *data)
man.code = code;

//TBD: Is this a TLI maneuver?
//Check weight at maneuver initiation
double WTMI;
unsigned int prevman;
//Set weight at maneuver initiation = weight prior to maneuver
if (inp->ReplaceCode > 0)
{
prevman = inp->ReplaceCode - 1;
}
else
{
prevman = mpt->ManeuverNum;
}
if (prevman > 0)
{
WTMI = mpt->mantable[prevman - 1].TotalMassAfter;
}
else
{
WTMI = mpt->TotalInitMass;
}
if (inp->ConfigurationChangeIndicator == RTCC_CONFIGCHANGE_UNDOCKING)
{
// TBD: Load weight of remaining S/C and store as weight at maneuver initiation
}

if (inp->AttitudeCode == RTCC_ATTITUDE_SIVB_IGM)
{
Expand Down Expand Up @@ -21889,6 +21925,7 @@ int RTCC::PMMXFR(int id, void *data)
in.Pitch = inp->Pitch;
in.Yaw = inp->Yaw;
in.Roll = inp->Roll;
in.WTMI = WTMI;

err = PMMMCD(in, man);
}
Expand Down
4 changes: 2 additions & 2 deletions Orbitersdk/samples/ProjectApollo/src_launch/rtcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1599,14 +1599,14 @@ struct PMMMCDInput
{
double GMTI;
int Thruster;
int Attitude;
int Attitude; //1 = Fixed inertial, 2 = manual holding body orientation invariant, 3 = Lambert, 4 = PGNS External DV, 5 = AGS External DV
double dt_ullage;
int ConfigChangeInd;
int ConfigCodeAfter;
int TVC;
double DockingAngle;
std::bitset<4> CCMI;
int BPIND;
int BPIND; //1 = DV or DT, 2 = External DV, 3 = IMU, 4 = LVLH, 5 = Lambert, 6 = lunar ascent
int ID;
bool UllageThrusterOpt;
double DT_10PCT;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4623,7 +4623,7 @@ bool ApolloRTCCMFD::Update(oapi::Sketchpad *skp)
sprintf(Buffer, "%06.2f�P %06.2f�Y %06.2f�R", GC->rtcc->med_m66.Att.x*DEG, GC->rtcc->med_m66.Att.y*DEG, GC->rtcc->med_m66.Att.z*DEG);
skp->Text(W - CW, 3 * H / 14, Buffer, strlen(Buffer));
}
if (GC->rtcc->med_m66.AttitudeOpt >= 3)
if (GC->rtcc->med_m66.BurnParamNo > 1)
{
if (GC->rtcc->med_m66.HeadsUp)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,14 +381,14 @@ ApolloRTCCMFDButtons::ApolloRTCCMFDButtons()

static const MFDBUTTONMENU mnu11[] =
{
{ "CSM or LM", 0, 'P' },
{ "GET for anchor vector", 0, 'G' },
{ "Prime meridian", 0, 'D' },
{ "", 0, ' ' },
{ "", 0, ' ' },
{ "", 0, ' ' },
{ "", 0, ' ' },

{ "Select CSM or LM", 0, 'E' },
{ "Select vessel", 0, 'E' },
{ "Earth or Moon", 0, 'V' },
{ "Calc Map Update", 0, 'C' },
{ "", 0, ' ' },
Expand Down