• 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 PushBack gauge control issue

Messages
371
Country
france
Hello,

Since 2 days, I try to write in my FMC gauge a part of code to control Pushback, but I have an issue that I don't understand the reason.

I have in my gauge this picture, to move the pushback.

Arrow.jpg


Clockwise from north direction:
-Forward Straight line
-forward turn right 45°
- backward turn right 90°
- backward turn right 45°
- Backward straight line
- Bacward turn left 45°
- Backward turn left 90°
- Forward turn left 45°
- center red : STOP pushback
So, all direction works perfectly, except the second arrow,: "FORWARD 45°". This function works only if the target heading of the pushback is < 180°. Exemple, Aircraft heading is 120° and you click, puckback forward and turn 45° correctly to heading 165° . But if aircraft is at 165°, it begin to turn, but stop when arrived at heading 180°. If you click again, It move forward, but don't want turn.
If the initial position of the aircraft has a heading > 180°, pushback move forward but turn left !!!!
The left forward 45° arrow works perfectly. Only the right forward 45° arrow bugs !! I tried to add DNOR, but nothing changes.

I don't understand what's happens.

Here is my code; Mouse area are in the order, from point to north, clockwise. THis is the third mouse area section ( "Pushback Forward Right 45") which have the isssue.

XML:
<Update>
<Script>

(A:SURFACE RELATIVE GROUND SPEED,Knots) 0.1 &gt;
(L:PusbackTurn,bool) 1 == and if{ (L:Pushbackheading,number) int (A:Plane heading degrees gyro,degrees) int == if{ (>K:TOGGLE_PUSHBACK) (>K:TOGGLE_PUSHBACK) 0 (>L:PusbackTurn,bool) } }

(A:SURFACE RELATIVE GROUND SPEED,Knots) 0.1 &gt;
(L:PusbackForward,bool) 1 == and if{ (L:Pushbackheading,number) 11930465 * (>K:KEY_TUG_HEADING) 0 (>L:PusbackForward,bool) }

</Script>
</Update>




<MouseArea id="Pushback Center STOP">
        <Visibility>(L:FMC_Window,enum) 40 == (L:SetGroundService,bool) and (A:Sim On Ground,bool) and</Visibility>
        <FloatPosition>538,640</FloatPosition>
        <Size>24,24</Size>
        <CursorType>Hand</CursorType>
        <MouseClick id="MouseClick">
        <ClickType>LeftSingle</ClickType>
            <Script>1 (>K:TUG_DISABLE)</Script>
        </MouseClick>
        <Tooltip id="Tooltip Door">
            <DefaultScript>STOP Pushback</DefaultScript>
        </Tooltip>
    </MouseArea>
    <MouseArea id="Pushback Forward 0">
        <Visibility>(L:FMC_Window,enum) 40 == (L:SetGroundService,bool) and (A:Sim On Ground,bool) and</Visibility>
        <FloatPosition>541,603</FloatPosition>
        <Size>17,37</Size>
        <CursorType>Hand</CursorType>
        <MouseClick id="MouseClick">
        <ClickType>LeftSingle</ClickType>
            <Script>10 (>K:KEY_TUG_SPEED) (A:Plane heading degrees gyro,degrees) (>L:Pushbackheading,number) 1 (>L:PusbackForward,bool) (L:Pushbackheading,number) 11930465 * (>K:KEY_TUG_HEADING)</Script>
        </MouseClick>
        <Tooltip id="Tooltip PushBack forward">
            <DefaultScript>Forward in a straight line</DefaultScript>
        </Tooltip>
    </MouseArea>
    <MouseArea id="Pushback Forward Right 45">
        <Visibility>(L:FMC_Window,enum) 40 == (L:SetGroundService,bool) and (A:Sim On Ground,bool) and</Visibility>
        <FloatPosition>568,614</FloatPosition>
        <Size>22,22</Size>
        <CursorType>Hand</CursorType>
        <MouseClick id="MouseClick">
        <ClickType>LeftSingle</ClickType>
            <Script>10 (>K:KEY_TUG_SPEED) (A:Plane heading degrees gyro,degrees) 45 + (>L:Pushbackheading,number) 1 (>L:PusbackTurn,bool) (L:Pushbackheading,number) 11930465 * (>K:KEY_TUG_HEADING)</Script>
        </MouseClick>
        <Tooltip id="Tooltip Door">
            <DefaultScript>Forward right 45 degrees</DefaultScript>
        </Tooltip>
    </MouseArea>
    <MouseArea id="Pushback rear 90 degrees right">
        <Visibility>(L:FMC_Window,enum) 40 == (L:SetGroundService,bool) and (A:Sim On Ground,bool) and</Visibility>
        <FloatPosition>564,649</FloatPosition>
        <Size>37,17</Size>
        <CursorType>Hand</CursorType>
        <MouseClick id="MouseClick">
        <ClickType>LeftSingle</ClickType>
            <Script>1 (>K:TOGGLE_PUSHBACK) 1 (>K:SELECT_2)</Script>
        </MouseClick>
        <Tooltip id="Tooltip PushBack">
            <DefaultScript>Backward Right 90 degrees</DefaultScript>
        </Tooltip>
    </MouseArea>
    <MouseArea id="Pushback rear right 45">
        <Visibility>(L:FMC_Window,enum) 40 == (L:SetGroundService,bool) and (A:Sim On Ground,bool) and</Visibility>
        <FloatPosition>568,670</FloatPosition>
        <Size>22,22</Size>
        <CursorType>Hand</CursorType>
        <MouseClick id="MouseClick">
        <ClickType>LeftSingle</ClickType>
            <Script>(A:Plane heading degrees gyro,degrees) 45 - dnor (>L:Pushbackheading,number) (>K:TOGGLE_PUSHBACK) 1 (>K:SELECT_2) 1 (>L:PusbackTurn,bool)</Script>
        </MouseClick>
        <Tooltip id="Tooltip Door">
            <DefaultScript>Backward 45 degrees right</DefaultScript>
        </Tooltip>
    </MouseArea>
    <MouseArea id="Pushback Backward 180">
        <Visibility>(L:FMC_Window,enum) 40 == (L:SetGroundService,bool) and (A:Sim On Ground,bool) and</Visibility>
        <FloatPosition>541,670</FloatPosition>
        <Size>17,37</Size>
        <CursorType>Hand</CursorType>
        <MouseClick id="MouseClick">
        <ClickType>LeftSingle</ClickType>
            <Script>1 (>K:TOGGLE_PUSHBACK)</Script>
        </MouseClick>
        <Tooltip id="Tooltip Door">
            <DefaultScript>Backward, in a straight line</DefaultScript>
        </Tooltip>
    </MouseArea>
    <MouseArea id="Pushback rear left 45">
        <Visibility>(L:FMC_Window,enum) 40 == (L:SetGroundService,bool) and (A:Sim On Ground,bool) and</Visibility>
        <FloatPosition>507,671</FloatPosition>
        <Size>22,22</Size>
        <CursorType>Hand</CursorType>
        <MouseClick id="MouseClick">
        <ClickType>LeftSingle</ClickType>
            <Script>(A:Plane heading degrees gyro,degrees) 45 + dnor (>L:Pushbackheading,number) (>K:TOGGLE_PUSHBACK) 1 (>K:SELECT_1) 1 (>L:PusbackTurn,bool)</Script>
        </MouseClick>
        <Tooltip id="Tooltip pushback">
            <DefaultScript>Backward left 45</DefaultScript>
        </Tooltip>
    </MouseArea>
    <MouseArea id="Pushback rear left 90">
        <Visibility>(L:FMC_Window,enum) 40 == (L:SetGroundService,bool) and (A:Sim On Ground,bool) and</Visibility>
        <FloatPosition>500,647</FloatPosition>
        <Size>37,17</Size>
        <CursorType>Hand</CursorType>
        <MouseClick id="MouseClick">
        <ClickType>LeftSingle</ClickType>
            <Script>1 (>K:TOGGLE_PUSHBACK) 1 (>K:SELECT_1)</Script>
        </MouseClick>
        <Tooltip id="Tooltip PushBack">
            <DefaultScript>Backward left 90 degrees</DefaultScript>
        </Tooltip>
    </MouseArea>
    <MouseArea id="Pushback Forward left 45">
        <Visibility>(L:FMC_Window,enum) 40 == (L:SetGroundService,bool) and (A:Sim On Ground,bool) and</Visibility>
        <FloatPosition>507,610</FloatPosition>
        <Size>22,22</Size>
        <CursorType>Hand</CursorType>
        <MouseClick id="MouseClick">
        <ClickType>LeftSingle</ClickType>
            <Script>10 (>K:KEY_TUG_SPEED) (A:Plane heading degrees gyro,degrees) 45 - (>L:Pushbackheading,number) 1 (>L:PusbackTurn,bool) (L:Pushbackheading,number) 11930465 * (>K:KEY_TUG_HEADING)</Script>
        </MouseClick>
        <Tooltip id="Tooltip Pushback">
            <DefaultScript>Move Forward left 45 degrees</DefaultScript>
        </Tooltip>
    </MouseArea>





Thanks for your help because I am lost.....

Francois
 
Last edited:
Messages
74
Country
unitedstates
Don't think this will help you much with the issue at hand, but here is one issue, according to W3Schools

error on line 17 at column 1: Extra content at the end of the document

This is another issue- <MouseArea id="Pushback Center STOP"> Document must be Well Formed
ignore the line and column count in the upper part, it all refers to the same line and the column is in reference to "< "

~WEB~
 
Last edited:
Messages
440
Country
us-wisconsin
error on line 17 at column 1: Extra content at the end of the document ....
This is another issue- <MouseArea id="Pushback Center STOP"> Document must be Well Formed
ignore the line and column count in the upper part, it all refers to the same line and the column is in reference to "< "
This will happen only because it is a code chunk.
When the XML parses, the very first bracket set becomes the parent. In this case <Update> is the parent & it closes at line 11.
Therefore, all other elements past that are orphaned, starting at line 16/17, (depending on how parser counts) IE "Document must be Well Formed".
All one needs to do is provide a true parent. If it is the full code set that parent would be: <Gauge>
To test code chunks for syntax just add a parent by any name.
Example below.. With a true parent it parses perfectly.

@Fdd_fr
As for why the code does not work, sorry, never dealt with pushback - no clue.
XML:
<This_left_arrow_married_the_right_arrow_way_over_yonder_comma_had_sex_like_rabbits_comma_now_look_at_all_the_children_they_have>

        <Update>
        <Script>

        (A:SURFACE RELATIVE GROUND SPEED,Knots) 0.1 &gt;
        (L:PusbackTurn,bool) 1 == and if{ (L:Pushbackheading,number) int (A:Plane heading degrees gyro,degrees) int == if{ (>K:TOGGLE_PUSHBACK) (>K:TOGGLE_PUSHBACK) 0 (>L:PusbackTurn,bool) } }

        (A:SURFACE RELATIVE GROUND SPEED,Knots) 0.1 &gt;
        (L:PusbackForward,bool) 1 == and if{ (L:Pushbackheading,number) 11930465 * (>K:KEY_TUG_HEADING) 0 (>L:PusbackForward,bool) }

        </Script>
        </Update>


        <MouseArea id="Pushback Center STOP">
              <Visibility>(L:FMC_Window,enum) 40 == (L:SetGroundService,bool) and (A:Sim On Ground,bool) and</Visibility>
              <FloatPosition>538,640</FloatPosition>
              <Size>24,24</Size>
              <CursorType>Hand</CursorType>
              <MouseClick id="MouseClick">
              <ClickType>LeftSingle</ClickType>
                    <Script>1 (>K:TUG_DISABLE)</Script>
              </MouseClick>
              <Tooltip id="Tooltip Door">
                    <DefaultScript>STOP Pushback</DefaultScript>
              </Tooltip>
         </MouseArea>
         <MouseArea id="Pushback Forward 0">
              <Visibility>(L:FMC_Window,enum) 40 == (L:SetGroundService,bool) and (A:Sim On Ground,bool) and</Visibility>
              <FloatPosition>541,603</FloatPosition>
              <Size>17,37</Size>
              <CursorType>Hand</CursorType>
              <MouseClick id="MouseClick">
              <ClickType>LeftSingle</ClickType>
                    <Script>10 (>K:KEY_TUG_SPEED) (A:Plane heading degrees gyro,degrees) (>L:Pushbackheading,number) 1 (>L:PusbackForward,bool) (L:Pushbackheading,number) 11930465 * (>K:KEY_TUG_HEADING)</Script>
              </MouseClick>
              <Tooltip id="Tooltip PushBack forward">
                    <DefaultScript>Forward in a straight line</DefaultScript>
              </Tooltip>
         </MouseArea>
         <MouseArea id="Pushback Forward Right 45">
              <Visibility>(L:FMC_Window,enum) 40 == (L:SetGroundService,bool) and (A:Sim On Ground,bool) and</Visibility>
              <FloatPosition>568,614</FloatPosition>
              <Size>22,22</Size>
              <CursorType>Hand</CursorType>
              <MouseClick id="MouseClick">
              <ClickType>LeftSingle</ClickType>
                    <Script>10 (>K:KEY_TUG_SPEED) (A:Plane heading degrees gyro,degrees) 45 + (>L:Pushbackheading,number) 1 (>L:PusbackTurn,bool) (L:Pushbackheading,number) 11930465 * (>K:KEY_TUG_HEADING)</Script>
              </MouseClick>
              <Tooltip id="Tooltip Door">
                    <DefaultScript>Forward right 45 degrees</DefaultScript>
              </Tooltip>
         </MouseArea>
         <MouseArea id="Pushback rear 90 degrees right">
              <Visibility>(L:FMC_Window,enum) 40 == (L:SetGroundService,bool) and (A:Sim On Ground,bool) and</Visibility>
              <FloatPosition>564,649</FloatPosition>
              <Size>37,17</Size>
              <CursorType>Hand</CursorType>
              <MouseClick id="MouseClick">
              <ClickType>LeftSingle</ClickType>
                    <Script>1 (>K:TOGGLE_PUSHBACK) 1 (>K:SELECT_2)</Script>
              </MouseClick>
              <Tooltip id="Tooltip PushBack">
                    <DefaultScript>Backward Right 90 degrees</DefaultScript>
              </Tooltip>
         </MouseArea>
         <MouseArea id="Pushback rear right 45">
              <Visibility>(L:FMC_Window,enum) 40 == (L:SetGroundService,bool) and (A:Sim On Ground,bool) and</Visibility>
              <FloatPosition>568,670</FloatPosition>
              <Size>22,22</Size>
              <CursorType>Hand</CursorType>
              <MouseClick id="MouseClick">
              <ClickType>LeftSingle</ClickType>
                    <Script>(A:Plane heading degrees gyro,degrees) 45 - dnor (>L:Pushbackheading,number) (>K:TOGGLE_PUSHBACK) 1 (>K:SELECT_2) 1 (>L:PusbackTurn,bool)</Script>
              </MouseClick>
              <Tooltip id="Tooltip Door">
                    <DefaultScript>Backward 45 degrees right</DefaultScript>
              </Tooltip>
         </MouseArea>
         <MouseArea id="Pushback Backward 180">
              <Visibility>(L:FMC_Window,enum) 40 == (L:SetGroundService,bool) and (A:Sim On Ground,bool) and</Visibility>
              <FloatPosition>541,670</FloatPosition>
              <Size>17,37</Size>
              <CursorType>Hand</CursorType>
              <MouseClick id="MouseClick">
              <ClickType>LeftSingle</ClickType>
                    <Script>1 (>K:TOGGLE_PUSHBACK)</Script>
              </MouseClick>
              <Tooltip id="Tooltip Door">
                    <DefaultScript>Backward, in a straight line</DefaultScript>
              </Tooltip>
         </MouseArea>
         <MouseArea id="Pushback rear left 45">
              <Visibility>(L:FMC_Window,enum) 40 == (L:SetGroundService,bool) and (A:Sim On Ground,bool) and</Visibility>
              <FloatPosition>507,671</FloatPosition>
              <Size>22,22</Size>
              <CursorType>Hand</CursorType>
              <MouseClick id="MouseClick">
              <ClickType>LeftSingle</ClickType>
                    <Script>(A:Plane heading degrees gyro,degrees) 45 + dnor (>L:Pushbackheading,number) (>K:TOGGLE_PUSHBACK) 1 (>K:SELECT_1) 1 (>L:PusbackTurn,bool)</Script>
              </MouseClick>
              <Tooltip id="Tooltip pushback">
                    <DefaultScript>Backward left 45</DefaultScript>
              </Tooltip>
         </MouseArea>
         <MouseArea id="Pushback rear left 90">
              <Visibility>(L:FMC_Window,enum) 40 == (L:SetGroundService,bool) and (A:Sim On Ground,bool) and</Visibility>
              <FloatPosition>500,647</FloatPosition>
              <Size>37,17</Size>
              <CursorType>Hand</CursorType>
              <MouseClick id="MouseClick">
              <ClickType>LeftSingle</ClickType>
                    <Script>1 (>K:TOGGLE_PUSHBACK) 1 (>K:SELECT_1)</Script>
              </MouseClick>
              <Tooltip id="Tooltip PushBack">
                    <DefaultScript>Backward left 90 degrees</DefaultScript>
              </Tooltip>
         </MouseArea>
         <MouseArea id="Pushback Forward left 45">
              <Visibility>(L:FMC_Window,enum) 40 == (L:SetGroundService,bool) and (A:Sim On Ground,bool) and</Visibility>
              <FloatPosition>507,610</FloatPosition>
              <Size>22,22</Size>
              <CursorType>Hand</CursorType>
              <MouseClick id="MouseClick">
              <ClickType>LeftSingle</ClickType>
                    <Script>10 (>K:KEY_TUG_SPEED) (A:Plane heading degrees gyro,degrees) 45 - (>L:Pushbackheading,number) 1 (>L:PusbackTurn,bool) (L:Pushbackheading,number) 11930465 * (>K:KEY_TUG_HEADING)</Script>
              </MouseClick>
              <Tooltip id="Tooltip Pushback">
                    <DefaultScript>Move Forward left 45 degrees</DefaultScript>
              </Tooltip>
         </MouseArea>
     
</This_left_arrow_married_the_right_arrow_way_over_yonder_comma_had_sex_like_rabbits_comma_now_look_at_all_the_children_they_have>
 
Last edited:
Messages
74
Country
unitedstates
I see.

I'm used to code checking XML files, not chunks. So I was not even focused on the fact it was not complete. My xml days are long behind me, for now anyways. All mine were for a communication between Apache > VMware > PS3 gaming console. For reasons I will not disclose here.

~WEB~
 
Messages
371
Country
france
Thanks for interest, but I think that the issue is not in the synthax. I cannot post the full gauge code, because it has more than 10 000 lines !

It is a FSX bug; And I would like to know if someone knows the trick to solves this bug.
 
Messages
2,079
Country
us-ohio
What is the value of 11930465 for? I ask, because 4294967295 / 360 is 11930464.
 
Messages
371
Country
france
rounded.....but problem is not here since it appears when passing 180° heading....by turning right only...
 
Messages
2,079
Country
us-ohio
Could the tug heading be a relative bearing value instead of a compass heading?
 
Messages
371
Country
france
I tried all solution and it is a great mysterious !!

All direction work except the 45° forward right turn !

in this case :
- If initial aircraft heading is between 0° and 135° -> all is ok, pushback move forward and turn right 45° -> ok :)
- if initial aircraft heading is between 135° and 180° -> pushback move forward and turn right until heading 180°, after he move in a straight line !! -> 50% ok :(
- if initial aircraft heading is between 180° and 315° -> pushback move forward and turn left !! --> 0% ok :mad:
- if initial aircraft heading is between 315 and 0° -> pushback move forward and turn right 45° -> ok :)
 
Last edited:
Messages
22
Country
germany
Code:
(L:PusbackTurn,bool) 1 == and if{ (L:Pushbackheading,number) int (A:Plane heading degrees gyro,degrees) int == if{ (>K:TOGGLE_PUSHBACK) (>K:TOGGLE_PUSHBACK) 0 (>L:PusbackTurn,bool) } }

Hello,
Its probably not the reason for your problem but you have 2 times the key event "Toggle_Pushback" in this line!
 
Top