IUS 1.0 Development

Close. I need to add sound 4.0 and fix this:
Code:
	if (GetAttachmentStatus(ToASE) == NULL)  //NOT ATTACHED TO ASE SO START TIMER
	{
		
			sprintf(oapiDebugString(), "starttime %d  ", starttimeASE);
			starttimeASE = starttimeASE + 1;
	if (starttimeASE < 94)  //94 SECONDS PAST DETTACHMENT TURN RSC ON

If not attached to ASE start timer. But the starttimeASE doesn't move
 
Close. I need to add sound 4.0 and fix this:
Code:
    if (GetAttachmentStatus(ToASE) == NULL)  //NOT ATTACHED TO ASE SO START TIMER
    {
        
            sprintf(oapiDebugString(), "starttime %d  ", starttimeASE);
            starttimeASE = starttimeASE + 1;
    if (starttimeASE < 94)  //94 SECONDS PAST DETTACHMENT TURN RSC ON
If not attached to ASE start timer. But the starttimeASE doesn't move
Post the sources and maybe someone could check it over.
 
Should I check in the source code to the SSU repository?
 
Not sure? The source code for the IUS and IUS-ASE should be good.

What's next?
 
Should I check in the source code to the SSU repository?

Does it have some source code quality that it could be used for open-source development? Like it is properly documented source code and is using similar architectures and variable name schemes as the rest of the SSU repository does? If not, then no, IMHO.

We should maybe have some standards defined first before adding more sources to the repository. I am currently working myself through the source files and it does not look better at all since I last saw them.

Maybe we can agree on something like having quality levels for our units, so we can tell what is needed for submission and we can rate our own source code. Like going from Level 0 (chaos) to Level 5, with Level 1 being the lowest state of quality at which we accept new code into the repository, and Level 2 or Level 3 being the level at which we allow features to be used in stable releases, reserving the sources that are more experimental and more biologically growing to be used in experimental builds.

Sorry for letting the German bureaucrat hanging out... but I think we are about to kill the project by making it impossible to guarantee a working release.
 
Does it have some source code quality that it could be used for open-source development? Like it is properly documented source code and is using similar architectures and variable name schemes as the rest of the SSU repository does? If not, then no, IMHO.
It's better than the code for CRTMFD. It's very understandable and looks clean. So to me it should go in.
 
It's better than the code for CRTMFD. It's very understandable and looks clean. So to me it should go in.

Would need to see it first to say what is understandable and clean (still not home yet).

Also, it is very hard to find something in SSU that has gone through more hands and has seen more biologic growth than CRTMFD.
 
Question?
How can I make a specific mesh be seen. The mesh name and offset would be read from the scenario?
 
So what is next?
Addition of particle streams to the RCS/SRM exhausts to make them resemble their real counterparts better. As well as downscaled meshes as they're currently too big.

And a dialog window that looks like the real IUS Power Control Panel for proper control of the Airborne Support Equipment.
 
Addition of particle streams to the RCS/SRM exhausts to make them resemble their real counterparts better. As well as downscaled meshes as they're currently too big.

Ok I can add particle streams to the rcs/srm

Not sure about the meshes. Of course that will affect the rcs exhuast

And a dialog window that looks like the real IUS Power Control Panel for proper control of the Airborne Support Equipment.

Just starting to dialog box. Would the dialog control the ASE vessel?

What does it look like?
 
Just starting to dialog box. Would the dialog control the ASE vessel?
Yes.

What does it look like?
Like this:
IUS_PCP.jpg
 
ok. I wonder if one couldn't just load that image in as the dialogue box and then code for certain buttons?
 
Ok. I was able to build a Dialogue window:https://dl.dropboxusercontent.com/u/71242599/ASESCREEN2.jpg

But using the Atlantis code for a guide. To make the switches animate and perform a function. I need to use the Payloadoperation code.

I basically added the lines to use the Payloadop module. But get a compiler error.

I think it is tied to this but not sure?

H.
Code:
class IUSASE : public VESSEL3 {
	friend class PayloadBayOp;// not sure about this?
public:
	IUSASE(OBJHANDLE hObj, int fmodel);
	~IUSASE();
	void clbkSetClassCaps(FILEHANDLE cfg);
	int clbkConsumeBufferedKey(DWORD key, bool down, char *kstate);
	void clbkVisualCreated(VISHANDLE vis, int refcount);
	void DefineAnimations(void);
	void clbkVisualDestroyed(VISHANDLE vis, int refcount);
	void clbkPostStep(double simtt, double simdt, double mjd);
	void clbkLoadStateEx(FILEHANDLE scn, void *status);
	void clbkSaveState(FILEHANDLE scn);
	
	PayloadBayOp *plop; // control and status of payload bay operations

private:
	
	enum NOZZLE { TILT_UP, TILT_DOWN, STOW ,STOP}TILT_IUS;
	VECTOR3 xp1, xr1, IUSTIP[3];
	ANIMATIONCOMPONENT_HANDLE hAC_arm;
	MGROUP_TRANSFORM *rms_anim[2];
	ATTACHMENTHANDLE IUS;
	
	double IUS_TILT_PROC, TILTANGLE, NEWANGLE;
	
	UINT anim_IUS_TILT;
	UINT anim_IUS_TILT1;
};
Cpp
Code:
// Constructor
// --------------------------------------------------------------
IUSASE::IUSASE(OBJHANDLE hObj, int fmodel)
: VESSEL3(hObj, fmodel)
{
	plop = new PayloadBayOp(this);
	TILT_IUS = STOW;
	IUS_TILT_PROC = .2;
	
	IUSTIP[0] = _V(0,2,0);
	IUSTIP[1] = _V(0,1,0);
	IUSTIP[2] = _V(0,2,1);

	DefineAnimations();

}

I get an external link error:

Error 2 error LNK2001: unresolved external symbol "public: __thiscall IUSASE::~IUSASE(void)" (??1IUSASE@@QAE@XZ) E:\orbiter2010p1A\Orbitersdk\samples\IUSASE\IUSASE .obj IUSASE
#endif // !__IUSASE_H[/CODE]
 
New IUS SRM-1 as well as interstage. I have still to add the interstage batteries and it's wiring. Once that's done, I'll start on the new second stage.

New_IUS_1st_stage_1.jpg


---------- Post added 09-11-14 at 02:41 AM ---------- Previous post was 09-10-14 at 09:02 PM ----------

A few interesting schematics of the IUS:

IUS%20complete%20vehicle%202.jpg


IUS%20complete%20vehicle.jpg


ESS%20STS.jpg


---------- Post added 09-12-14 at 02:20 AM ---------- Previous post was 09-11-14 at 02:41 AM ----------

Still working on the first stage. Today's work has focused on combining the several smaller textures into one large common texture which is why the interstage decals are different from the previous screenshot. I'll correct that once everything is done.

I also redid the SRM-1 nozzle and add the compliance ring and the aft boot. The TVC actuators are attached to the nozzle compliance ring along with their potentiometers.

New_IUS_1st_stage_2.jpg
 
OK. I got the dialogue window to open. Switches moves but can't get the talkback to move.

I tried to run in the debugger and it didn't break where I thought it would have.
https://dl.dropboxusercontent.com/u/71242599/iuscontrolpanel.jpg
cpp:
Code:
PayloadBayOp::PayloadBayOp(IUSASE *_sts) : sts(_sts)
{
	sts_dlg = sts;
	hDlg = NULL;


}

void PayloadBayOp::UpdateDialog(HWND hWnd)
{
	char cbuf[256];
	//int i;
	sprintf(cbuf, "IUSASE %s: Payload Bay Operation", sts->GetName());
	SetWindowText(hWnd, cbuf);
	 {
		int plbd_ctrl[1] = { IDC_PLBD3 };
	bool switchstatus = (PYROPRI == BD_ON);
		oapiSetSwitchState(GetDlgItem(hWnd, plbd_ctrl[1]), switchstatus ? 0 : 1, true);
	}

	oapiSetSwitchState(GetDlgItem(hWnd, IDC_PLBD3), PYROPRI == BD_ON ? 0 : PYROPRI == BD_OFF ? 1 : 2, true);

	static char *PLBDstr[2] = {  "       ",  "\\\\\\\\\\",  };
	SetWindowText(GetDlgItem(hWnd, IDC_PLBD_TLKBK7), PLBDstr[0]);



}


void PayloadBayOp::OpenDialog()
{
	if (hDlg) return; // dialog already open
	hDlg = oapiOpenDialogEx(g_Param.hDLL, IDD_PLBAY, PlOp_DlgProc, DLG_CAPTIONCLOSE | DLG_CAPTIONHELP, this);
}


BOOL PayloadBayOp::DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	bool action = false;

	switch (uMsg) {
	case WM_INITDIALOG: {
							SWITCHPARAM sp = { SWITCHPARAM::THREESTATE, SWITCHPARAM::VERTICAL };
		UpdateDialog(hWnd);
	} return TRUE;
	case IDC_PLBD3:
		if (HIWORD(wParam) == BN_CLICKED) {
			int idx = (LOWORD(wParam) == IDC_PLBD3 ? 0 : 1);
			switch (lParam) {
			case 0:
				PYROPRI = BD_ON;

				break;
			case 1:
				PYROPRI = BD_OFF;
				break;
			}
		}
		break;
	}
	return oapiDefDialogProc(hWnd, uMsg, wParam, lParam);
}
h:
Code:
class PayloadBayOp {
	friend class IUSASE;

public:
	PayloadBayOp(IUSASE *_sts);
	void OpenDialog();



	bool ParseScenarioLine(char *line);
	void SaveState(FILEHANDLE scn);

private:
	IUSASE *sts; // vessel instance pointer
	HWND hDlg;     // control dialog handle
	BOOL DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
	friend BOOL CALLBACK PlOp_DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
	void UpdateDialog(HWND hWnd);
	enum { BD_ON, BD_OFF }  PYROPRI;

};
The only warning I get is this:
PlBayOpI.cpp(26): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files\Microsoft Visual Studio 12.0\VC\include\stdio.h(356) : see declaration of 'sprintf'


As I understand it. If I switch the switch is will be either :
enum { BD_ON, BD_OFF } PYROPRI;

then check to see if PYROPRI is BD_ON if it is change the
static char *PLBDstr[2] = { " ", "\\\\\\\\\\", };
SetWindowText(GetDlgItem(hWnd, IDC_PLBD_TLKBK7), PLBDstr[0]);

the PLBDstr was based on animation state of Doors. Since no animation occurs here then it needs to be on or off
 
Last edited:
Back
Top