Skip to content

Commit

Permalink
Merge branch 'Orbiter2016' of https://github.com/orbiternassp/NASSP i…
Browse files Browse the repository at this point in the history
…nto OpenOrbiter3
  • Loading branch information
CaptainSwag101 committed Jan 24, 2024
2 parents 2222d50 + 70bddaf commit 7f48633
Show file tree
Hide file tree
Showing 15 changed files with 275 additions and 268 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ bool RTCC::CalculationMTP_C(int fcn, LPVOID &pad, char * upString, char * upDesc
int hh, mm;
double ss;

OrbMech::SStoHHMMSS(LaunchMJD*3600.0, hh, mm, ss);
OrbMech::SStoHHMMSS(LaunchMJD*3600.0, hh, mm, ss, 0.01);

sprintf_s(Buff, "P10,CSM,%d:%d:%.2lf;", hh, mm, ss);
GMGMED(Buff);
Expand All @@ -81,7 +81,7 @@ bool RTCC::CalculationMTP_C(int fcn, LPVOID &pad, char * upString, char * upDesc
GMGMED(Buff);

//P12: IU GRR and Azimuth
OrbMech::SStoHHMMSS(T_GRR, hh, mm, ss);
OrbMech::SStoHHMMSS(T_GRR, hh, mm, ss, 0.01);
sprintf_s(Buff, "P12,IU1,%d:%d:%.2lf,%.2lf;", hh, mm, ss, Azi);
GMGMED(Buff);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ bool RTCC::CalculationMTP_C_PRIME(int fcn, LPVOID &pad, char * upString, char *
int hh, mm;
double ss;

OrbMech::SStoHHMMSS(LaunchMJD*3600.0, hh, mm, ss);
OrbMech::SStoHHMMSS(LaunchMJD*3600.0, hh, mm, ss, 0.01);

sprintf_s(Buff, "P10,CSM,%d:%d:%.2lf;", hh, mm, ss);
GMGMED(Buff);
Expand All @@ -84,7 +84,7 @@ bool RTCC::CalculationMTP_C_PRIME(int fcn, LPVOID &pad, char * upString, char *
GMGMED(Buff);

//P12: IU GRR and Azimuth
OrbMech::SStoHHMMSS(T_GRR, hh, mm, ss);
OrbMech::SStoHHMMSS(T_GRR, hh, mm, ss, 0.01);
sprintf_s(Buff, "P12,IU1,%d:%d:%.2lf,%.2lf;", hh, mm, ss, Azi);
GMGMED(Buff);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ bool RTCC::CalculationMTP_D(int fcn, LPVOID &pad, char * upString, char * upDesc
int hh, mm;
double ss;

OrbMech::SStoHHMMSS(LaunchMJD*3600.0, hh, mm, ss);
OrbMech::SStoHHMMSS(LaunchMJD*3600.0, hh, mm, ss, 0.01);

sprintf_s(Buff, "P10,CSM,%d:%d:%.2lf;", hh, mm, ss);
GMGMED(Buff);
Expand All @@ -178,7 +178,7 @@ bool RTCC::CalculationMTP_D(int fcn, LPVOID &pad, char * upString, char * upDesc
GMGMED("P15,AGS,,40:00:00;");

//P12: IU GRR and Azimuth
OrbMech::SStoHHMMSS(T_GRR, hh, mm, ss);
OrbMech::SStoHHMMSS(T_GRR, hh, mm, ss, 0.01);
sprintf_s(Buff, "P12,IU1,%d:%d:%.2lf,%.2lf;", hh, mm, ss, Azi);
GMGMED(Buff);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc
int hh, mm;
double ss;

OrbMech::SStoHHMMSS(LaunchMJD*3600.0, hh, mm, ss);
OrbMech::SStoHHMMSS(LaunchMJD*3600.0, hh, mm, ss, 0.01);

sprintf_s(Buff, "P10,CSM,%d:%d:%.2lf;", hh, mm, ss);
GMGMED(Buff);
Expand All @@ -87,7 +87,7 @@ bool RTCC::CalculationMTP_F(int fcn, LPVOID &pad, char * upString, char * upDesc
GMGMED("P15,AGS,,90:00:00;");

//P12: IU GRR and Azimuth
OrbMech::SStoHHMMSS(T_GRR, hh, mm, ss);
OrbMech::SStoHHMMSS(T_GRR, hh, mm, ss, 0.01);
sprintf_s(Buff, "P12,IU1,%d:%d:%.2lf,%.2lf;", hh, mm, ss, Azi);
GMGMED(Buff);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ bool RTCC::CalculationMTP_G(int fcn, LPVOID &pad, char * upString, char * upDesc
int hh, mm;
double ss;

OrbMech::SStoHHMMSS(LaunchMJD*3600.0, hh, mm, ss);
OrbMech::SStoHHMMSS(LaunchMJD*3600.0, hh, mm, ss, 0.01);

sprintf_s(Buff, "P10,CSM,%d:%d:%.2lf;", hh, mm, ss);
GMGMED(Buff);
Expand All @@ -138,7 +138,7 @@ bool RTCC::CalculationMTP_G(int fcn, LPVOID &pad, char * upString, char * upDesc
GMGMED("P15,AGS,,90:00:00;");

//P12: IU GRR and Azimuth
OrbMech::SStoHHMMSS(T_GRR, hh, mm, ss);
OrbMech::SStoHHMMSS(T_GRR, hh, mm, ss, 0.01);
sprintf_s(Buff, "P12,IU1,%d:%d:%.2lf,%.2lf;", hh, mm, ss, Azi);
GMGMED(Buff);

Expand Down
12 changes: 6 additions & 6 deletions Orbitersdk/samples/ProjectApollo/src_launch/RTCC_Mission_H1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ bool RTCC::CalculationMTP_H1(int fcn, LPVOID &pad, char * upString, char * upDes
int hh, mm;
double ss;

OrbMech::SStoHHMMSS(LaunchMJD*3600.0, hh, mm, ss);
OrbMech::SStoHHMMSS(LaunchMJD*3600.0, hh, mm, ss, 0.01);

sprintf_s(Buff, "P10,CSM,%d:%d:%.2lf;", hh, mm, ss);
GMGMED(Buff);
Expand All @@ -224,7 +224,7 @@ bool RTCC::CalculationMTP_H1(int fcn, LPVOID &pad, char * upString, char * upDes
GMGMED("P15,AGS,,100:00:00;");

//P12: IU GRR and Azimuth
OrbMech::SStoHHMMSS(T_GRR, hh, mm, ss);
OrbMech::SStoHHMMSS(T_GRR, hh, mm, ss, 0.01);
sprintf_s(Buff, "P12,IU1,%d:%d:%.2lf,%.2lf;", hh, mm, ss, Azi);
GMGMED(Buff);

Expand Down Expand Up @@ -577,7 +577,7 @@ bool RTCC::CalculationMTP_H1(int fcn, LPVOID &pad, char * upString, char * upDes
F23time = LOIFP - 11.0*60.0;
while (PZMCCDIS.data[0].GET_LOI < LOIFP - 5.0 || init)
{
OrbMech::SStoHHMMSS(F23time, hh, mm, ss);
OrbMech::SStoHHMMSS(F23time, hh, mm, ss, 0.01);
sprintf_s(Buff, "F23,%d:%d:%.2lf,%d:%d:%.2lf;", hh, mm, ss, hh, mm + 10, ss);
GMGMED(Buff);
TranslunarMidcourseCorrectionProcessor(sv, CSMmass, LMmass);
Expand Down Expand Up @@ -607,7 +607,7 @@ bool RTCC::CalculationMTP_H1(int fcn, LPVOID &pad, char * upString, char * upDes
F23time = LOIFP - 11.0*60.0;
while (PZMCCDIS.data[0].GET_LOI < LOIFP - 5.0 || init)
{
OrbMech::SStoHHMMSS(F23time, hh, mm, ss);
OrbMech::SStoHHMMSS(F23time, hh, mm, ss, 0.01);
sprintf_s(Buff, "F23,%d:%d:%.2lf,%d:%d:%.2lf;", hh, mm, ss, hh, mm + 10, ss);
GMGMED(Buff);
TranslunarMidcourseCorrectionProcessor(sv, CSMmass, LMmass);
Expand Down Expand Up @@ -2769,7 +2769,7 @@ bool RTCC::CalculationMTP_H1(int fcn, LPVOID &pad, char * upString, char * upDes
SystemParameters.MCGZSS = SystemParameters.MCGZSL + KFactor / 3600.0;
}

OrbMech::SStoHHMMSS(GETfromGMT(GetAGSClockZero()), hh, mm, ss);
OrbMech::SStoHHMMSS(GETfromGMT(GetAGSClockZero()), hh, mm, ss, 0.01);

AP11LMASCPAD pad2;

Expand Down Expand Up @@ -2844,7 +2844,7 @@ bool RTCC::CalculationMTP_H1(int fcn, LPVOID &pad, char * upString, char * upDes

AP11ManeuverPAD(&opt, *form);
sprintf(form->purpose, "SEP BURN");
OrbMech::SStoHHMMSS(form->GETI - 5.0*60.0, hh, mm, ss);
OrbMech::SStoHHMMSS(form->GETI - 5.0*60.0, hh, mm, ss, 0.01);
sprintf(form->remarks, "Jettison PAD: GET %d:%d:%.2lf R 219 P 358 Y 342\nSep burn is Z-axis, retrograde", hh, mm, ss);
form->type = 2;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ bool RTCC::CalculationMTP_SL(int fcn, LPVOID &pad, char * upString, char * upDes
int hh, mm;
gmt = modf(oapiGetSimMJD(), &iptr)*24.0*3600.0 + 4.0*3600.0; //TBD: Not sure this is good

OrbMech::SStoHHMMSS(gmt, hh, mm, ss);
OrbMech::SStoHHMMSS(gmt, hh, mm, ss, 0.01);

sprintf_s(Buff, "P10,CSM,%d:%d:%.2lf;", hh, mm, ss);
GMGMED(Buff);
Expand Down Expand Up @@ -94,7 +94,7 @@ bool RTCC::CalculationMTP_SL(int fcn, LPVOID &pad, char * upString, char * upDes
int hh, mm;
double ss;

OrbMech::SStoHHMMSS(LaunchMJD*3600.0, hh, mm, ss);
OrbMech::SStoHHMMSS(LaunchMJD*3600.0, hh, mm, ss, 0.01);

sprintf_s(Buff, "P10,CSM,%d:%d:%.2lf;", hh, mm, ss);
GMGMED(Buff);
Expand All @@ -113,7 +113,7 @@ bool RTCC::CalculationMTP_SL(int fcn, LPVOID &pad, char * upString, char * upDes
GMGMED(Buff);

//P12: IU GRR and Azimuth
OrbMech::SStoHHMMSS(T_GRR, hh, mm, ss);
OrbMech::SStoHHMMSS(T_GRR, hh, mm, ss, 0.01);
sprintf_s(Buff, "P12,IU1,%d:%d:%.2lf,%.2lf;", hh, mm, ss, Azi);
GMGMED(Buff);

Expand Down
Loading

0 comments on commit 7f48633

Please sign in to comment.