Skip to content

Commit

Permalink
Update RTCC MFD manual for TLI processor; add error messages to the o…
Browse files Browse the repository at this point in the history
…nline monitor and check if the SFP is valid for the calculation
  • Loading branch information
indy91 committed Sep 24, 2024
1 parent 6cfccbe commit e49445c
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 47 deletions.
Binary file modified Doc/Project Apollo - NASSP/RTCC/ApolloRTCCMFD.pdf
Binary file not shown.
48 changes: 46 additions & 2 deletions Doc/Project Apollo - NASSP/RTCC/ApolloRTCCMFD.tex
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,56 @@ \subsubsection{Buttons}
\textbf{CLC:} Calculate the maneuver.\\
\textbf{MPT:} Create finite maneuver from impulsive burn.\\
\textbf{BCK:} Go back to the main menu.\\

\newpage
\subsection{TLI Planning}
\subsubsection{Introduction}
On a typical lunar mission all the targeting needed for TLI has been loaded into the Saturn computer (LVDC) before launch. For a dispersed Earth orbit or an alternative mission the RTCC has the capability to target a new TLI or an alternative second S-IVB burn. The options available in the TLI processor are

\begin{enumerate}
\item S-IVB hypersurface solution. Evaluates the preloaded targeting in the LVDC
\item Integrated free-return trajectory to the nominal lunar flyby conditions
\item Specified total Delta V
\item Specified apogee altitude
\item Integrated non-free return trajectory to the nominal nodal position at the Moon
\end{enumerate}

To be determined.\\
\subsubsection{Inputs}
\textbf{IU:} Select the vessel that is used for the uplink of the updated TLI targeting. In non-MPT mode also used as the vessel from which the state vector and weights are taken for the TLI processor calculation.\\
\textbf{MPT:} Select CSM or LM mission plan table (MPT mode only).\\
\textbf{VEC:} Select the state vector used in the calculation. Normally the anchor vector of the CSM or LM ephemeris is used, but any vector in the useable vector table can be specified (MPT mode only).\\
\textbf{Opp:} Select the TLI opportunity. For option 1 this is the input to choose when the TLI is done and for all options this changes certain parameters associated with one of the opportunities in the LVDC, mostly the time of S-IVB mixture ratio shift from ignition.\\
\textbf{Mode:} Choose the TLI processor calculation mode, see list above.\\
\textbf{TIG:} Time of ignition. Not used for option 1. Used as a very rough initial guess in option 2 and 5, that only has to be accurate to a full orbit. In options 3 and 4 this is the exact time of ignition used.\\
\textbf{DV:} Delta V of the maneuver (option 3 only).\\
\textbf{APO:} Apogee altitude to be achieved by the maneuver (option 4 only).\\
\textbf{Window:} Pacific or Atlantic TLI window, for the lunar mission options (2 and 5) this is used to generate the initial guess.\\
\textbf{SFP:} For the lunar mission options (2 and 5) the target parameters are taken from the Skeleton Flight Plan table, which has two sets of data. See the Midcourse Correction Processor for more details about the SFP.\\

\textbf{CLC:} Calculate solution.\\
\textbf{MPT:} Transfer maneuver to MPT.\\
\textbf{UPL:} Uplink solution to IU.\\
\newpage
\subsubsection{Display}

\begin{figure}[hp]
\centering
\includegraphics{./ApolloRTCCMFDFiles/TLIProcessorDisplayExample.png}
\caption{TLI Planning Display}
\label{fig:TLIProcessorDisplayExample}
\end{figure}

\textbf{Display Parameters}\\

\textbf{GET RP:} Ground Elapsed Time of Restart Preparations (TB6)\\
\textbf{GET TIG:} Ground Elapsed Time of main engine ignition\\
\textbf{INCL:} Inclination at cutoff\\
\textbf{DESC:} Longitude of the descending node at cutoff\\
\textbf{ECC:} Eccentricity at cutoff\\
\textbf{C3:} Orbital energy at cutoff\\
\textbf{ALPHA:} Angle from perigee of cutoff ellipse to descending node of cutoff ellipse\\
\textbf{TA:} True anomaly at cutoff\\
\textbf{BT:} Burn time of maneuver\\
\newpage
\subsection{Midcourse Correction Processor}

\subsubsection{Introduction}
Expand Down
75 changes: 60 additions & 15 deletions Orbitersdk/samples/ProjectApollo/src_launch/rtcc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6130,12 +6130,20 @@ void RTCC::TranslunarInjectionProcessor(bool mpt, EphemerisData *sv, PLAWDTOutpu
else
{
int val = GetStateVectorTableEntry(PZTLIPLN.VectorType, PZTLIPLN.mpt);
if (val < 0) return;
if (val < 0)
{
PMXSPT("PMMEPP", 300);
return;
}

medquant.state = BZUSEVEC.data[val].Vector;
}

if (medquant.state.GMT == 0.0) return;
if (medquant.state.GMT == 0.0)
{
PMXSPT("PMMEPP", 300);
return;
}

//Get weight
PLAWDTInput inp;
Expand Down Expand Up @@ -6163,19 +6171,31 @@ void RTCC::TranslunarInjectionProcessor(bool mpt, EphemerisData *sv, PLAWDTOutpu
medquant.IPOA = PZTLIPLN.IsPacficWindow ? 1 : 2;
medquant.Opportunity = PZTLIPLN.Opportunity;

if (PZTLIPLN.Mode == 2)
{
//Free return
medquant.h_PC = PZSFPTAB.blocks[PZMCCPLN.SFPBlockNum - 1].h_pc1;
medquant.lat_PC = PZSFPTAB.blocks[PZMCCPLN.SFPBlockNum - 1].lat_pc1;
}
else if (PZTLIPLN.Mode == 5)
if (PZTLIPLN.Mode == 2 || PZTLIPLN.Mode == 5)
{
//Non-free return
medquant.h_PC = PZSFPTAB.blocks[PZMCCPLN.SFPBlockNum - 1].h_nd;
medquant.lat_PC = PZSFPTAB.blocks[PZMCCPLN.SFPBlockNum - 1].lat_nd;
medquant.lng_node = PZSFPTAB.blocks[PZMCCPLN.SFPBlockNum - 1].lng_nd;
medquant.GMT_node = PZSFPTAB.blocks[PZMCCPLN.SFPBlockNum - 1].GMT_nd;
TLMCCDataTable *tab = &PZSFPTAB.blocks[PZMCCPLN.SFPBlockNum - 1];

//Error return if SFP is not loaded
if (tab->GMTTimeFlag == 0.0)
{
PMXSPT("PMMEPP", 302);
return;
}

if (PZTLIPLN.Mode == 2)
{
//Free return
medquant.h_PC = tab->h_pc1;
medquant.lat_PC = tab->lat_pc1;
}
else
{
//Non-free return
medquant.h_PC = tab->h_nd;
medquant.lat_PC = tab->lat_nd;
medquant.lng_node = tab->lng_nd;
medquant.GMT_node = tab->GMT_nd;
}
}

mccconst.delta = PZTLIPLN.DELTA;
Expand All @@ -6186,7 +6206,12 @@ void RTCC::TranslunarInjectionProcessor(bool mpt, EphemerisData *sv, PLAWDTOutpu
tli.Init(medquant, mccconst, GetGMTBase());
tli.Main(out);

if (out.ErrorIndicator) return;
if (out.ErrorIndicator)
{
RTCCONLINEMON.IntBuffer[0] = out.ErrorIndicator;
PMXSPT("PMMEPP", 301);
return;
}

//Output table
PZTTLIPL.DataIndicator = 1;
Expand Down Expand Up @@ -6219,6 +6244,16 @@ void RTCC::TranslunarMidcourseCorrectionProcessor(EphemerisData sv0, double CSMm

datatab = PZSFPTAB.blocks[PZMCCPLN.SFPBlockNum - 1];

//TBD: Some old scenarios have a filled SFP, but GMTTimeFlag is zero
/*
//Error return if SFP is not loaded
if (datatab.GMTTimeFlag == 0.0)
{
PMXSPT("PMMLCP", 302);
return;
}
*/

medquant.Mode = PZMCCPLN.Mode;
medquant.Config = PZMCCPLN.Config;
medquant.T_MCC = GMTfromGET(PZMCCPLN.MidcourseGET);
Expand Down Expand Up @@ -14209,6 +14244,16 @@ void RTCC::PMXSPT(std::string source, int n)
case 201:
message.push_back(RTCCONLINEMON.TextBuffer[0]);
break;
case 300:
message.push_back("VECTOR NOT AVAILABLE");
break;
case 301:
sprintf_s(Buffer, "COMPUTATION FAILED WITH ERROR CODE %d", RTCCONLINEMON.IntBuffer[0]);
message.push_back(Buffer);
break;
case 302:
message.push_back("SKELETON FLIGHT PLAN TABLE NOT AVAILABLE");
break;
default:
return;
}
Expand Down
2 changes: 2 additions & 0 deletions Orbitersdk/samples/ProjectApollo/src_launch/rtcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -2490,7 +2490,9 @@ class RTCC {
MATRIX3 REFSMMATCalc(REFSMMATOpt *opt);
void EntryTargeting(EntryOpt *opt, EntryResults *res);//VECTOR3 &dV_LVLH, double &P30TIG, double &latitude, double &longitude, double &GET05G, double &RTGO, double &VIO, double &ReA, int &precision);
void BlockDataProcessor(EarthEntryOpt *opt, EntryResults *res);
//RTCC module name PMMEPP
void TranslunarInjectionProcessor(bool mpt, EphemerisData *sv = NULL, PLAWDTOutput *WeightsTable = NULL);
//RTCC module name PMMLCP
void TranslunarMidcourseCorrectionProcessor(EphemerisData sv0, double CSMmass, double LMmass);
int LunarDescentPlanningProcessor(EphemerisData sv, double W_LM);
bool GeneralManeuverProcessor(GMPOpt *opt, VECTOR3 &dV_i, double &P30TIG);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,7 @@ bool ApolloRTCCMFD::Update(oapi::Sketchpad *skp)
skp->Text(6 * W / 8, 4 * H / 14, Buffer, strlen(Buffer));
}
break;
}

//Old
if (screen == 2)
{
case 2:
skp->SetTextAlign(oapi::Sketchpad::CENTER);
skp->Text(4 * W / 8, 2 * H / 32, "TWO IMPULSE MULTIPLE SOLUTION (MSK 0063)", 40);

Expand Down Expand Up @@ -218,11 +214,11 @@ bool ApolloRTCCMFD::Update(oapi::Sketchpad *skp)
skp->Text(49 * W / 64, 11 * H / 32, "YAW", 3);
skp->Text(28 * W / 32, 11 * H / 32, "PITCH", 5);
}

skp->Text(60 * W / 64, 11 * H / 32, "L", 1);
skp->Text(63 * W / 64, 11 * H / 32, "C", 1);
for (int i = 0;i < GC->rtcc->TwoImpMultDispBuffer.Solutions;i++)

for (int i = 0; i < GC->rtcc->TwoImpMultDispBuffer.Solutions; i++)
{
sprintf(Buffer, "%.2lf", GC->rtcc->TwoImpMultDispBuffer.data[i].DELV1);
skp->Text(5 * W / 32, (12 + i) * H / 32, Buffer, strlen(Buffer));
Expand All @@ -246,15 +242,14 @@ bool ApolloRTCCMFD::Update(oapi::Sketchpad *skp)
sprintf(Buffer, "%.2lf", GC->rtcc->TwoImpMultDispBuffer.data[i].PITCH2);
skp->Text(57 * W / 64, (12 + i) * H / 32, Buffer, strlen(Buffer));
}

sprintf(Buffer, "%c", GC->rtcc->TwoImpMultDispBuffer.data[i].L);
skp->Text(60 * W / 64, (12 + i) * H / 32, Buffer, strlen(Buffer));
sprintf(Buffer, "%d", GC->rtcc->TwoImpMultDispBuffer.data[i].C);
skp->Text(63 * W / 64, (12 + i) * H / 32, Buffer, strlen(Buffer));
}
}
else if (screen == 3)
{
break;
case 3:
skp->Text(6 * W / 8, (int)(0.5 * H / 14), "Coelliptic", 10);

skp->Text(1 * W / 16, 2 * H / 14, "SPQ Initialization", 18);
Expand Down Expand Up @@ -371,8 +366,11 @@ bool ApolloRTCCMFD::Update(oapi::Sketchpad *skp)
skp->Text(6 * W / 8, 17 * H / 21, Buffer, strlen(Buffer));
AGC_Display(Buffer, G->SPQDeltaV.z / 0.3048);
skp->Text(6 * W / 8, 18 * H / 21, Buffer, strlen(Buffer));
break;
}
else if (screen == 4)

//Old
if (screen == 4)
{
skp->Text(4 * W / 8, (int)(0.5 * H / 14), "General Purpose Maneuver", 24);

Expand Down Expand Up @@ -7197,43 +7195,36 @@ bool ApolloRTCCMFD::Update(oapi::Sketchpad *skp)
}
else
{
sprintf(Buffer, "2 (Nominal Targets)");
sprintf(Buffer, "2 (Nominal)");
}
skp->Text(5 * W / 22, 10 * H / 22, Buffer, strlen(Buffer));

/*
if (GC->rtcc->PZTLIPLN.Mode == 2)
{
skp->Text(1 * W / 16, 11 * H / 14, "Pericynthion:", 13);
skp->Text(5 * W / 22, 12 * H / 22, "Pericynthion:", 13);

sprintf_s(Buffer, "Lat %.3lf", GC->rtcc->PZSFPTAB.blocks[GC->rtcc->PZMCCPLN.SFPBlockNum - 1].lat_pc1 * DEG);
skp->Text(1 * W / 16, 24 * H / 28, Buffer, strlen(Buffer));
skp->Text(5 * W / 22, 13 * H / 22, Buffer, strlen(Buffer));

sprintf_s(Buffer, "Height %.3lf", GC->rtcc->PZSFPTAB.blocks[GC->rtcc->PZMCCPLN.SFPBlockNum - 1].h_pc1 / 1852.0);
skp->Text(1 * W / 16, 25 * H / 28, Buffer, strlen(Buffer));
skp->Text(5 * W / 22, 14 * H / 22, Buffer, strlen(Buffer));
}
else
{
skp->Text(1 * W / 16, 11 * H / 14, "Node:", 5);
skp->Text(5 * W / 22, 12 * H / 22, "Node:", 5);

GET_Display2(Buffer, GC->rtcc->PZSFPTAB.blocks[GC->rtcc->PZMCCPLN.SFPBlockNum - 1].GMT_nd);
skp->Text(1 * W / 16, 24 * H / 28, Buffer, strlen(Buffer));
skp->Text(5 * W / 22, 13 * H / 22, Buffer, strlen(Buffer));

sprintf_s(Buffer, "Lat %.3lf", GC->rtcc->PZSFPTAB.blocks[GC->rtcc->PZMCCPLN.SFPBlockNum - 1].lat_nd * DEG);
skp->Text(1 * W / 16, 25 * H / 28, Buffer, strlen(Buffer));
skp->Text(5 * W / 22, 14 * H / 22, Buffer, strlen(Buffer));

sprintf_s(Buffer, "Lng %.3lf", GC->rtcc->PZSFPTAB.blocks[GC->rtcc->PZMCCPLN.SFPBlockNum - 1].lng_nd * DEG);
skp->Text(1 * W / 16, 26 * H / 28, Buffer, strlen(Buffer));
skp->Text(5 * W / 22, 15 * H / 22, Buffer, strlen(Buffer));

sprintf_s(Buffer, "Height %.3lf", GC->rtcc->PZSFPTAB.blocks[GC->rtcc->PZMCCPLN.SFPBlockNum - 1].h_nd / 1852.0);
skp->Text(1 * W / 16, 27 * H / 28, Buffer, strlen(Buffer));


GC->rtcc->PZSFPTAB.blocks[GC->rtcc->PZMCCPLN.SFPBlockNum - 1].GMT_nd;
GC->rtcc->PZSFPTAB.blocks[GC->rtcc->PZMCCPLN.SFPBlockNum - 1].lat_nd;
GC->rtcc->PZSFPTAB.blocks[GC->rtcc->PZMCCPLN.SFPBlockNum - 1].lng_nd;
GC->rtcc->PZSFPTAB.blocks[GC->rtcc->PZMCCPLN.SFPBlockNum - 1].h_nd;
}*/
skp->Text(5 * W / 22, 16 * H / 22, Buffer, strlen(Buffer));
}
}

skp->Text(9 * W / 16, 4 * H / 14, "GET RP", 6);
Expand Down Expand Up @@ -10761,6 +10752,7 @@ bool ApolloRTCCMFD::Update(oapi::Sketchpad *skp)
sprintf(Buffer, "MGA: %+.2lf�", G->IMUParkingAngles.z * DEG);
skp->Text(10 * W / 16, 8 * H / 14, Buffer, strlen(Buffer));
}

return true;
}

Expand Down

0 comments on commit e49445c

Please sign in to comment.