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
Thanks for the clarification.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:anelF7 and :
anelF7 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.
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!!!
[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]
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!
Are these screens possible for the Ultra ?
This is the file name: MEDS.pdf, filesize: 2194 kB.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.