From fcf62254ad65d2e50c5739a00554d489fe97e41a Mon Sep 17 00:00:00 2001 From: indy91 Date: Sun, 16 Jun 2024 14:06:38 +0200 Subject: [PATCH 1/7] Apollo 10 MCC: Map update format and CMC V66s --- .../ProjectApollo/src_launch/MCCPADForms.h | 3 +- .../src_launch/RTCC_Mission_F.cpp | 62 ++++++++++--------- .../samples/ProjectApollo/src_launch/mcc.cpp | 30 ++++++--- 3 files changed, 56 insertions(+), 39 deletions(-) diff --git a/Orbitersdk/samples/ProjectApollo/src_launch/MCCPADForms.h b/Orbitersdk/samples/ProjectApollo/src_launch/MCCPADForms.h index ce7ce406a3..e1cbbc8db9 100644 --- a/Orbitersdk/samples/ProjectApollo/src_launch/MCCPADForms.h +++ b/Orbitersdk/samples/ProjectApollo/src_launch/MCCPADForms.h @@ -324,7 +324,8 @@ struct AP10MAPUPDATE double SSGET2; //Time of sunset for a second rev (type = 3) double PMGET2; //Time of meridian crossing (150° or 180°W) for a second rev (type = 3) double AOSGET2; //Time of AOS for a second rev (type = 3) or taking LOI into account (type = 2) or TEI (type = 5) - int type; //0 = Only LOS/AOS and PM, 1 = Display all parameters, 2 = LOS, AOS with and AOS without LOI, 3 = Like 1 but for two revs, 4 = Like 0 but shows 180° instead of PM, 5 = like 2 but for TEI + //0 = Only LOS/AOS and PM, 1 = Display all parameters, 2 = LOS, AOS with and AOS without LOI, 3 = Like 1 but for two revs, 4 = Like 0 but shows 180° instead of PM, + int type; //5 = like 2 but for TEI, 6 = like 0 but shows 150° instead of PM, 7 = LOS, AOS w/ TEI, AOS w/o TEI }; // APOLLO 11 LANDMARK TRACKING PAD diff --git a/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp b/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp index 34bda07453..e7f14511d3 100644 --- a/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp +++ b/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp @@ -485,9 +485,9 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc char buffer1[1000]; sprintf(upMessage, "%s has been scrubbed.", manname); - sprintf(upDesc, "CSM state vector"); + sprintf(upDesc, "CSM state vector and V66"); - AGCStateVectorUpdate(buffer1, RTCC_MPT_CSM, RTCC_MPT_CSM, sv); + AGCStateVectorUpdate(buffer1, RTCC_MPT_CSM, RTCC_MPT_CSM, sv, true); sprintf(uplinkdata, "%s", buffer1); if (upString != NULL) { @@ -512,14 +512,14 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc sprintf(form->purpose, manname); if (manopt.enginetype == RTCC_ENGINETYPE_CSMSPS) sprintf(form->remarks, "No ullage"); - AGCStateVectorUpdate(buffer1, RTCC_MPT_CSM, RTCC_MPT_CSM, sv); + AGCStateVectorUpdate(buffer1, RTCC_MPT_CSM, RTCC_MPT_CSM, sv, true); CMCExternalDeltaVUpdate(buffer2, P30TIG, dV_LVLH); sprintf(uplinkdata, "%s%s", buffer1, buffer2); if (upString != NULL) { // give to mcc strncpy(upString, uplinkdata, 1024 * 3); - sprintf(upDesc, "CSM state vector, target load"); + sprintf(upDesc, "CSM state vector and V66, target load"); } } } @@ -570,13 +570,13 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc calcParams.TEI = res.P30TIG; calcParams.EI = res.GET400K; - AGCStateVectorUpdate(buffer1, sv, true); + AGCStateVectorUpdate(buffer1, sv, true, true); sprintf(uplinkdata, "%s", buffer1); if (upString != NULL) { // give to mcc strncpy(upString, uplinkdata, 1024 * 3); - sprintf(upDesc, "CSM state vector"); + sprintf(upDesc, "CSM state vector and V66"); } } break; @@ -653,9 +653,9 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc char buffer1[1000]; sprintf(upMessage, "MCC-3 has been scrubbed"); - sprintf(upDesc, "CSM state vector"); + sprintf(upDesc, "CSM state vector and V66"); - AGCStateVectorUpdate(buffer1, RTCC_MPT_CSM, RTCC_MPT_CSM, sv_ephem); + AGCStateVectorUpdate(buffer1, RTCC_MPT_CSM, RTCC_MPT_CSM, sv_ephem, true); sprintf(uplinkdata, "%s", buffer1); if (upString != NULL) { @@ -685,14 +685,14 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc sprintf(form->purpose, "MCC-3"); if (manopt.enginetype == RTCC_ENGINETYPE_CSMSPS) sprintf(form->remarks, "No ullage"); - AGCStateVectorUpdate(buffer1, RTCC_MPT_CSM, RTCC_MPT_CSM, sv_ephem); + AGCStateVectorUpdate(buffer1, RTCC_MPT_CSM, RTCC_MPT_CSM, sv_ephem, true); CMCExternalDeltaVUpdate(buffer2, P30TIG, dV_LVLH); sprintf(uplinkdata, "%s%s", buffer1, buffer2); if (upString != NULL) { // give to mcc strncpy(upString, uplinkdata, 1024 * 3); - sprintf(upDesc, "CSM state vector, target load"); + sprintf(upDesc, "CSM state vector and V66, target load"); } } } @@ -764,7 +764,7 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc char buffer2[1000]; sprintf(upMessage, "MCC-4 has been scrubbed"); - sprintf(upDesc, "CSM state vector, Landing Site REFSMMAT"); + sprintf(upDesc, "CSM state vector and V66, Landing Site REFSMMAT"); AGCStateVectorUpdate(buffer1, RTCC_MPT_CSM, RTCC_MPT_CSM, sv, true); AGCDesiredREFSMMATUpdate(buffer2, REFSMMAT); @@ -813,7 +813,7 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc sprintf(form->purpose, "MCC-4"); if (engine == RTCC_ENGINETYPE_CSMSPS) sprintf(form->remarks, "No ullage"); - AGCStateVectorUpdate(buffer1, RTCC_MPT_CSM, RTCC_MPT_CSM, sv); + AGCStateVectorUpdate(buffer1, RTCC_MPT_CSM, RTCC_MPT_CSM, sv, true); CMCExternalDeltaVUpdate(buffer2, P30TIG, dV_LVLH); AGCDesiredREFSMMATUpdate(buffer3, REFSMMAT); @@ -821,7 +821,7 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc if (upString != NULL) { // give to mcc strncpy(upString, uplinkdata, 1024 * 3); - sprintf(upDesc, "CSM state vector, target load, Landing Site REFSMMAT"); + sprintf(upDesc, "CSM state vector and V66, target load, Landing Site REFSMMAT"); } } } @@ -944,14 +944,14 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc char buffer1[1000]; char buffer2[1000]; - AGCStateVectorUpdate(buffer1, RTCC_MPT_CSM, RTCC_MPT_CSM, sv); + AGCStateVectorUpdate(buffer1, RTCC_MPT_CSM, RTCC_MPT_CSM, sv, true); CMCExternalDeltaVUpdate(buffer2, P30TIG, dV_LVLH); sprintf(uplinkdata, "%s%s", buffer1, buffer2); if (upString != NULL) { // give to mcc strncpy(upString, uplinkdata, 1024 * 3); - sprintf(upDesc, "CSM state vector, target load"); + sprintf(upDesc, "CSM state vector and V66, target load"); } } } @@ -995,14 +995,14 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc TimeofIgnition = P30TIG; DeltaV_LVLH = dV_LVLH; - AGCStateVectorUpdate(buffer1, sv, true); + AGCStateVectorUpdate(buffer1, sv, true, true); CMCExternalDeltaVUpdate(buffer2, P30TIG, dV_LVLH); sprintf(uplinkdata, "%s%s", buffer1, buffer2); if (upString != NULL) { // give to mcc strncpy(upString, uplinkdata, 1024 * 3); - sprintf(upDesc, "CSM state vector, target load"); + sprintf(upDesc, "CSM state vector and V66, target load"); } } break; @@ -1173,7 +1173,7 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc if (upString != NULL) { // give to mcc strncpy(upString, uplinkdata, 1024 * 3); - sprintf(upDesc, "State vectors, target load"); + sprintf(upDesc, "State vector and V66, target load"); } } } @@ -1195,6 +1195,7 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc sv2 = coast(sv1, -30.0*60.0); LunarOrbitMapUpdate(sv2, upd_ellip); + form->type = 6; form->Rev = 1; form->AOSGET = upd_ellip.AOSGET; form->LOSGET = upd_hyper.LOSGET; @@ -1234,6 +1235,7 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc } LunarOrbitMapUpdate(sv1, *form); + form->type = 6; if (fcn == 41) { @@ -1285,6 +1287,7 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc ExecuteManeuver(sv0, WeightsTable, TimeofIgnition, DeltaV_LVLH, RTCC_ENGINETYPE_CSMSPS, sv1, WeightsTable2); LunarOrbitMapUpdate(sv1, upd_postloi); + form->type = 6; form->Rev = 3; form->AOSGET = upd_postloi.AOSGET; form->LOSGET = upd_preloi.LOSGET; @@ -1308,10 +1311,11 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc LunarOrbitMapUpdate(sv1, upd_posttei); + form->type = 7; form->Rev = 32; - form->AOSGET = upd_posttei.AOSGET; + form->AOSGET = upd_pretei.AOSGET; + form->AOSGET2 = upd_posttei.AOSGET; form->LOSGET = upd_pretei.LOSGET; - form->PMGET = upd_pretei.PMGET; } break; case 50: //REV 4 LANDMARK TRACKING PAD F-1 @@ -2219,9 +2223,9 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc char buffer2[1000]; sprintf(upMessage, "%s has been scrubbed", manname); - sprintf(upDesc, "CSM state vector, entry target"); + sprintf(upDesc, "CSM state vector and V66, entry target"); - AGCStateVectorUpdate(buffer1, sv, true); + AGCStateVectorUpdate(buffer1, sv, true, true); CMCEntryUpdate(buffer2, res.latitude, res.longitude); sprintf(uplinkdata, "%s%s", buffer1, buffer2); @@ -2243,9 +2247,9 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc char buffer3[1000]; sprintf(upMessage, "%s has been scrubbed", manname); - sprintf(upDesc, "CSM state vector, entry target, Entry REFSMMAT"); + sprintf(upDesc, "CSM state vector and V66, entry target, Entry REFSMMAT"); - AGCStateVectorUpdate(buffer1, sv, true); + AGCStateVectorUpdate(buffer1, sv, true, true); CMCEntryUpdate(buffer2, res.latitude, res.longitude); AGCDesiredREFSMMATUpdate(buffer3, REFSMMAT); @@ -2264,14 +2268,14 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc char buffer1[1000]; char buffer2[1000]; - AGCStateVectorUpdate(buffer1, sv, true); + AGCStateVectorUpdate(buffer1, sv, true, true); CMCRetrofireExternalDeltaVUpdate(buffer2, res.latitude, res.longitude, res.P30TIG, res.dV_LVLH); sprintf(uplinkdata, "%s%s", buffer1, buffer2); if (upString != NULL) { // give to mcc strncpy(upString, uplinkdata, 1024 * 3); - sprintf(upDesc, "CSM state vector, target load"); + sprintf(upDesc, "CSM state vector and V66, target load"); } } //MCC-7 decision @@ -2286,7 +2290,7 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc char buffer2[1000]; char buffer3[1000]; - AGCStateVectorUpdate(buffer1, sv, true); + AGCStateVectorUpdate(buffer1, sv, true, true); CMCRetrofireExternalDeltaVUpdate(buffer2, res.latitude, res.longitude, res.P30TIG, res.dV_LVLH); AGCDesiredREFSMMATUpdate(buffer3, REFSMMAT); @@ -2294,7 +2298,7 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc if (upString != NULL) { // give to mcc strncpy(upString, uplinkdata, 1024 * 3); - sprintf(upDesc, "CSM state vector, target load, Entry REFSMMAT"); + sprintf(upDesc, "CSM state vector and V66, target load, Entry REFSMMAT"); } } } @@ -2378,7 +2382,7 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc if (upString != NULL) { // give to mcc strncpy(upString, uplinkdata, 1024 * 3); - sprintf(upDesc, "State vectors, entry update"); + sprintf(upDesc, "State vector and V66, entry update"); } } } diff --git a/Orbitersdk/samples/ProjectApollo/src_launch/mcc.cpp b/Orbitersdk/samples/ProjectApollo/src_launch/mcc.cpp index 1e2304d2f2..c1a173716b 100644 --- a/Orbitersdk/samples/ProjectApollo/src_launch/mcc.cpp +++ b/Orbitersdk/samples/ProjectApollo/src_launch/mcc.cpp @@ -2924,10 +2924,22 @@ void MCC::drawPad(bool writetofile){ sprintf(buffer, "MAP UPDATE REV %d\n", form->Rev); OrbMech::SStoHHMMSS(form->LOSGET, hh, mm, ss); sprintf(buffer, "%sLOS: %d:%02d:%02.0f\n", buffer, hh, mm, ss); - if (form->type == 0) + if (form->type == 0 || form->type == 4 || form->type == 6) { OrbMech::SStoHHMMSS(form->PMGET, hh, mm, ss); - sprintf(buffer, "%sPM: %d:%02d:%02.0f\n", buffer, hh, mm, ss); + if (form->type == 0) + { + sprintf(buffer, "%sPM: %d:%02d:%02.0f\n", buffer, hh, mm, ss); + } + else if (form->type == 4) + { + sprintf(buffer, "%s180°: %d:%02d:%02.0f\n", buffer, hh, mm, ss); + } + else + { + sprintf(buffer, "%s150°: %d:%02d:%02.0f\n", buffer, hh, mm, ss); + } + OrbMech::SStoHHMMSS(form->AOSGET, hh, mm, ss); sprintf(buffer, "%sAOS: %d:%02d:%02.0f\n", buffer, hh, mm, ss); } @@ -2968,13 +2980,6 @@ void MCC::drawPad(bool writetofile){ OrbMech::SStoHHMMSS(form->SSGET2, hh, mm, ss); sprintf(buffer, "%sSS: %d:%02d:%02.0f\n", buffer, hh, mm, ss); } - else if (form->type == 4) - { - OrbMech::SStoHHMMSS(form->PMGET, hh, mm, ss); - sprintf(buffer, "%s180°: %d:%02d:%02.0f\n", buffer, hh, mm, ss); - OrbMech::SStoHHMMSS(form->AOSGET, hh, mm, ss); - sprintf(buffer, "%sAOS: %d:%02d:%02.0f\n", buffer, hh, mm, ss); - } else if (form->type == 5) { OrbMech::SStoHHMMSS(form->PMGET, hh, mm, ss); @@ -2984,6 +2989,13 @@ void MCC::drawPad(bool writetofile){ OrbMech::SStoHHMMSS(form->AOSGET, hh, mm, ss); sprintf(buffer, "%sAOS WITHOUT TEI: %d:%02d:%02.0f\n", buffer, hh, mm, ss); } + else if (form->type == 7) + { + OrbMech::SStoHHMMSS(form->AOSGET2, hh, mm, ss); + sprintf(buffer, "%sAOS (W/TEI): %d:%02d:%02.0f\n", buffer, hh, mm, ss); + OrbMech::SStoHHMMSS(form->AOSGET, hh, mm, ss); + sprintf(buffer, "%sAOS (NO TEI): %d:%02d:%02.0f\n", buffer, hh, mm, ss); + } oapiAnnotationSetText(NHpad, buffer); } From 0f254289ba318ead0a749360f951b070140febc7 Mon Sep 17 00:00:00 2001 From: indy91 Date: Fri, 21 Jun 2024 22:14:26 +0200 Subject: [PATCH 2/7] Apollo 10 MCC: All individual CMC CSM state vector uplinks also send up a V66 --- .../src_launch/MCC_Mission_F.cpp | 30 +++++++++---------- .../src_launch/RTCC_Mission_F.cpp | 17 +++++++++++ 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/Orbitersdk/samples/ProjectApollo/src_launch/MCC_Mission_F.cpp b/Orbitersdk/samples/ProjectApollo/src_launch/MCC_Mission_F.cpp index f138de686d..12ea2f1a7d 100644 --- a/Orbitersdk/samples/ProjectApollo/src_launch/MCC_Mission_F.cpp +++ b/Orbitersdk/samples/ProjectApollo/src_launch/MCC_Mission_F.cpp @@ -148,7 +148,7 @@ void MCC::MissionSequence_F() UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, rtcc->GETEval2(rtcc->calcParams.TLI + 7.0*3600.0 + 10.0*60.0), 10, MST_F_TRANSLUNAR_NO_MCC1_2); break; case MST_F_TRANSLUNAR_NO_MCC1_2: //SV update to Block Data 2 (MCC-1 was scrubbed) - UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, rtcc->GETEval2(rtcc->calcParams.TLI + 9.0*3600.0 + 30.0*60.0), 100, MST_F_TRANSLUNAR11); + UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, rtcc->GETEval2(rtcc->calcParams.TLI + 9.0*3600.0 + 30.0*60.0), 103, MST_F_TRANSLUNAR11); break; case MST_F_TRANSLUNAR10: //PTC REFSMMAT to Block Data 2 UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, rtcc->GETEval2(rtcc->calcParams.TLI + 9.0*3600.0 + 35.0*60.0), 10, MST_F_TRANSLUNAR11); @@ -163,7 +163,7 @@ void MCC::MissionSequence_F() UpdateMacro(UTP_PADWITHCMCUPLINK, PT_AP11MNV, rtcc->GETEval2(rtcc->calcParams.TLI + 42.0*3600.0), 14, MST_F_TRANSLUNAR14); break; case MST_F_TRANSLUNAR14: //State Vector update to MCC-3 update - UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, rtcc->GETEval2(rtcc->calcParams.LOI - 23.0*3600.0 - 30.0*60.0), 100, MST_F_TRANSLUNAR15); + UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, rtcc->GETEval2(rtcc->calcParams.LOI - 23.0*3600.0 - 30.0*60.0), 103, MST_F_TRANSLUNAR15); break; case MST_F_TRANSLUNAR15: //MCC-3 update to MCC-4 update UpdateMacro(UTP_PADWITHCMCUPLINK, PT_AP11MNV, rtcc->GETEval2(rtcc->calcParams.LOI - 6.0*3600.0 - 30.0*60.0), 15, MST_F_TRANSLUNAR16); @@ -215,10 +215,10 @@ void MCC::MissionSequence_F() UpdateMacro(UTP_PADONLY, PT_AP10MAPUPDATE, MoonRev >= 4 && MoonRevTime > 3600.0, 43, MST_F_LUNAR_ORBIT_LOI_DAY_8); break; case MST_F_LUNAR_ORBIT_LOI_DAY_8: //State vector update to state vector update - UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, MoonRev >= 5 && MoonRevTime > 30.0*60.0, 100, MST_F_LUNAR_ORBIT_LOI_DAY_9); + UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, MoonRev >= 5 && MoonRevTime > 30.0*60.0, 103, MST_F_LUNAR_ORBIT_LOI_DAY_9); break; case MST_F_LUNAR_ORBIT_LOI_DAY_9: //State vector update to TEI-10 update - UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, true, 100, MST_F_LUNAR_ORBIT_LOI_DAY_10); + UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, true, 103, MST_F_LUNAR_ORBIT_LOI_DAY_10); break; case MST_F_LUNAR_ORBIT_LOI_DAY_10: //TEI-10 update to LLS-2 update UpdateMacro(UTP_PADONLY, PT_AP11MNV, MoonRev >= 10 && MoonRevTime > 30.0*60.0, 33, MST_F_LUNAR_ORBIT_DOI_DAY_1); @@ -293,7 +293,7 @@ void MCC::MissionSequence_F() UpdateMacro(UTP_PADONLY, PT_AP11MNV, MoonRev >= 17 && MoonRevTime > 1.0*3600.0 + 15.0*60.0, 34, MST_F_LUNAR_ORBIT_DOI_DAY_27); break; case MST_F_LUNAR_ORBIT_DOI_DAY_27: //State vector update to rev 22 map update - UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, true, 100, MST_F_LUNAR_ORBIT_DOI_DAY_28); + UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, true, 103, MST_F_LUNAR_ORBIT_DOI_DAY_28); break; case MST_F_LUNAR_ORBIT_DOI_DAY_28: //Rev 22 map update to rev 23 map update UpdateMacro(UTP_PADONLY, PT_AP10MAPUPDATE, MoonRev >= 22 && MoonRevTime > 55.0*60.0, 45, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_1); @@ -305,10 +305,10 @@ void MCC::MissionSequence_F() UpdateMacro(UTP_PADONLY, PT_AP11MNV, true, 35, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_3); break; case MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_3: //State vector update to state vector update - UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, MoonRev >= 23 && MoonRevTime > 1.0*3600.0, 100, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_5); + UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, MoonRev >= 23 && MoonRevTime > 1.0*3600.0, 103, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_5); break; case MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_5: //State vector update to landmark tracking update - UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, true, 100, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_6); + UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, true, 103, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_6); break; case MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_6: //Landmark tracking rev 24 update to TEI-24 update UpdateMacro(UTP_PADONLY, PT_AP11LMARKTRKPAD, SubStateTime > 5.0*60.0, 53, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_7); @@ -320,7 +320,7 @@ void MCC::MissionSequence_F() UpdateMacro(UTP_PADONLY, PT_AP10MAPUPDATE, MoonRev >= 24 && MoonRevTime > 1.0*3600.0 + 5.0*60.0, 47, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_9); break; case MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_9: //State vector update to TEI-25 update - UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, true, 100, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_10); + UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, true, 103, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_10); break; case MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_10: //TEI-25 update to landmark tracking rev 25 update UpdateMacro(UTP_PADONLY, PT_AP11MNV, SubStateTime > 3.0*60.0, 37, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_11); @@ -332,7 +332,7 @@ void MCC::MissionSequence_F() UpdateMacro(UTP_PADONLY, PT_AP10MAPUPDATE, MoonRev >= 25 && MoonRevTime > 1.0*3600.0 + 5.0*60.0, 48, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_13); break; case MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_13: //State vector update to TEI-26 update - UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, true, 100, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_14); + UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, true, 103, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_14); break; case MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_14: //TEI-26 update to landmark tracking rev 26 update UpdateMacro(UTP_PADONLY, PT_AP11MNV, SubStateTime > 3.0*60.0, 38, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_15); @@ -344,7 +344,7 @@ void MCC::MissionSequence_F() UpdateMacro(UTP_PADONLY, PT_AP10MAPUPDATE, MoonRev >= 26 && MoonRevTime > 1.0*3600.0 + 5.0*60.0, 49, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_17); break; case MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_17: //State vector update to TEI-27 update - UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, true, 100, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_18); + UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, true, 103, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_18); break; case MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_18: //TEI-27 update to landmark tracking rev 27 update UpdateMacro(UTP_PADONLY, PT_AP11MNV, SubStateTime > 3.0*60.0, 39, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_19); @@ -362,10 +362,10 @@ void MCC::MissionSequence_F() UpdateMacro(UTP_PADONLY, PT_AP10MAPUPDATE, MoonRev >= 27 && MoonRevTime > 1.0*3600.0 + 5.0*60.0, 141, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_24); break; case MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_24: //State vector update to state vector update - UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, MoonRev >= 29 && MoonRevTime > 1.0*3600.0 + 10.0*60.0, 100, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_25); + UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, MoonRev >= 29 && MoonRevTime > 1.0*3600.0 + 10.0*60.0, 103, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_25); break; case MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_25: //State vector update to TEI-30 update - UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, true, 100, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_26); + UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, true, 103, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_26); break; case MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_26: //TEI-30 update to landmark tracking rev 30 update UpdateMacro(UTP_PADONLY, PT_AP11MNV, SubStateTime > 3.0*60.0, 131, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_27); @@ -383,7 +383,7 @@ void MCC::MissionSequence_F() UpdateMacro(UTP_PADONLY, PT_AP10MAPUPDATE, SubStateTime > 3.0*60.0, 143, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_32); break; case MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_32: //State vector update to final TEI-31 update - UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, MoonRev >= 31 && MoonRevTime > 35.0*60.0, 100, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_33); + UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, MoonRev >= 31 && MoonRevTime > 35.0*60.0, 103, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_33); break; case MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_33: //Final TEI-31 update to TEI-32 update UpdateMacro(UTP_PADWITHCMCUPLINK, PT_AP11MNV, SubStateTime > 3.0*60.0, 133, MST_F_LUNAR_ORBIT_LMK_TRACK_DAY_34); @@ -409,10 +409,10 @@ void MCC::MissionSequence_F() UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, rtcc->GETEval2(rtcc->calcParams.TEI + 2.0*3600.0 + 40.0*60.0), 10, MST_F_TRANSEARTH_3); break; case MST_F_TRANSEARTH_3: //State vector update to state vector update - UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, rtcc->GETEval2(rtcc->calcParams.TEI + 10.0*3600.0 + 15.0*60.0), 100, MST_F_TRANSEARTH_4); + UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, rtcc->GETEval2(rtcc->calcParams.TEI + 10.0*3600.0 + 15.0*60.0), 103, MST_F_TRANSEARTH_4); break; case MST_F_TRANSEARTH_4: //State vector update to MCC-5 update - UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, rtcc->GETEval2(rtcc->calcParams.TEI + 14.0*3600.0 + 10.0*60.0), 100, MST_F_TRANSEARTH_5); + UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, rtcc->GETEval2(rtcc->calcParams.TEI + 14.0*3600.0 + 10.0*60.0), 103, MST_F_TRANSEARTH_5); break; case MST_F_TRANSEARTH_5: //MCC-5 update to preliminary MCC-6 update UpdateMacro(UTP_PADWITHCMCUPLINK, PT_AP11MNV, rtcc->GETEval2(rtcc->calcParams.TEI + 27.0*3600.0 + 20.0*60.0), 90, MST_F_TRANSEARTH_6); diff --git a/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp b/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp index a5fd6ff3ac..97eea4aeec 100644 --- a/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp +++ b/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp @@ -2444,6 +2444,23 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc } } break; + case 103: //GENERIC CMC CSM STATE VECTOR UPDATE AND V66 + { + EphemerisData sv; + char buffer1[1000]; + + sv = StateVectorCalcEphem(calcParams.src); //State vector for uplink + + AGCStateVectorUpdate(buffer1, 1, 1, sv, true); + + sprintf(uplinkdata, "%s", buffer1); + if (upString != NULL) { + // give to mcc + strncpy(upString, uplinkdata, 1024 * 3); + sprintf(upDesc, "CSM state vector and V66"); + } + } + break; } return scrubbed; From e6c70aa021202421d79b9fc130b2641f9358e4ec Mon Sep 17 00:00:00 2001 From: indy91 Date: Wed, 26 Jun 2024 20:46:57 +0200 Subject: [PATCH 3/7] Apollo 10 MCC: optimize order of some updates; add a V66 to the LLS-2 update uplink --- .../ProjectApollo/src_launch/MCC_Mission_F.cpp | 18 +++++++++--------- .../src_launch/RTCC_Mission_F.cpp | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Orbitersdk/samples/ProjectApollo/src_launch/MCC_Mission_F.cpp b/Orbitersdk/samples/ProjectApollo/src_launch/MCC_Mission_F.cpp index 12ea2f1a7d..3cab5fbd1b 100644 --- a/Orbitersdk/samples/ProjectApollo/src_launch/MCC_Mission_F.cpp +++ b/Orbitersdk/samples/ProjectApollo/src_launch/MCC_Mission_F.cpp @@ -214,20 +214,20 @@ void MCC::MissionSequence_F() case MST_F_LUNAR_ORBIT_LOI_DAY_7: //Rev 4 map update to state vector update UpdateMacro(UTP_PADONLY, PT_AP10MAPUPDATE, MoonRev >= 4 && MoonRevTime > 3600.0, 43, MST_F_LUNAR_ORBIT_LOI_DAY_8); break; - case MST_F_LUNAR_ORBIT_LOI_DAY_8: //State vector update to state vector update + case MST_F_LUNAR_ORBIT_LOI_DAY_8: //State vector update to TEI-10 update UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, MoonRev >= 5 && MoonRevTime > 30.0*60.0, 103, MST_F_LUNAR_ORBIT_LOI_DAY_9); break; - case MST_F_LUNAR_ORBIT_LOI_DAY_9: //State vector update to TEI-10 update - UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, true, 103, MST_F_LUNAR_ORBIT_LOI_DAY_10); + case MST_F_LUNAR_ORBIT_LOI_DAY_9: //TEI-10 update to state vector update + UpdateMacro(UTP_PADONLY, PT_AP11MNV, true, 33, MST_F_LUNAR_ORBIT_LOI_DAY_10); break; - case MST_F_LUNAR_ORBIT_LOI_DAY_10: //TEI-10 update to LLS-2 update - UpdateMacro(UTP_PADONLY, PT_AP11MNV, MoonRev >= 10 && MoonRevTime > 30.0*60.0, 33, MST_F_LUNAR_ORBIT_DOI_DAY_1); + case MST_F_LUNAR_ORBIT_LOI_DAY_10: //State vector update to LLS-2 track PAD + UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, MoonRev >= 10 && MoonRevTime > 30.0*60.0, 103, MST_F_LUNAR_ORBIT_DOI_DAY_1); break; - case MST_F_LUNAR_ORBIT_DOI_DAY_1: //LLS-2 update to LLS-2 track PAD - UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, true, 60, MST_F_LUNAR_ORBIT_DOI_DAY_2); + case MST_F_LUNAR_ORBIT_DOI_DAY_1: //LLS-2 track PAD to LLS-2 update + UpdateMacro(UTP_PADONLY, PT_AP11LMARKTRKPAD, true, 52, MST_F_LUNAR_ORBIT_DOI_DAY_2); break; - case MST_F_LUNAR_ORBIT_DOI_DAY_2: //LLS-2 track PAD to rev 11 map update - UpdateMacro(UTP_PADONLY, PT_AP11LMARKTRKPAD, SubStateTime > 3.0*60.0, 52, MST_F_LUNAR_ORBIT_DOI_DAY_3); + case MST_F_LUNAR_ORBIT_DOI_DAY_2: //LLS-2 update to rev 11 map update + UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, SubStateTime > 3.0*60.0, 60, MST_F_LUNAR_ORBIT_DOI_DAY_3); break; case MST_F_LUNAR_ORBIT_DOI_DAY_3: //Rev 11 map update to CSM DAP update UpdateMacro(UTP_PADONLY, PT_AP10MAPUPDATE, MoonRev >= 10 && MoonRevTime > 3600.0, 44, MST_F_LUNAR_ORBIT_DOI_DAY_4); diff --git a/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp b/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp index 97eea4aeec..7c76e4cd37 100644 --- a/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp +++ b/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp @@ -1469,14 +1469,14 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc REFSMMAT = REFSMMATCalc(&opt); - AGCStateVectorUpdate(buffer1, sv, true); + AGCStateVectorUpdate(buffer1, sv, true, true); AGCDesiredREFSMMATUpdate(buffer2, REFSMMAT); sprintf(uplinkdata, "%s%s", buffer1, buffer2); if (upString != NULL) { // give to mcc strncpy(upString, uplinkdata, 1024 * 3); - sprintf(upDesc, "CSM state vector, LLS2 REFSMMAT"); + sprintf(upDesc, "CSM state vector and V66, LLS2 REFSMMAT"); } } break; From ce758e31bfe1afb9acf7665ddd1c2106718794e0 Mon Sep 17 00:00:00 2001 From: indy91 Date: Sun, 30 Jun 2024 12:52:18 +0200 Subject: [PATCH 4/7] Apollo 10 MCC: Use short format for CSM sep maneuver PAD --- Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp b/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp index 7c76e4cd37..66322142e2 100644 --- a/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp +++ b/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp @@ -1599,6 +1599,7 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc AP11ManeuverPAD(opt, *form); sprintf(form->purpose, "Separation"); + form->type = 2; AGCStateVectorUpdate(buffer1, 1, RTCC_MPT_CSM, sv); AGCStateVectorUpdate(buffer2, 1, RTCC_MPT_LM, sv); From 094853dc171ce0f39c0dab1fbc6a60bf8a9ff627 Mon Sep 17 00:00:00 2001 From: indy91 Date: Sun, 30 Jun 2024 20:01:35 +0200 Subject: [PATCH 5/7] Apollo 10 MCC: Calculate AGS K-Factor; undocking time on separation PAD --- .../src_launch/MCC_Mission_F.cpp | 2 +- .../src_launch/RTCC_Mission_F.cpp | 37 ++++++++++++++----- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/Orbitersdk/samples/ProjectApollo/src_launch/MCC_Mission_F.cpp b/Orbitersdk/samples/ProjectApollo/src_launch/MCC_Mission_F.cpp index 3cab5fbd1b..3e0c7790d2 100644 --- a/Orbitersdk/samples/ProjectApollo/src_launch/MCC_Mission_F.cpp +++ b/Orbitersdk/samples/ProjectApollo/src_launch/MCC_Mission_F.cpp @@ -248,7 +248,7 @@ void MCC::MissionSequence_F() UpdateMacro(UTP_PADWITHCMCUPLINK, PT_AP11MNV, MoonRev >= 11 && MoonRevTime > 70.0*60.0, 70, MST_F_LUNAR_ORBIT_DOI_DAY_11); break; case MST_F_LUNAR_ORBIT_DOI_DAY_11: //AGS K Factor update to DOI update - UpdateMacro(UTP_PADONLY, PT_AP11AGSACT, MoonRev >= 12 && MoonRevTime > 30.0*60.0, 65, MST_F_LUNAR_ORBIT_DOI_DAY_12); + UpdateMacro(UTP_PADONLY, PT_GENERIC, MoonRev >= 12 && MoonRevTime > 30.0*60.0, 65, MST_F_LUNAR_ORBIT_DOI_DAY_12); break; case MST_F_LUNAR_ORBIT_DOI_DAY_12: //DOI update to Phasing update UpdateMacro(UTP_PADWITHLGCUPLINK, PT_AP11LMMNV, SubStateTime > 3.0*60.0, 71, MST_F_LUNAR_ORBIT_DOI_DAY_13); diff --git a/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp b/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp index 66322142e2..baa904d1ca 100644 --- a/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp +++ b/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp @@ -1557,19 +1557,31 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc if (upString != NULL) { // give to mcc strncpy(upString, uplinkdata, 1024 * 3); - sprintf(upDesc, "clock update, state vectors, LS REFSMMAT"); + sprintf(upDesc, "Clock update, state vectors, LS REFSMMAT"); } } break; case 65: //AGS ACTIVATION UPDATE { - AP11AGSACT *form = (AP11AGSACT*)pad; + GENERICPAD *form = (GENERICPAD*)pad; - form->KFactor = 90.0*3600.0; - form->DEDA224 = 0; - form->DEDA225 = 0; - form->DEDA226 = 0; - form->DEDA227 = 0; + double KFactor, ss; + int hh, mm; + + LEM *l = (LEM*)calcParams.tgt; + bool res_k = CalculateAGSKFactor(&l->agc.vagc, &l->aea.vags, KFactor); + + //Sanity check on K-Factor value + if (!res_k || abs(KFactor - 90.0*3600.0) > 2.0 * 60.0) + { + KFactor = 90.0*3600.0; //Default to 90h if no reasonable K-Factor was determined + } + + SystemParameters.MCGZSS = SystemParameters.MCGZSL + KFactor / 3600.0; + + OrbMech::SStoHHMMSS(GETfromGMT(GetAGSClockZero()), hh, mm, ss, 0.01); + + sprintf(form->paddata, "K-Factor: %03d:%02d:%05.2f GET", hh, mm, ss); } break; case 70: //CSM SEPARATION BURN @@ -1577,16 +1589,21 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc AP11ManPADOpt opt; EphemerisData sv; VECTOR3 dV_LVLH; - double t_P, t_Sep; + double t_P, t_Sep, t_Undock; char buffer1[1000]; char buffer2[1000]; + char GETBuffer[128]; AP11MNV * form = (AP11MNV *)pad; sv = StateVectorCalcEphem(calcParams.src); //State vector for uplink + //Separation burn half an orbit before DOI t_P = OrbMech::period(sv.R, sv.V, OrbMech::mu_Moon); t_Sep = floor(calcParams.DOI - t_P / 2.0); + //Undocking 25 minutes (rounded down to the previous minute) before sep + t_Undock = floor((t_Sep - 25.0*60.0) / 60.0)*60.0; + dV_LVLH = _V(0, 0, -2.5)*0.3048; opt.TIG = t_Sep; @@ -1600,6 +1617,8 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc AP11ManeuverPAD(opt, *form); sprintf(form->purpose, "Separation"); form->type = 2; + OrbMech::format_time_HHMMSS(GETBuffer, t_Undock); + sprintf(form->remarks, "Undocking at %s GET", GETBuffer); AGCStateVectorUpdate(buffer1, 1, RTCC_MPT_CSM, sv); AGCStateVectorUpdate(buffer2, 1, RTCC_MPT_LM, sv); @@ -1608,7 +1627,7 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc if (upString != NULL) { // give to mcc strncpy(upString, uplinkdata, 1024 * 3); - sprintf(upDesc, "state vectors"); + sprintf(upDesc, "State vectors"); } } break; From 0b96625f601edf254b0e246b6a57068358cb58ef Mon Sep 17 00:00:00 2001 From: indy91 Date: Fri, 5 Jul 2024 15:59:23 +0200 Subject: [PATCH 6/7] Apollo 10 MCC: Save separation time --- .../samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp | 8 ++++---- .../Apollo 10 - 10 - Before Undocking T+98h15min.scn | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp b/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp index baa904d1ca..d67130d787 100644 --- a/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp +++ b/Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_F.cpp @@ -1589,7 +1589,7 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc AP11ManPADOpt opt; EphemerisData sv; VECTOR3 dV_LVLH; - double t_P, t_Sep, t_Undock; + double t_P, t_Undock; char buffer1[1000]; char buffer2[1000]; char GETBuffer[128]; @@ -1600,13 +1600,13 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc //Separation burn half an orbit before DOI t_P = OrbMech::period(sv.R, sv.V, OrbMech::mu_Moon); - t_Sep = floor(calcParams.DOI - t_P / 2.0); + calcParams.SEP = floor(calcParams.DOI - t_P / 2.0); //Undocking 25 minutes (rounded down to the previous minute) before sep - t_Undock = floor((t_Sep - 25.0*60.0) / 60.0)*60.0; + t_Undock = floor((calcParams.SEP - 25.0*60.0) / 60.0)*60.0; dV_LVLH = _V(0, 0, -2.5)*0.3048; - opt.TIG = t_Sep; + opt.TIG = calcParams.SEP; opt.dV_LVLH = dV_LVLH; opt.enginetype = RTCC_ENGINETYPE_CSMRCSPLUS4; opt.HeadsUp = true; diff --git a/Scenarios/Project Apollo - NASSP/Apollo - Mission Scenarios/Apollo 10/Apollo 10 - 10 - Before Undocking T+98h15min.scn b/Scenarios/Project Apollo - NASSP/Apollo - Mission Scenarios/Apollo 10/Apollo 10 - 10 - Before Undocking T+98h15min.scn index 36f71f26e1..27e7d1388d 100644 --- a/Scenarios/Project Apollo - NASSP/Apollo - Mission Scenarios/Apollo 10/Apollo 10 - 10 - Before Undocking T+98h15min.scn +++ b/Scenarios/Project Apollo - NASSP/Apollo - Mission Scenarios/Apollo 10/Apollo 10 - 10 - Before Undocking T+98h15min.scn @@ -6535,7 +6535,7 @@ RTCC_BEGIN RTCC_EI 600604.419287550263 RTCC_TLI 9545.715894865534 RTCC_LOI 272767.425242705562 - RTCC_SEP 0.000000000000 + RTCC_SEP 355227.6868328408 RTCC_DOI 358827.686832840787 RTCC_PDI 0.000000000000 RTCC_TLAND 362908.889965328621 From 383c83ab8c9b879239562ba1a284a2acffd12432 Mon Sep 17 00:00:00 2001 From: indy91 Date: Mon, 8 Jul 2024 21:01:29 +0200 Subject: [PATCH 7/7] Apollo 10 MCC: Tweak timing of DOI day updates --- .../samples/ProjectApollo/src_launch/MCC_Mission_F.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Orbitersdk/samples/ProjectApollo/src_launch/MCC_Mission_F.cpp b/Orbitersdk/samples/ProjectApollo/src_launch/MCC_Mission_F.cpp index 3e0c7790d2..33bcb7c7a5 100644 --- a/Orbitersdk/samples/ProjectApollo/src_launch/MCC_Mission_F.cpp +++ b/Orbitersdk/samples/ProjectApollo/src_launch/MCC_Mission_F.cpp @@ -251,19 +251,19 @@ void MCC::MissionSequence_F() UpdateMacro(UTP_PADONLY, PT_GENERIC, MoonRev >= 12 && MoonRevTime > 30.0*60.0, 65, MST_F_LUNAR_ORBIT_DOI_DAY_12); break; case MST_F_LUNAR_ORBIT_DOI_DAY_12: //DOI update to Phasing update - UpdateMacro(UTP_PADWITHLGCUPLINK, PT_AP11LMMNV, SubStateTime > 3.0*60.0, 71, MST_F_LUNAR_ORBIT_DOI_DAY_13); + UpdateMacro(UTP_PADWITHLGCUPLINK, PT_AP11LMMNV, SubStateTime > 2.0*60.0, 71, MST_F_LUNAR_ORBIT_DOI_DAY_13); break; case MST_F_LUNAR_ORBIT_DOI_DAY_13: //Phasing update to PDI Abort update - UpdateMacro(UTP_PADONLY, PT_AP11LMMNV, SubStateTime > 3.0*60.0, 72, MST_F_LUNAR_ORBIT_DOI_DAY_14); + UpdateMacro(UTP_PADONLY, PT_AP11LMMNV, SubStateTime > 2.0*60.0, 72, MST_F_LUNAR_ORBIT_DOI_DAY_14); break; case MST_F_LUNAR_ORBIT_DOI_DAY_14: //PDI Abort update to LGC CSM state vector update - UpdateMacro(UTP_PADONLY, PT_AP11LMMNV, MoonRev >= 12 && MoonRevTime > 50.0*60.0, 74, MST_F_LUNAR_ORBIT_DOI_DAY_15); + UpdateMacro(UTP_PADONLY, PT_AP11LMMNV, (MoonRev >= 12 && MoonRevTime > 50.0*60.0) && rtcc->GETEval2(rtcc->calcParams.SEP + 60.0), 74, MST_F_LUNAR_ORBIT_DOI_DAY_15); break; case MST_F_LUNAR_ORBIT_DOI_DAY_15: //LGC CSM state vector update to CMC CSM+LM state vector update UpdateMacro(UTP_LGCUPLINKONLY, PT_NONE, MoonRev >= 12 && MoonRevTime > 1.0*3600.0 + 10.0*60.0, 100, MST_F_LUNAR_ORBIT_DOI_DAY_16); break; case MST_F_LUNAR_ORBIT_DOI_DAY_16: //CMC CSM+LM state vector update to final phasing update - UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, MoonRev >= 13 && MoonRevTime > 40.0*60.0, 101, MST_F_LUNAR_ORBIT_DOI_DAY_17); + UpdateMacro(UTP_CMCUPLINKONLY, PT_NONE, MoonRev >= 13 && MoonRevTime > 50.0*60.0, 101, MST_F_LUNAR_ORBIT_DOI_DAY_17); break; case MST_F_LUNAR_ORBIT_DOI_DAY_17: //Final phasing update to CSM backup insertion update UpdateMacro(UTP_PADONLY, PT_AP11LMMNV, MoonRev >= 13 && MoonRevTime > 1.0*3600.0 + 20.0*60.0, 73, MST_F_LUNAR_ORBIT_DOI_DAY_18);