Space Shuttle Ultra development thread

I´m interested for this work. When you´ve got an idea. let me know when you have something concrete:)
 
Tex has asked if we would like to have own dev sub-forum. As the complexity of the of project is increasing I would recommend that we accept the offer.
 
Agreed. The thread is already hard to search for recent decisions.
 
OK, we now have our own subforum. So feel free to create whatever threads you deem necessary, like maybe one for the MDU/IDP operation? I can split the already existing posts into a new thread.
 
I fixed a bug in the PLBD opening sequence. Calling SetAnimation for anim_portTS (which is never initialized using CreateAnimation) was messing up the timing.
Also, the current code files on sourceforge won't compile. IDP.h includes vc_defs.h, when it should include dps_defs.h. Also, PanelF7.h has been moved to the vc folder, which is causing problems in Atlantis.cpp and PanelF7.cpp. Also, I think CRT.cpp needs to include vc_defs.h. I can upload fixed files to sourceforge if you want.
SC
 
I fixed a bug in the PLBD opening sequence. Calling SetAnimation for anim_portTS (which is never initialized using CreateAnimation) was messing up the timing.
Also, the current code files on sourceforge won't compile. IDP.h includes vc_defs.h, when it should include dps_defs.h. Also, PanelF7.h has been moved to the vc folder, which is causing problems in Atlantis.cpp and PanelF7.cpp. Also, I think CRT.cpp needs to include vc_defs.h. I can upload fixed files to sourceforge if you want.
SC

stuff worked here, the _defs files should be free to include without problems. IDP must include vc_defs.h - otherwise it does not build because it can't resolve symbols.

anim_portTS is for the torque shaft on the port side.

PanelF7.h was not moved. I created a second version of PanelF7 in the vc namespace, so I can switch from old PanelF7 code to new code for testing without breaking the old code for ever. vc::PanelF7 and ::PanelF7 are not the same.


CRT.cpp should include vc_defs.h... i think my local version does it, I have just not committed something lately as the other code was not tested yet.
 
stuff worked here, the _defs files should be free to include without problems. IDP must include vc_defs.h - otherwise it does not build because it can't resolve symbols.

anim_portTS is for the torque shaft on the port side.

PanelF7.h was not moved. I created a second version of PanelF7 in the vc namespace, so I can switch from old PanelF7 code to new code for testing without breaking the old code for ever. vc::PanelF7 and ::PanelF7 are not the same.


CRT.cpp should include vc_defs.h... i think my local version does it, I have just not committed something lately as the other code was not tested yet.
Thanks for the clarification.
 
I just found out that simulating the engine controller modes is going to need some hundreds of ifs and swicths... :axehead:very complex flow seq... I still don't know what some modes do....:lol: don't worry, I think next week I'll have something to show...
I would like to stay out of the GPC files... so someone would have to learn a little bit of that stuff, I can make a flow chart with the list of necessary cmds! please don't make me do the GPC part!


To get the proj to compile I had to replace the #include "afxres.h" with #include <windows.h> and #include <OleDlg.Dlg> on Atlantis.rc... but I'm guessing there's another way... how do you do it?

I think it would be good to have a "default state" where all the systems would be at T-9 minutes if there's no specifications in the scenario file, so that you don't end up with a system thinking it is in-flight while another thinks it's still sitting on the pad...

BTW: we should get a secretary to do a catalog of the functions... this thing is huge!!!
 
I just found out that simulating the engine controller modes is going to need some hundreds of ifs and swicths... :axehead:very complex flow seq... I still don't know what some modes do....:lol: don't worry, I think next week I'll have something to show...
I would like to stay out of the GPC files... so someone would have to learn a little bit of that stuff, I can make a flow chart with the list of necessary cmds! please don't make me do the GPC part!

I can do this part, if you like. If you also need help with coding inside the project just ask. We have now panel R4 in the project, if you don't want to mess with the VC code, I can do this and you just add the action.

About the number of if's: If you can formulate the behavior with mathematical functions, the complexity of the if's gets reduced to setting constants or inputs. Did you read the paper I posted?

To get the proj to compile I had to replace the #include "afxres.h" with #include <windows.h> and #include <OleDlg.Dlg> on Atlantis.rc... but I'm guessing there's another way... how do you do it?

By changing nothing of this at all... which compiler do you use?

I think it would be good to have a "default state" where all the systems would be at T-9 minutes if there's no specifications in the scenario file, so that you don't end up with a system thinking it is in-flight while another thinks it's still sitting on the pad...

I would suggest, default state is pre-launch right after crew ingress.

BTW: we should get a secretary to do a catalog of the functions... this thing is huge!!!

We should be using doxygen, but I must admit, even I don't comment as much as I should. Please have patience with us.
 
VC2008... The file just don't exist anywhere in my HD!!! The original Atlantis sdk also #includes the file but it's not in there... it has to be some setting in VC...:censored:

About the ifs, I was referring the controller modes... current status:
Code:
[FONT=Courier New]void SSME::OnPostStep( double fSimT, double fDeltaT, double fMJD )[/FONT]
[FONT=Courier New]{[/FONT]
[FONT=Courier New] int ME = 0;[/FONT]
[FONT=Courier New] while (ME <= 2)[/FONT]
[FONT=Courier New] {[/FONT]
[FONT=Courier New]  switch (SSME_DATA_TABLE[ME].STATUS)[/FONT]
[FONT=Courier New]  {[/FONT]
[FONT=Courier New]   // CHECKOUT[/FONT]
[FONT=Courier New]   case CHECKOUT_STANDBY:[/FONT]
[FONT=Courier New]    break;[/FONT]
[FONT=Courier New]   case CHECKOUT_COMPONENTCHECKOUT:[/FONT]
[FONT=Courier New]    break;[/FONT]
[FONT=Courier New]   // START PREPARATION[/FONT]
[FONT=Courier New]   case STARTPREPARATION_PURGESEQUENCE1:[/FONT]
[FONT=Courier New]    switch (cmdSTATUS[ME])[/FONT]
[FONT=Courier New]    {[/FONT]
[FONT=Courier New]     case CHECKOUT_STANDBY:[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = CHECKOUT_STANDBY;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]     case STARTPREPARATION_PURGESEQUENCE2:[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = STARTPREPARATION_PURGESEQUENCE2;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]     case POSTSHUTDOWN_TERMINATESEQUENCE:[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = POSTSHUTDOWN_TERMINATESEQUENCE;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]    }[/FONT]
[FONT=Courier New]    break;[/FONT]
[FONT=Courier New]   case STARTPREPARATION_PURGESEQUENCE2:[/FONT]
[FONT=Courier New]    switch (cmdSTATUS[ME])[/FONT]
[FONT=Courier New]    {[/FONT]
[FONT=Courier New]     case CHECKOUT_STANDBY:[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = CHECKOUT_STANDBY;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]     case STARTPREPARATION_PURGESEQUENCE1:[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = STARTPREPARATION_PURGESEQUENCE1;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]     case STARTPREPARATION_PURGESEQUENCE3:[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = STARTPREPARATION_PURGESEQUENCE3;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]     case POSTSHUTDOWN_TERMINATESEQUENCE:[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = POSTSHUTDOWN_TERMINATESEQUENCE;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]    }[/FONT]
[FONT=Courier New]    break;[/FONT]
[FONT=Courier New]   case STARTPREPARATION_PURGESEQUENCE3:[/FONT]
[FONT=Courier New]    switch (cmdSTATUS[ME])[/FONT]
[FONT=Courier New]    {[/FONT]
[FONT=Courier New]     case CHECKOUT_STANDBY:[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = CHECKOUT_STANDBY;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]     case STARTPREPARATION_PURGESEQUENCE4:[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = STARTPREPARATION_PURGESEQUENCE4;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]     case POSTSHUTDOWN_TERMINATESEQUENCE:[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = POSTSHUTDOWN_TERMINATESEQUENCE;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]    }[/FONT]
[FONT=Courier New]    break;[/FONT]
[FONT=Courier New]   case STARTPREPARATION_PURGESEQUENCE4:[/FONT]
[FONT=Courier New]    switch (cmdSTATUS[ME])[/FONT]
[FONT=Courier New]    {[/FONT]
[FONT=Courier New]     case CHECKOUT_STANDBY:[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = CHECKOUT_STANDBY;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]     case STARTPREPARATION_PURGESEQUENCE3:[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = STARTPREPARATION_PURGESEQUENCE3;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]     case STARTPREPARATION_ENGINEREADY:[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = STARTPREPARATION_ENGINEREADY;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]     case POSTSHUTDOWN_TERMINATESEQUENCE:[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = POSTSHUTDOWN_TERMINATESEQUENCE;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]    }[/FONT]
[FONT=Courier New]    break;[/FONT]
[FONT=Courier New]   case STARTPREPARATION_ENGINEREADY:[/FONT]
[FONT=Courier New]    SSME_DATA_TABLE[ME].posCCV = 1;// TODO put vlv motion[/FONT]
[FONT=Courier New]    switch (cmdSTATUS[ME])[/FONT]
[FONT=Courier New]    {[/FONT]
[FONT=Courier New]     case CHECKOUT_STANDBY:[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = CHECKOUT_STANDBY;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]     case STARTPREPARATION_PURGESEQUENCE4:[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = STARTPREPARATION_PURGESEQUENCE4;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]     case STARTMAINSTAGE_STARTPHASESTARTINITIATION:[/FONT]
[FONT=Courier New]      cmdPC[ME] = 100;[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].timeESC = fSimT;[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = STARTMAINSTAGE_STARTPHASESTARTINITIATION;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]     case POSTSHUTDOWN_TERMINATESEQUENCE:[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = POSTSHUTDOWN_TERMINATESEQUENCE;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]    }[/FONT]
[FONT=Courier New]    break;[/FONT]
[FONT=Courier New]   // START/MAINSTAGE[/FONT]
[FONT=Courier New]   case STARTMAINSTAGE_STARTPHASESTARTINITIATION:[/FONT]
[FONT=Courier New]    Ignition( ME, fSimT );[/FONT]
[FONT=Courier New]    if ((fSimT - SSME_DATA_TABLE[ME].timeESC) > 2.4) SSME_DATA_TABLE[ME].STATUS = STARTMAINSTAGE_STARTPHASETHRUSTBUILDUP;[/FONT]
[FONT=Courier New]    switch (cmdSTATUS[ME])[/FONT]
[FONT=Courier New]    {[/FONT]
[FONT=Courier New]     case SHUTDOWN_THROTTLINGTOZEROTHRUST:[/FONT]
[FONT=Courier New]      cmdPC[ME] = 0;[/FONT]
[FONT=Courier New]      SetCOTime( ME );[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].timeCO = fSimT;[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = SHUTDOWN_THROTTLINGTOZEROTHRUST;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]    }[/FONT]
[FONT=Courier New]    break;[/FONT]
[FONT=Courier New]   case STARTMAINSTAGE_STARTPHASETHRUSTBUILDUP:[/FONT]
[FONT=Courier New]    Ignition( ME, fSimT );[/FONT]
[FONT=Courier New]    switch (cmdSTATUS[ME])[/FONT]
[FONT=Courier New]    {[/FONT]
[FONT=Courier New]     case SHUTDOWN_THROTTLINGTOZEROTHRUST:[/FONT]
[FONT=Courier New]      cmdPC[ME] = 0;[/FONT]
[FONT=Courier New]      SetCOTime( ME );[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].timeCO = fSimT;[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = SHUTDOWN_THROTTLINGTOZEROTHRUST;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]    }[/FONT]
[FONT=Courier New]    break;[/FONT]
[FONT=Courier New]   case STARTMAINSTAGE_MAINSTAGEPHASENORMALCONTROL:// enter at ESC+3.8 ????[/FONT]
[FONT=Courier New]    if (cmdPC[ME] != SSME_DATA_TABLE[ME].powerlevel) Throttling( ME, fDeltaT );// use diff instead???[/FONT]
[FONT=Courier New]    switch (cmdSTATUS[ME])[/FONT]
[FONT=Courier New]    {[/FONT]
[FONT=Courier New]     case SHUTDOWN_THROTTLINGTOZEROTHRUST:[/FONT]
[FONT=Courier New]      cmdPC[ME] = 0;[/FONT]
[FONT=Courier New]      SetCOTime( ME );[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].timeCO = fSimT;[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = SHUTDOWN_THROTTLINGTOZEROTHRUST;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]    }[/FONT]
[FONT=Courier New]    break;[/FONT]
[FONT=Courier New]   case STARTMAINSTAGE_FIXEDDENSITY:[/FONT]
[FONT=Courier New]    break;[/FONT]
[FONT=Courier New]   case STARTMAINSTAGE_THRUSTLIMITING:[/FONT]
[FONT=Courier New]    break;[/FONT]
[FONT=Courier New]   case STARTMAINSTAGE_ELECTRICALLOCKUP:[/FONT]
[FONT=Courier New]    break;[/FONT]
[FONT=Courier New]   case STARTMAINSTAGE_HYDRAULICLOCKUP:[/FONT]
[FONT=Courier New]    break;[/FONT]
[FONT=Courier New]   // SHUTDOWN[/FONT]
[FONT=Courier New]   case SHUTDOWN_THROTTLINGTOZEROTHRUST:[/FONT]
[FONT=Courier New]    Shutdown( ME, fSimT );[/FONT]
[FONT=Courier New]    break;[/FONT]
[FONT=Courier New]   case SHUTDOWN_PROPELLANTVALVESCLOSED:[/FONT]
[FONT=Courier New]    // keep running down TPs...[/FONT]
[FONT=Courier New]    if ((fSimT - SSME_DATA_TABLE[ME].timeCO) > 5) SSME_DATA_TABLE[ME].STATUS = POSTSHUTDOWN_STANDBY;// ???time???[/FONT]
[FONT=Courier New]    break;[/FONT]
[FONT=Courier New]   case SHUTDOWN_FAILSAFEPNEUMATIC:[/FONT]
[FONT=Courier New]    break;[/FONT]
[FONT=Courier New]   // POST SHUTDOWN[/FONT]
[FONT=Courier New]   case POSTSHUTDOWN_STANDBY:[/FONT]
[FONT=Courier New]    switch (cmdSTATUS[ME])[/FONT]
[FONT=Courier New]    {[/FONT]
[FONT=Courier New]     case POSTSHUTDOWN_OXIDIZERDUMP:[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = POSTSHUTDOWN_OXIDIZERDUMP;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]    }[/FONT]
[FONT=Courier New]    break;[/FONT]
[FONT=Courier New]   case POSTSHUTDOWN_OXIDIZERDUMP:[/FONT]
[FONT=Courier New]    SSME_DATA_TABLE[ME].posMOV = 1;// TODO put vlv motion[/FONT]
[FONT=Courier New]    switch (cmdSTATUS[ME])[/FONT]
[FONT=Courier New]    {[/FONT]
[FONT=Courier New]     case POSTSHUTDOWN_TERMINATESEQUENCE:[/FONT]
[FONT=Courier New]      SSME_DATA_TABLE[ME].STATUS = POSTSHUTDOWN_TERMINATESEQUENCE;[/FONT]
[FONT=Courier New]      break;[/FONT]
[FONT=Courier New]    }[/FONT]
[FONT=Courier New]    break;[/FONT]
[FONT=Courier New]   case POSTSHUTDOWN_TERMINATESEQUENCE:[/FONT]
[FONT=Courier New]    SSME_DATA_TABLE[ME].posMOV = 0;// TODO put vlv motion[/FONT]
[FONT=Courier New]    SSME_DATA_TABLE[ME].posCCV = 0;// TODO put vlv motion[/FONT]
[FONT=Courier New]    SSME_DATA_TABLE[ME].posMFV = 0;// TODO put vlv motion[/FONT]
[FONT=Courier New]    SSME_DATA_TABLE[ME].posOPOV = 0;// TODO put vlv motion[/FONT]
[FONT=Courier New]    SSME_DATA_TABLE[ME].posFPOV = 0;// TODO put vlv motion[/FONT]
[FONT=Courier New]    SSME_DATA_TABLE[ME].STATUS = POSTSHUTDOWN_STANDBY;[/FONT]
[FONT=Courier New]    break;[/FONT]
[FONT=Courier New]   // PROM[/FONT]
[FONT=Courier New]   case PROM_STANDBY:[/FONT]
[FONT=Courier New]    break;[/FONT]
[FONT=Courier New]  }[/FONT]
[FONT=Courier New]  // update table time tag[/FONT]
[FONT=Courier New]  SSME_DATA_TABLE[ME].timeTAG = fSimT;[/FONT]
[FONT=Courier New]  ME++;[/FONT]
[FONT=Courier New] }[/FONT]
[FONT=Courier New] return;[/FONT]
[FONT=Courier New]}[/FONT]
yes, it's a mess but it will get better:)... and bigger:(

but the vlv positions also have some ifs... actually I had that file and I'm going to use it in latter upgrades... right now I just want to see this thing do something!
 
What about using a strategy pattern for the engine controller? Many features of the SSME are also implemented with mechanics and not part of the engine controller, like pneumatic lock-up.

Also, the propellant management valves are operated by the DPS (GPCs and MDMs) and not by the Engine controllers, AFAIK. The engine controllers don't even manage the pneumatics completely, the engine controllers only touch the valves inside the SSME.

So, you can delegate a lot of stuff out of the SSME controller class and into the GPC, only requiring a simulation of the valve behavior.


Just my suggestions. I can understand your desire to have a fast prototype, but maybe you can use some of these ideas.
 
I'm just doing vlv behavior... actually one of my conclusions about the controller, early in this process, was "it doesn't do anything on it's own", it's all GPC commanded: "start engine x", and it moves the vlvs and increases pc on engine x, fills a data table and nothing more. (later there will be pressures/temps/flows/redlines... that's when that file comes into play) I also have to sim the controller modes to update status word in the table...
The vlvs outside the engine are all in another file (MPS.cpp) that will handle the PVs and the F/D vlvs, etc.. and in a future, hopefully not that far away, also sim the fluid in the lines!
 
I'm just doing vlv behavior... actually one of my conclusions about the controller, early in this process, was "it doesn't do anything on it's own", it's all GPC commanded: "start engine x", and it moves the vlvs and increases pc on engine x, fills a data table and nothing more. (later there will be pressures/temps/flows/redlines... that's when that file comes into play) I also have to sim the controller modes to update status word in the table...

The Engine controller is pretty intelligent, but follows a strict rhythm of calculation frames. It does valve control loops for stabilizing mixture ratio. Also it does mostly health checks, so the GPCs only have to tell it: Start, cut off or throttle to xxx percent. Also, the GPC does not tell the engine interface unit to start a specific SSME, but actually, each interface unit has only one SSME to command. In prosa, the command would be "EIU, please start your engine". ;)

The error messages to the GPCs are pretty limited AFAIK, most telemetry of the engine controllers gets actually stored on tape inside the payload data recorder during ascent and transmitted to the ground once in Orbit.

The vlvs outside the engine are all in another file (MPS.cpp) that will handle the PVs and the F/D vlvs, etc.. and in a future, hopefully not that far away, also sim the fluid in the lines!

Would be cool, I could use this also for the other subsystems.
 
Are these screens possible for the Ultra ?

.
zlJDKaPpmdM04O38Ur6pPnphtOLmtyDMZceyUwuov4cbhAHS2DI-Rx61GlbmoMvKylG-PvReFGM7JYbQc7AkDYCte-ylSPYMqqZ5Wb2EWgk
 
Are these screens possible for the Ultra ?

Yes of course. Maybe with less detail as we currently only render on 256x256 MFDs.


Does somebody remember the file name of the excerpt about the MEDS details, DaveS once posted as attachment here? I search for it for reading some pages I did not print yet, but it is Missing in Action in my 2GB STS folder... :sorry:
 
Yes of course. Maybe with less detail as we currently only render on 256x256 MFDs.


Does somebody remember the file name of the excerpt about the MEDS details, DaveS once posted as attachment here? I search for it for reading some pages I did not print yet, but it is Missing in Action in my 2GB STS folder... :sorry:
This is the file name: MEDS.pdf, filesize: 2194 kB.
 
This is the file name: MEDS.pdf, filesize: 2194 kB.

Found it inside the SSU document folder... :dry: should started looking there first.
 
I can now confirm that the color of the APDS control panel buttons are correct! I managed to get a glimpse of them during the downlink of the in-cabin view recorded of the STS-124 and they had the same color we have currently have in SSU, which is turqoise(spelling?).
 
I guess we get lucky, once in awhile.;)
 
I have added a new configuration file to our repository, SpaceShuttleUltra.cfg. This way, we no longer overwrite the configuration file of the default Atlantis.

Also, I have added a first test scenario for STS-120, but I need to edit it to have accurate payload, launch times and such.
 
Back
Top