• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSXA 2D cockpit side views

Messages
204
Country
portugal
I know the old 2D panel + cockpit side views scheme was abandoned since FSX SP1, or maybe wasn't implemented in FSX at all, I can´t remember exactly...

Nevertheless, I tried a workaround solution using a gauge, like this:

Code:
	<Element>
		<Position X="0" Y="0" />
		<Visible>(L:VIEW_RIGHT, bool)</Visible>
		<Image Name="right_view.bmp" />
	</Element>

	<Keys>
		<On Event="VIEW_RIGHT">1 (>L:VIEW_RIGHT, bool)</On>
	</Keys>
Although the L:VIEW_RIGHT gets the value 1, the image doesn't show... but using a entry like this in the panel file:
Code:
[Window15]
file=right_view.bmp
size_mm=1280
window_size= 1.000
position=0
The side view image actualy shows up, but only if we select it on the drop down menu...
Now if it can be done manualy, it should be possible to code it, right?
Any ideas how we could get this feature back in FSX by means of a gauge?

Thanks.
 
Hi,
you can use the VS9VIEW macros (look at the SDK) for such a gauge. It provides you exact the same view functions like the fixed windows in FS9.

Can look like this:

Dietmar
 

Attachments

  • WinowView.jpg
    WinowView.jpg
    91.4 KB · Views: 971
Hi,
you can use the VS9VIEW macros (look at the SDK) for such a gauge. It provides you exact the same view functions like the fixed windows in FS9.

Can look like this:

Dietmar
I believe you mean the XML custom parameter FS9VIEW.
I never used it before, but I made a simple gauge:
Code:
<Gauge Name="RightView">
  <Element>
    <Position X="0" Y="0"/>
    <CustomDraw Name="fs9view:view" X="1024" Y="768" Zoom="1.0" Pitch="0" Bank="0" Heading="90" OffsetUp="0" OffsetForward="0" OffsetRight="0">
    </CustomDraw>
  </Element>
</Gauge>
...and added this to the panel config:
Code:
[Window15]
file=RightView.bmp 
size_mm=1280
window_size_ratio=1.000  
position=0
visible=0
ident=MAIN_PANEL_ALT1
window_size= 1.000

gauge00=FS9VIEWtest!RightView,  0,0
..and it works, but as in my previous atempts, only using the menu bar.

I'll add a key assignment to the gauge to see if I can make it show on a key press.

What this custom parameter does is to add a new window with the selected direction view (and offsets if we want), so I used the ident MAIN_PANEL_ALT1, so the main 2D panel don't get get drawn behind, but it is still one window on top of another, not a good thing for fps... I don't know if your pic is a window using this technique. Can you post the code you used?

Thanks pointing me the FS9VIEW.
 
Last edited:
Hi,

yes, I used the custom draw macros for the wing view pic I posted. I am open/close it with a icon activating the window in the panel.cfg.
This is the code ( FSX XML ):

Code:
<?xml version="1.0" encoding="UTF-16"?>

<SimBase.Document
        Type="AceXML"
        version="1,0"
        id="TEST">
    <Descr>AceXML Document</Descr>
    <Filename>VIEWFS9_RLeft.xml</Filename>
    <SimGauge.Gauge id="Gauge" ArtDirectory=".">
        <FloatPosition>0.000,0.000</FloatPosition>
        <Size>1024,768</Size>
        <Image id="WLB.bmp" Name="WLB.bmp">
            <Transparent>True</Transparent>
            <Bright>True</Bright>
        </Image>
        <Element id="Element">
            <FloatPosition>0.000,0.000</FloatPosition>
            <Visibility>1</Visibility>
            <CustomDraw id="CustomDraw" Name="fs9view:view">
                <Size>1024,768</Size>
                <Bright>True</Bright>
                <CustomDrawParam id="ZOOM" Name="ZOOM">
                    <Value>0.7</Value>
                </CustomDrawParam>
                <CustomDrawParam id="Pitch" Name="Pitch">
                    <Value>0</Value>
                </CustomDrawParam>
                <CustomDrawParam id="Bank" Name="Bank">
                    <Value>1</Value>
                </CustomDrawParam>
                <CustomDrawParam id="Heading" Name="Heading">
                    <Value>220</Value>
                </CustomDrawParam>
                <CustomDrawParam id="OffsetUp" Name="OffsetUp">
                    <Value>0</Value>
                </CustomDrawParam>
                <CustomDrawParam id="OffsetForward" Name="OffsetForward">
                    <Value>0</Value>
                </CustomDrawParam>
                <CustomDrawParam id="OffsetRight" Name="OffsetRight">
                    <Value>0</Value>
                </CustomDrawParam>
            </CustomDraw>
        </Element>
        <MouseArea id="MouseArea">
            <FloatPosition>0.000,0.000</FloatPosition>
            <Size>1024,768</Size>
            <CursorType>Hand</CursorType>
            <MouseClick id="MouseClick">
                <Script>10100  (&gt;K:PANEL_ID_Close)
10101  (&gt;K:PANEL_ID_Close)
Main_Panel (&gt;K:Panel_ID_Open)</Script>
            </MouseClick>
            <Tooltip id="Tooltip">
                <DefaultScript>ViewReset</DefaultScript>
            </Tooltip>
        </MouseArea>
        <Update id="Update">
            <Frequency>5</Frequency>
        </Update>
    </SimGauge.Gauge>
</SimBase.Document>

As a background I used just a simple cabin window bmp.

Dietmar
 
Hi,

yes, I used the custom draw macros for the wing view pic I posted. I am open/close it with a icon activating the window in the panel.cfg.
This is the code ( FSX XML ):

As a background I used just a simple cabin window bmp.

Dietmar
Okay, this works, but I find the FS9VIEW not to frame rate friendly... thanks for your help.
 
Indeed, it cost some frames. I am not sure why ?

Dietmar
I believe it's because it is generating a new window, and a big sized one, over the virtual cockpit front view.

The "old" fixed views system just displayed a bitmap over the virtual cockpit view, whatever the view was, forward right, right, etc., of course with no VC.

With FS9VIEW, you are at the virtual cockpit in front view, and it generates a new window displaying a camera view pointing at the selected heading.

It may not be to frame rate consuming on fast up to date systems, but in my old rig, I loose about 10 fps, which its too much... :(
 
2D Fixed Cockpit View FSX solution

Here is my solution to display 2D fixed cockpit views on FSX, as the usual panel definitions are no more possible, and thanks to Mr. Doug Dawson for the window_status gauge.

Here is my code:
Code:
[COLOR="Blue"]<Gauge Name="FIXEDVIEWS">

  <Update Hidden="Yes">

    (L:WindowInit, number) 0 ==
      if{
        (* here goes all the windows assignments for Doug Dawson's window status gauge *)
        1 (>L:WindowInit, bool)
      }
		
    <!-- persistent code for the fixed panel view to show -->
    (L:FrontLeftView, number) 1 ==
      if{
        (L:window_status_01, bool) 0 == if{ (* code to open desired fixed view and closes all others by panel window ident*) }
        (L:window_status_01, bool) 1 == if{ 0 (>L:FrontLeftView, number) }
      }
    (* repeat same as above for all fixed views panels *)

  </Update>
	
  <Element>
    (* image for the clickable icons if desired *)
  </Element>

  <Mouse>
    <!-- click areas for clickable icons if desired -->
      <Area>
        (M:Event) 'LeftSingle' scmp 0 == if{ (>K:VIEW_FORWARD_LEFT) 1 (>L:FrontLeftView, number) }
      </Area>
      (* repeat for all needed click areas *)
  </Mouse>

  <Keys>
    <!-- event trapping for keyboard keys -->
    <On Event="VIEW_FORWARD_LEFT">1 (>L:FrontLeftView, number)</On>
    (* repeat for all needed events *)
  </Keys>	
	
</Gauge>[/COLOR]
Also, Doug Dawson's window status gauge must be on the main panel, and the fixed views must be added as windows on the panel.cfg, one for each view, like this:

Code:
[COLOR="Blue"][WindowXX]
file=FrontLeftView.bmp 
size_mm=1280
window_size_ratio=1.000  
position=0
visible=0
ident=10001
window_size= 1.000
nomenu=1  // important to prevent these fixed views to appear in the dropdown menu

gauge00=gaugefolder!FIXEDVIEWS,       x,  y,  a,  b // needed if there is are clickable icons[/COLOR]
The fixed views are fully functional by
- clickable icons gauge on main and fixed views panels
- keyboard numpad keys, when normaly assigned to the correspondent views
- joystick hat, when mapped to the assigned keyboard keys

Doug Dawson's Window Status gauge reports the visibility status of panel windows for the fixed views to work properly.

Of course 2D cockpit fixed views only make sense on a no VC aircraft, but it is indeed possible to make them back working on FSX. No FS9VIEW needed.
 
Hi Joao,

Have you considered creating a FSDeveloper wiki entry for this?

Bob
 
That looks brilliant !!! I will re-coding my window view gauges accordingly.
Thanks for your investigation and thanks to Doug for his status gauge.

Dietmar
 
Hi Joao,

Have you considered creating a FSDeveloper wiki entry for this?

Bob
No, I didn't thought of that, but if you agree it's worth, I will do it.
FSX relies much on VC's, I think it's a standard on "modern" add-ons, so fixed views may be of interest only for some old projects that didn't have a VC.

That looks brilliant !!! I will re-coding my window view gauges accordingly.
Thanks for your investigation and thanks to Doug for his status gauge.

Dietmar
I made a complete fixed views solution for the Digital Aviation Fokker 70/100 for FSX, one that never made it to the VC stage, but still my favourite airliner.

You can take a look at the code if you want:
http://library.avsim.net/download.php?DLID=169529
 
from thr read me:
The fixed views are fully functional by
- clickable icons gauge on main and fixed views panels
- keyboard numpad keys, when normaly assigned to the correspondent views
- joystick hat, when mapped to the assigned keyboard keys

How can i assign keyboard keys to the hat position??

Do i need FSUPIC??

Edi
 
Do you mean, type a certain letter on the keyboard and that fires a HAT switch event, such as, (>K:VIEW_FORWARD_RIGHT)?

I've never tried it, but would the key trap steps outlined in the Key Traps wiki accomplish that?

Bob
 
No, Bob!
I downloaded his file - see post 11 - and looked into it.
In my understanding if you move the HAT "rear right" so the HAT should fire a "VIEW_REAR_RIGHT".
This will be trapped by an event and a variable will be set

Code:
    <On Event="VIEW_REAR_RIGHT">
       1 (&gt;L:RearRightView,number)
    </On>

And this varible will be used for opening and closing the right windows.

Code:
        (L:ReaRightView, number) 1 ==
         if{
           (L:window_status_05, bool) 0 == if{ 10005 (>K:PANEL_ID_OPEN) 10004 (>K:PANEL_ID_CLOSE) 10003 (>K:PANEL_ID_CLOSE) 10002 (>K:PANEL_ID_CLOSE) 10001 (>K:PANEL_ID_CLOSE) 0 (>K:PANEL_ID_CLOSE) }
           (L:window_status_05, bool) 1 == if{ 0 (>L:RearRightView, number) }
           }

The question now is how can i configurate the HAT to send the proper event??

You also have to use Doug's "dsd_window_status2!window_status" ! But that's the next problem.

Edi
 
The question now is how can i configurate the HAT to send the proper event??

XMLKeys from XMLTools 2.0 should handle that.

An example for HAT capture (not tested, but should work, or almost) :

Code:
    <Macro Name="k">C:XMLKEYS</Macro>
   
    <Macro Name="KeyDisable">
        @1 (>@k:KeyName,string) (>@k:KeyCaptureOff,bool)  
    </Macro>

    <Macro Name="KeyEnable">
        @1 (>@k:KeyName,string) (>@k:KeyCaptureOn,bool)  
    </Macro> 

    <Macro Name="KeyName">
        @1 (>@k:KeyName,string)
    </Macro> 
    
    <Macro Name="KeyConfig">
        @1 (>@k:KeyName,string) '@2' (>@k:KeyString,string)
    </Macro>

    <Macro Name="JoyStickHAT">
        (L:HAT_Number,number) s0
        l0 13500 == if{ (>K:VIEW_REAR_RIGHT) }
        ....
        add other views here
        ....
    </Macro>

    <Update Hidden="Yes">
        (L:XMLKeysInit,bool)    ! 
        if{
                <!-- Joystick HAT's custom behavior -->
                @KeyConfig('joystick:0:POV',@JoyStickHAT)
                <!--  Enable joystick HAT's capture  -->               
                @KeyEnable('joystick:0:POV')
                1 (>L:XMLKeysInit,bool)
            }
            <!--  HAT's captured value  -->                
           @KeyName('joystick:0:POV')              
           (@k:KeyValue,number)  (>L:HAT_Number,number)
    </Update>

Check XMLKeys_reference.txt for other HAT values.

Tom
 
ooohhh Tom,
that becomes hard work:cool:
The upper solution sounded so easiely! A few hours, but ...
Okay, i will to my best!
Thanks!!

Edi
 
Tom,
as expected i am a little bit lost!

Here is my test file

Code:
<Gauge Name="Fixed_Window.xml" Version="1.0">

<Comment>
Check XMLKeys_reference.txt for other HAT values.

POV         Point of view switch (often called the         0 facing ahead
        hat switch).                      4500 forward right                   
                                9000 right
                                13500 rear right
                                18000 rear
                                22500 rear left
                                27000 left
                                31500 forward left
</Comment>

<Update Frequency="18"/>

    <Macro Name="k">C:XMLKEYS</Macro>

    <Macro Name="KeyDisable">
        @1 (>@k:KeyName,string) (>@k:KeyCaptureOff,bool)
    </Macro>

    <Macro Name="KeyEnable">
        @1 (>@k:KeyName,string) (>@k:KeyCaptureOn,bool)
    </Macro>

    <Macro Name="KeyName">
        @1 (>@k:KeyName,string)
    </Macro>

    <Macro Name="KeyConfig">
        @1 (>@k:KeyName,string) '@2' (>@k:KeyString,string)
    </Macro>

    <Macro Name="JoyStickHAT">
      (L:HAT_Number,number) s0

      l0 0 ==     if{ (>K:VIEW_FORWARD) }
      l0 4500 ==  if{ (>K:VIEW_FORWARD_RIGHT) }
      l0 9000 ==  if{ (>K:VIEW_RIGHT) }
      l0 13500 == if{ (>K:VIEW_REAR_RIGHT) }
      l0 18000 == if{ (>K:VIEW_REAR) }
      l0 22500 == if{ (>K:VIEW_REAR_LEFT) }
      l0 27000 == if{ (>K:VIEW_LEFT) }
      l0 31500 == if{ (>K:VIEW_FORWARD_LEFT) }
    </Macro>

    <Update Hidden="Yes">
      (L:XMLKeysInit,bool) !
      if{
        <!-- Joystick HAT's custom behavior -->
        @KeyConfig('joystick:0:POV',@JoyStickHAT)

        <!--  Enable joystick HAT's capture  -->
        @KeyEnable('joystick:0:POV')
        1 (>L:XMLKeysInit,bool)
        }

     <!--  HAT's captured value  -->
      @KeyName('joystick:0:POV')
      (@k:KeyValue,number) (>L:HAT_Number,number)

      @JoyStickHAT   <!-- added -->
    </Update>

  <Keys>
    <On Event="VIEW_RESET">
      (L:FrontView,number) 1 + (&gt;L:FrontView,number)
    </On>
    <On Event="VIEW_FORWARD">
      (L:FrontView,number) 1 + (&gt;L:FrontView,number)
    </On>
    <On Event="VIEW_WINDOW_TO_FRONT">
      (L:FrontView,number) 1 + (&gt;L:FrontView,number)
    </On>
    <On Event="VIEW_FORWARD_LEFT">
      (L:FrontLeftView,number) 1 + (&gt;L:FrontLeftView,number)
    </On>
    <On Event="VIEW_FORWARD_RIGHT">
      (L:FrontRightView,number) 1 + (&gt;L:FrontRightView,number)
    </On>
    <On Event="VIEW_LEFT">
      (L:LeftView,number) 1 + (&gt;L:LeftView,number)
    </On>
    <On Event="VIEW_RIGHT">
      (L:RightView,number) 1 + (&gt;L:RightView,number)
    </On>
    <On Event="VIEW_REAR_LEFT">
      (L:RearLeftView,number) 1 + (&gt;L:RearLeftView,number)
    </On>
    <On Event="VIEW_REAR_RIGHT">
      (L:RearRightView,number) 1 + (&gt;L:RearRightView,number)
    </On>
    <On Event="VIEW_REAR">
      (L:RearView,number) 1 + (&gt;L:RearView,number)
    </On>
  </Keys>

</Gauge>

I added > @JoyStickHAT <!-- added -->

I my debug file i added this lines

Code:
      %L:HAT_Number,num\t%((L:HAT_Number,number))%!8.4f!\n
      %L:FrontView,num\t%((L:FrontView,number))%!8.4f!\n
      %L:FrontLeftView,num\t%((L:FrontLeftView,number))%!8.4f!\n
      %L:LeftView,num\t%((L:LeftView,number))%!8.4f!\n
      %L:RearLeftView,num\t%((L:RearLeftView,number))%!8.4f!\n
      %\n
      %L:FrontRightView,num\t%((L:FrontRightView,number))%!8.4f!\n
      %L:RightView,num\t%((L:RightView,number))%!8.4f!\n
      %L:RearRightView,num\t%((L:RearRightView,number))%!8.4f!\n
      %L:RearView,num\t%((L:RearView,number))%!8.4f!\n
      %\n

So my frontview - counter is going up but if i move the HAT no one of the other counters is counting.

Edi
 
I understand very less!!

Code:
     <!--  HAT's captured value  -->
      @KeyName('joystick:0:POV')
      (@k:KeyValue,number) (>L:HAT_Number,number)

----------------------------------------------------------
@Keyname calls itself?????? My question

  <Macro Name="KeyName">
  @1 (>@k:KeyName,string)
  </Macro>

Where do you write into (@k:KeyValue,number) ??

Look into your code again..
Code:
  @KeyName('joystick:0:pOV')  ....                            you select a varible with this name????
  (@k:KeyValue,number) (>L:HAT_Number,number)      and here to you read the value of the selected variable???


Sorry, i installed FSX a week ago! And i want to make my 727 work.
And i had to less time to read xmltools description!
So a lot of questions!!

Edi
 
Edi,

I can't test that code now. Give me a few hours and I'll be back to this thread.

Tom
 
Tom,
sorry, i didn't update dll.xml !!! Sorry!!

Now i would need a value if the HAT is in central position!!
So the view would automaticallx change back to front_view.


Played around with paylaod. So i recogniced that xmltool does not work!
Code:
      15000 (>C:SIMVARS:PAYLOAD STATION WEIGHT:1,Pounds)
     (A:PAYLOAD STATION WEIGHT:1,Pounds)
Very nice!!!

Edi
 
Back
Top