From 2c00f5caafc2915c2ba8da6419b5f4e8fbff92d8 Mon Sep 17 00:00:00 2001 From: indy91 Date: Wed, 7 Jan 2026 17:33:23 +0100 Subject: [PATCH 1/2] Fix burn parameters type 3 (IMU) and 4 (LVLH) for MPT direct input maneuvers --- .../samples/ProjectApollo/src_launch/rtcc.cpp | 45 +++++++++++++++++-- .../samples/ProjectApollo/src_launch/rtcc.h | 4 +- .../src_rtccmfd/ApolloRTCCMFD_Display.cpp | 2 +- 3 files changed, 44 insertions(+), 7 deletions(-) diff --git a/Orbitersdk/samples/ProjectApollo/src_launch/rtcc.cpp b/Orbitersdk/samples/ProjectApollo/src_launch/rtcc.cpp index 7b418a8850..c910c6e93e 100644 --- a/Orbitersdk/samples/ProjectApollo/src_launch/rtcc.cpp +++ b/Orbitersdk/samples/ProjectApollo/src_launch/rtcc.cpp @@ -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); @@ -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; @@ -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); } @@ -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 @@ -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) { @@ -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); } diff --git a/Orbitersdk/samples/ProjectApollo/src_launch/rtcc.h b/Orbitersdk/samples/ProjectApollo/src_launch/rtcc.h index 522d0cff80..3392521d83 100644 --- a/Orbitersdk/samples/ProjectApollo/src_launch/rtcc.h +++ b/Orbitersdk/samples/ProjectApollo/src_launch/rtcc.h @@ -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; diff --git a/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApolloRTCCMFD_Display.cpp b/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApolloRTCCMFD_Display.cpp index f757db6da3..7d53ef1a37 100644 --- a/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApolloRTCCMFD_Display.cpp +++ b/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApolloRTCCMFD_Display.cpp @@ -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) { From 89ea9aad1737e5edf917b5ea28dc7066ab15acfb Mon Sep 17 00:00:00 2001 From: indy91 Date: Tue, 13 Jan 2026 17:28:14 +0100 Subject: [PATCH 2/2] RTCC MFD: Fix map update MFD button descriptions --- .../samples/ProjectApollo/src_rtccmfd/ApollomfdButtons.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApollomfdButtons.cpp b/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApollomfdButtons.cpp index 084913d937..f22b2695a4 100644 --- a/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApollomfdButtons.cpp +++ b/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApollomfdButtons.cpp @@ -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, ' ' },