Jump to content
Sign in to follow this  
phjvh

Cabin Pressure and Temperature Question...

Recommended Posts

Errr, ok talk about a late reply here...Been searching high and low and finally came across this post.I have just started programming XML for FS9, and found this forum to be an excellent source of advice. Much of the info here and also the tutorials on FS2X.com really provide a solid starting point for the novice programmer.I am working on an AN-72 in Gmax, and have now turned my attention to the addictive art of gauge programming, and succeeded in creating a cabin pressurisation gauge system. Complete with altitude selection, rate selection, vs indication, cabin alt indication, differential pressure indication and differential pressure protection (not to exceed 7.8 psi).Since this aircraft is capable of flying with an open cargo door i have also included a Cabin altitude warning light which comes on when cab alt rises above 10.000 feet. Next up is an oxygen system with a certain capacity. That should not be a problem to model, i think.But i would also like to implement a blackout effect as time above 10.000 ft progresses, just to spice things up and force user action on the warning. Much like the G force effect already present in FS9. Is there a way to make use of that effect, controlled via an oxygen system L: variable? Has anyone found a more subtle approach than just blacking out the entire screen over the past years? It would be great to have a progressing black out effect depending on lack of oxygen versus elapsed time, preferably also usable in a vc.grtWillem.

Share this post


Link to post
Share on other sites

I haven't tried this, but it should work...Create a transparent full-screen bitmap (R,G,B, 0,0,0), as the basis for a pop-up window. Then add a layer of, say, 25% opacity gray (50,50,50, perhaps). Code that window to pop up whenever the situation suits. You could use as many pop-ups as you like, each with increasing opacity level. The obvious problem is that each change would be abrupt.There is probably some way to perform a top-to-bottom "wipe." Using Flash, perhaps, but that's beyond me.Good luck,Glenn

Share this post


Link to post
Share on other sites

Hi Glenn,thanks for your reply!I'll try your approach, and if gives me an acceptable result i'll stick with it. Will this work in the VC also you think? I guess i'll find that out soon enough eh?Still open for more suggestions...thanksgrtWillem.btwis this modelled in FSX ?

Share this post


Link to post
Share on other sites

Hi, Willem...I don't know how you'd handle it in the VC view. I was guesstimating an approach for a 2D panel in FS9.Good luck with your experiments!Glenn

Share this post


Link to post
Share on other sites

Man,i have been strugling to da max this evening...Here's what i did:I created a bitmap (RGB 0,0,0) and via FSPanelStudio created a new window with that background bitmap. This gives me a transparent window that i can be able to have pop-up when needed.Glenn: you talk about adding a layer with an opacity of 25 percent grey. Maybe you could expand on that? I don't entirely understand i'm afraid, where would i add that layer and what format should it be (*.bmp?)?I struggled with that for some time and decided to try a different appoach:For now i use SHIFT F4 for calling up the transparent window i created.That works.Next i created an xml gauge with the following code:(L:Gforce_effect, number) 1 ==Using FSP the gauge is placed on the new window.For testing purposes i have built a switch that sets L:Gforce_effect, number to 1 when switched.That also works.So now when the window is "visible" (in all its transparency) and i use the switch, a red rectangle pops up.The problem now lies in the fact that i am unable to control the transparency of the rectangle with the Transparency="0.4" function.Changing the figure has no effect, the rectangle remains solid. When the value is 0.5 or higher the rectangle disappears.I think i could also use a bitmap in the gauge that has transparency controlled by an alpha channel. But this seems to work differently from the method used when texturing a model (i know how to do that, by adding the alpha channel bitmap with DXTBmp etc).If the vector drawn rectangle approach is not possible the way i am trying here, i will have to use the bitmap way but i don't know how to go about that (i read that ImageTool is to be used for this, never used that before). Any help is much appreciated!grtWillem

Share this post


Link to post
Share on other sites

Hello grt Here is code for dimming FMC using a L:vars goes from black to clear maybe you can use this with your own color and L:var control. (L:DimPage,number) 1 ==(L:DimPage,number) 2 ==(L:DimPage,number) 3 ==(L:DimPage,number) 4 ==(L:DimPage,number) 5 ==(L:DimPage,number) 6 ==(L:DimPage,number) 7 ==(L:DimPage,number) 8 ==(L:DimPage,number) 9 ==(L:DimPage,number) 10 ==(L:DimPage,number) 11 ==(L:DimPage,number) 12 ==(L:DimPage,number) 13 ==(L:DimPage,number) 14 ==(L:DimPage,number) 15 ==(L:DimPage,number) 16 ==(L:DimPage,number) 17 ==(L:DimPage,number) 18 ==


Paul EGLD

Share this post


Link to post
Share on other sites

Hi,thanks for you input!However, basically the principle of your code and mine remains the same.I guess it just cannot work the way i want it to, ie have the vector rectangle to be the only visible element of the gauge. I think it needs a visible background bitmap.Now i have it working with bitmaps that have a 0,0,0 background and added to that a gaussian monochromatic noise pattern, which changes density between bitmaps.So bitmap 1 has noise only at the edges, the center of the screen remains free. On bitmap 2 the noise closes in a bit, etc, etc.(i use layers with masks in PhotoShop for this. start of with the most noised up layer, apply a mask to that. Copy the layer, make the old one invisible, paint with black on the mask to remove noise so that only the edges are noised up, save as Blackout_x.bmp, copy the layer again, make the previous one invisible, now use white to paint on the mask to bring back some of the noise, save as...,copy layer, paint white on mask, etc,etc)I now have 8 bitmaps that use this same visibility routine :(L:Gforce_effect, number) 6 ==As you can see basically the same as your code, except i use a bitmap now iso vector rectangle.For now still controlled by the switch (each click adds 1 to L:Gforce_effect, number), but at least i now have something that kind of works.Not as subtle as i would like, so if you have any other suggestions feel free!grtWillem.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...