# IdeaShuttle Fleet recompile for Orbiter 2016

#### gattispilot

So I redid it.

But got questions. On the front mfd the only control seems to be brightness. So No on/off button on the mfd? There is a DE DEU marking on them.

Going to keep the aft mfd as is. Or should it match the front?. Had to strench the mfd a bit to allow the mfd to work

---------- Post added 12-25-19 at 08:01 AM ---------- Previous post was 12-24-19 at 08:10 AM ----------

So the on/off for the CRT are on the center panel. So I might be able to do that. Maybe even animate the switch. But may need to use the sel button as the newwer mfds.

---------- Post added 12-26-19 at 05:04 AM ---------- Previous post was 12-25-19 at 08:01 AM ----------

So I found out there was NO aft CRT along the aft wall. Just a ADI. There was one on the R11U panel. So if we wanted an active one there I can put it there?

But I would need to make a panel

this is from SSU 2010:

Any thoughts?

#### gattispilot

So almost got her to work. Haven't got the brightness to work yet. HAven't got the CRT switches to animate either

not sure about the code to animate the switch?
Code:
bool Atlantis::clbkVCMouseEvent (int id, int event, VECTOR3 &p)
{

static bool counting = false;
static double t0 = 0.0;

switch (id) {
// handle MFD selection buttons
case AID_CDR1_BUTTONS:
case AID_PLT1_BUTTONS:
case AID_MFD1_BUTTONS:
//case AID_MFDA_BUTTONS:
{
int mfd = id-AID_CDR1_BUTTONS+MFD_LEFT;
int bt = (int)(p.x*5.99);
if (bt < 5) oapiProcessMFDButton (mfd, bt, event);
else {
if (event & PANEL_MOUSE_LBDOWN) {
t0 = oapiGetSysTime();
counting = true;
} else if ((event & PANEL_MOUSE_LBUP) && counting) {
oapiSendMFDKey (mfd, OAPI_KEY_F2);
counting = false;
} else if ((event & PANEL_MOUSE_LBPRESSED) && counting && (oapiGetSysTime()-t0 >= 1.0)) {
oapiSendMFDKey (mfd, OAPI_KEY_F1);
counting = false;
}
}
} return true;

// D. Beachy: handle power buttons
case AID_CDR1_PWR:
case AID_PLT1_PWR:
case AID_MFD1_PWR:
//case AID_MFDA_PWR:
{
int mfd = id - AID_CDR1_PWR+MFD_LEFT;
oapiSendMFDKey(mfd, OAPI_KEY_ESCAPE);
} return true;

if (oapiGetMFDMode(MFD_LEFT) != MFD_NONE){
SetAnimation(anim_mfd1,1);// mfd1 is on
}

// handle MFD brightness buttons
case AID_CDR1_BRT:
case AID_PLT1_BRT:
case AID_MFD1_BRT:

//case AID_MFDA_BRT:
{
static double t0, brt0;
static bool up;
int mfd = id-AID_CDR1_BRT;
if (event & PANEL_MOUSE_LBDOWN) {
up = (p.x >= 0.5);
t0 = oapiGetSysTime();
brt0 = mfdbright[mfd];
} else if (event & PANEL_MOUSE_LBPRESSED) {
double dt = oapiGetSysTime()-t0;
double brt, dbrt = dt * 0.2;
if (up) brt = min (1.0, brt0 + dbrt);
else    brt = max (0.25, brt0 - dbrt);
mfdbright[mfd] = brt;
if (vis) {
MATERIAL mat;
memset (&mat, 0, sizeof(MATERIAL));
mat.emissive.r = mat.emissive.g = mat.emissive.b = (float)brt;
mat.emissive.a = 1.0f;
DEVMESHHANDLE hMesh = GetDevMesh (vis, mesh_vc);
oapiSetMaterial (hMesh, 24+mfd, &mat);
}
}

} return false;

// handle panel R13L events (payload bay operations)
case AID_R13L:
return plop->VCMouseEvent (id, event, p);
}

return false;
}
I have if MFD_left is Not equal to MFD_none so the MFD_left is on then move the switch?

#### gattispilot

So clipping. So to fix this I need to make a new external mesh that the front is removed. Then in the vc you will not see the external mesh cutting into the vc. But in the vc view if you remove the external mesh altogether you get to see nothing in the aft windows.
no external mesh

But I notice some gaps.

Any thoughts.

It looked like the SSU had the same issue.

#### Marg

##### Member
Better to make it like before, because external mesh cutting is not such huge issue. It is important to see everything in aft windows.

#### Donamy

Donator
Beta Tester
Modify the VC mesh, that might be easier.

#### White Owl

##### New member
Just out of curiosity... do you have a goal in mind to call this mod complete? Or at least, complete enough?

#### gattispilot

Just out of curiosity... do you have a goal in mind to call this mod complete? Or at least, complete enough?
Good question. I think once I get the meshes fixed. It will be closer. But scn may never be done. But the base unit as far as I can do might be.

There are thing that might be nice but I don't have the skills to do. Like the MFD and AFCS.

So on the meshes there are gaps which I am testing and fixing. basically 2 dll and vessels. The difference will be the VC. One with the early and the other the glass one

#### 4throck

##### Enthusiast !
Great work on that early VC. Looks really good, at least as good as the default one.
And it will make a difference when going up to Skylab. Thank you!

#### gattispilot

Great work on that early VC. Looks really good, at least as good as the default one.
And it will make a difference when going up to Skylab. Thank you!

Thanks. I got all the essential coding done.

One thing I haven't been able to get is when you power on a mfd I want the switch to animate.

Code:
    if (oapiGetMFDMode(MFD_LEFT) != MFD_NONE){
mfd1pwr = 1;
}
if (oapiGetMFDMode(MFD_LEFT) == MFD_NONE){
mfd1pwr = 0;
}

So md1pwr is initialize to 0;
So if mfd_LEFT is MFD_NONE the mfd is off so mfd1pwr is 0. if the MFD_LEFT is not equal to MFD_NONE the mfd is on so animate the switch.

mfd1pwr is always 0 for some reason.

16.56.2.6 OAPIFUNC int oapiGetMFDMode ( int mfd ) Get the current mode of the specified MFD.

#define MFD_NONE 0 No mode (turn MFD off)

#### Mantis

##### Member
Awesome work. I can't wait to try this out.

#### gattispilot

So I have an issue. My camera modes are set up in the VC. So here is from the rms wrist and elbow.

See the cockpit mesh is visible thru the wall. And in the elbow you we the earth thru the windows

So I think you want the VC just seen from the VC so I think I can extend the aft windows to block the the clipping on the top of the payload doors

Code:
hOrbiterVCMesh = oapiLoadMeshGlobal("2016SPACESHUTTLE\\EARLYVCMFD");//mesh 2
SetMeshVisibilityMode(mesh_cockpit, MESHVIS_EXTERNAL);

//	SetMeshVisibilityMode(mesh_orbiter, MESHVIS_EXTERNAL | MESHVIS_VC );
SetMeshVisibilityMode(mesh_orbiter, MESHVIS_EXTERNAL |  MESHVIS_VC|MESHVIS_EXTPASS);

SetMeshVisibilityMode(mesh_vc, MESHVIS_VC) ;

SetMeshVisibilityMode(mesh_ODS, MESHVIS_NEVER);

SetMeshVisibilityMode(mesh_RMS1, MESHVIS_NEVER);

SetMeshVisibilityMode(mesh_DRAGCHUTE, MESHVIS_NEVER);

SetMeshVisibilityMode(mesh_EXTAIRLOCK, MESHVIS_NEVER);

//SetMeshVisibilityMode(mesh_DRAGCHUTERELEASED, MESHVIS_NEVER);

SetMeshVisibilityMode(mesh_MPMOBSS, MESHVIS_NEVER);
and then based on which camera.
Code:
	if (CAM == 3)SetMeshVisibilityMode(mesh_vc, MESHVIS_NEVER);
if (CAM == 5)SetMeshVisibilityMode(mesh_vc, MESHVIS_NEVER);
if (CAM == 2)SetMeshVisibilityMode(mesh_vc, MESHVIS_NEVER);
if (CAM == 4)SetMeshVisibilityMode(mesh_vc, MESHVIS_VC);
if (CAM == 1)SetMeshVisibilityMode(mesh_vc, MESHVIS_VC);
if (CAM == 6)SetMeshVisibilityMode(mesh_vc, MESHVIS_NEVER);
if (CAM == 7)SetMeshVisibilityMode(mesh_vc, MESHVIS_NEVER);
So in NOT VC mode the main mesh is not seen. As it is set for external view and not cockpit view F1.

FIXED:
Code:
if (CAM == 3)SetMeshVisibilityMode(mesh_vc, MESHVIS_NEVER);
if (CAM == 5)SetMeshVisibilityMode(mesh_vc, MESHVIS_NEVER);
if (CAM == 2)SetMeshVisibilityMode(mesh_vc, MESHVIS_NEVER);
if (CAM == 4)SetMeshVisibilityMode(mesh_vc, MESHVIS_VC);
if (CAM == 1)SetMeshVisibilityMode(mesh_vc, MESHVIS_VC);
if (CAM == 6)SetMeshVisibilityMode(mesh_vc, MESHVIS_NEVER);
if (CAM == 7)SetMeshVisibilityMode(mesh_vc, MESHVIS_NEVER);
if (CAM == 6)SetMeshVisibilityMode(mesh_cockpit, MESHVIS_VC | MESHVIS_EXTPASS | MESHVIS_EXTERNAL);
if (CAM == 7)SetMeshVisibilityMode(mesh_cockpit, MESHVIS_VC | MESHVIS_EXTPASS | MESHVIS_EXTERNAL);
if ((CAM == 1) || (CAM == 2) || (CAM == 3) || (CAM == 4) || (CAM == 5) || (CAM == 8) || (CAM == 0))SetMeshVisibilityMode(mesh_cockpit, MESHVIS_EXTERNAL);
now you see the 3mfd cockpit from rms:

Last edited:

#### gattispilot

So thanks to Marg I am updating the shuttle orbiter. Fixed gaps,....
So going to use the same external meshes for Early VC. So 2 dll that share the external meshes.

So a view of Skylab

and from the early VC

So I made the window from in the VC longer in the aft windows to block the clipping.
So sceranios are being rewritten. I suppose any flights prior to STS101 should be the early VC?

#### 4throck

##### Enthusiast !
Love that last image
The VC was changed on different dates for different shuttles. From Wikipedia:

The Space Shuttle Atlantis was the first orbiter to be retrofitted with a glass cockpit in 2000 with the launch of STS-101.
Columbia was the second orbiter with a glass cockpit on STS-109 in 2002, followed by Discovery in 2005 with STS-114, and Endeavour in 2007 with STS-118.

#### V1p3rPT

##### Donator
Donator
Nice info 4throck. In my opinion yes, the earlyvc should be used in their missions. :thumbup:

#### 4throck

##### Enthusiast !
Yes, 100% realism is impossible. The external tank is a good example of this, there are many small variations. For me the two base versions (early/late VC) are enough.

#### Donamy

Donator
Beta Tester
Don't know what you mean by "extended into the dash."