• 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.

FSX Antiskid gauge

Messages
71
Country
switzerland
Hi all,

A friend of mine is installing a gauge on all his planes that avoids wheels locking when he applies brakes. OK, I know, if you apply full brakes, wheels lock. That's normal. But, he want not.

So he add this gauge (maybe found elsewhere, I don't know) :


<Gauge Name="Anti_skid" Version="1.0">

<!-- Turn on Anti-skid -->

<Element>
<Select>
<Value>
(L:AntiSkidInit,bool) 1 != if{
(A:ANTISKID BRAKES ACTIVE,bool) 1 != if{ 0 (>K:ANTISKID_BRAKES_TOGGLE) }
1 (>L:AntiSkidInit,bool)
}
</Value>
</Select>
</Element>
</Gauge>

The PROBLEM. When the plane is loaded, it does NOT work. You must reset the airplane, then it works. Strange !

Is there a solution, or is this normal...

Thanks for your help

Daniel
 
Hi,

Place this gauge into the VCockpit section of the panel.cfg file and try it again.
 
Place this gauge into the VCockpit section of the panel.cfg file and try it again.

Oh I forgot to say that, but it was placed in VCockpit01 of course... Did not work even.

Did someone try ? Other idea..

I remark the same "issue" with my Cockpitsounds sometimes : no sound when aircraft is loaded the first time => reset => then ok... and Gauges in VCockpit.
 
This may or may not affect your friend's gauge, but...

...it is never a "good idea" to test any variable for anything other than zero, as that is the only "guaranteed value" that the sim will return.

Thus, this may or may not work as anticipated:
(A:SomeVariable,bool) 1 !=

But this will always work:
(A:SomeVariable,bool) !
-or-
(A:SomeVariable,bool) 0 ==
-or-
(A:SomeVariable,bool) 0 !=

Try something like this:
Code:
        (L:AntiSkidInit,bool) ! 
        (A:ANTISKID BRAKES ACTIVE,bool) ! and
        if{ (>K:ANTISKID_BRAKES_TOGGLE) 1 (>L:AntiSkidInit,bool) }
 
...it is never a "good idea" to test any variable for anything other than zero, as that is the only "guaranteed value" that the sim will return.

Thus, this may or may not work as anticipated:
(A:SomeVariable,bool) 1 !=

Bill, (A:SomeVariable,bool) 1 != is testing for anything other than 1 and will always work as expected
However I, like you, prefer to use the (A:SomeVariable,bool) ! method :)

FS's script evaluator will work the same from the moment it is instantiated and across the entire FS session (current flight), despite some Avars could not be instantiated/actualized on the very first cycles, which seems to be the case here.

dggoofy:

It would be simple to figure out what's going on in your script:
Write this:

Code:
<Value> 
(L:AntiSkidInit,bool) ! 
if{ 
     (A:ANTISKID BRAKES ACTIVE,bool) (>L:Antiskid Test,bool) 
     1 (>L:AntiSkidInit,bool)
}
</Value>

Then in another gauge inspect the (L:Antiskid Test,bool) value at first load, and then after an aircraft's reload.

Tom
 
Last edited:
Will it really, Tom?

(A:SomeVariable,bool) 1 !=

Certainly 0 (zero) meets the condition, but then too so does -1... or any other number other than 0 (zero)...

There are some (few) variables who's return is either 0 or -1 (or even some decimal fraction). In such cases, the above can never be 100% reliable! :eek:
 
(A:SomeVariable,bool) 1 !=

Certainly 0 (zero) meets the condition, but then too so does -1... or any other number other than 0 (zero)...
Exactly. And that was my point, anything different from 1 would give true...
It seems I misunderstood what you wanted to point out in your statement, thinking that you might be infering -1 would give false.
Obviously I completely agree with your latest comments.
Even I think that this could be one of those cases where the Avar returns -1 for a true status.

Tom
 
Hi guys,

You're very kind. For me the solution
(K:AntiSkidInit,bool) !
(A:ANTISKID BRAKES ACTIVE,bool) ! and
if{ (>K:ANTISKID_BRAKES_TOGGLE) 1 (>K:AntiSkidInit,bool) }

Works perfectly in any airplane, but my friend told me it did not work for him. None solution. Strange. Any idea ?
It belongs to FS's strange behaviour I imagine.

Any how, thanks for your help.

Daniel
 
Thanks to Daniel and all you guys for pursuing this topic on my behalf.

Thanks also to Bert Pieke on an Avsim forum (parallel topic: Anti-skid) who came up with the following line which works so well you can zoom in on the wheels and actually see the pulsing anti-skid working. To me that would indicate that the anti-skid is switching of and on, but hey, the wheels don't lock up and that was the original objective. Here's the one-liner Bert came up with:
(A:ANTISKID BRAKES ACTIVE,bool) ! if (>K:ANTISKID_BRAKES_TOGGLE)

[Edit] My apologies to Bert, the code above should read:
(A:ANTISKID BRAKES ACTIVE,bool) ! if{ (>K:ANTISKID_BRAKES_TOGGLE) }
I left those vital {} brackets out which caused the pulsing as Bill points out in post #12 below. This simple code works perfectly.

For some reason I had to change L: to K: otherwise it wouldn't work for me. I don't understand a word of the language you guys are speaking, but Bert says, "The L: variable is understood to be a local variable and can be used as a flag, as in the original code. Changing L to K simply changes valid code into invalid code", whatever that means.

BTW, a small misunderstanding that came about when a Kiwi chats to a chap from Switzerland (Daniel, aka dggoofy). The above code in Daniel's post (Sat 8:09pm) did also work for me, but Bert tells me that it would result in more computer cycles. The difference is that the brakes don't pulse off and on as the wheels slow down so if Bert's code can be refined even more to stop the pulsing and use less cycles then I'd love to hear about it.

Gary
NZ
 
Last edited:
BTW, a small misunderstanding that came about when a Kiwi chats to a chap from Switzerland (Daniel, aka dggoofy). The above code in Daniel's post (Sat 8:09pm) did also work for me, but Bert tells me that it would result in more computer cycles. The difference is that the brakes don't pulse off and on as the wheels slow down so if Bert's code can be refined even more to stop the pulsing and use less cycles then I'd love to hear about it.

Gary
NZ

Daniel's code from post #9 works fine, no need to add or change anything -except replacing K with L in AntiSkidInit var-. What it does is to turn Antiskid ON (1) at startup -which is OFF (0) by default on every aircraft. There are not extra cycles or something like that.

(A:ANTISKID BRAKES ACTIVE,bool) only monitors the current status of the antiskid system. Whether brakes are being applied or not is something this variable doesn't care at all.

Tom

PS: even (A:ANTISKID BRAKES ACTIVE,bool) 1 != evaluation works ok!
 
Last edited:
For some reason I had to change L: to K: otherwise it wouldn't work for me. I don't understand a word of the language you guys are speaking, but Bert says, "The L: variable is understood to be a local variable and can be used as a flag, as in the original code. Changing L to K simply changes valid code into invalid code", whatever that means.
Um,
A: are sim defined global variables.
>K: are sim defined global commands.

L: are programmer defined global variables.
>L: are (sort of) programmer defined global commands

Code:
(A:ANTISKID BRAKES ACTIVE,bool) ! if (>K:ANTISKID_BRAKES_TOGGLE)
The above "pulses" because it is constantly turning the anti-skid system on and off. It is doing this because the expression lacks the correct syntax and only the command (>K:...) is being executed! Correct syntax will wrap the command sequence in curly braces { } like this:
Code:
(A:ANTISKID BRAKES ACTIVE,bool) ! if{ (>K:ANTISKID_BRAKES_TOGGLE) }

This is a classic "Bad Idea" since continuously triggering events can and will interfere with other commands being received, and can even cripple performance. The logic suggested will only be evaluated once when the aircraft is loaded...
 
I'm trying to follow this thread, but I'm not sure that I see the solution yet. So, I have a question - is the presumption that the antiskid system, (L:AntiSkidInit, bool), can be turned on or off during operation? If so, wouldn't you want:
Code:
(L:AntiSkidInit, bool) 1 == (A:ANTISKID BRAKES ACTIVE, bool) 0 == and
(L:AntiSkidInit, bool) 0 == (A:ANTISKID BRAKES ACTIVE, bool) 1 == and or
    if{ (>K:ANTISKID_BRAKES_TOGGLE) }

which could go in an <Update> section.

In the event that (L:AntiSkidInit, bool) is tied to a pilot operated switch, then I would stick it all in a <Click>:

Code:
<Click Kind="LeftSingle">
    (L:AntiSkidInit, bool) ! (>L:AntiSkidInit, bool)
    (L:AntiSkidInit, bool) 1 == (A:ANTISKID BRAKES ACTIVE, bool) 0 == and
    (L:AntiSkidInit, bool) 0 == (A:ANTISKID BRAKES ACTIVE, bool) 1 == and or
        if{ (>K:ANTISKID_BRAKES_TOGGLE) }
</Click>
or equivalent
Code:
<Click Kind="LeftSingle">
    (L:AntiSkidInit, bool) (A:ANTISKID BRAKES ACTIVE, bool) and ! or
        if{ (>K:ANTISKID_BRAKES_TOGGLE) }
</Click>

Am I off-base here?

Bob
 
Last edited:
Bob,

I'm almost sure the intention of dggoofy and/or his friend Simdad is to enable antiskid braking on every aircraft that don't have a switch for this task -ie C172-

Then (L:AntiSkidInit, bool) is an initialization var, which means the conditional code it manages will be executed only once, at aircraft load/reload. Within this conditional block, Antiskid var is turned ON via
(>K:ANTISKID_BRAKES_TOGGLE) and remains ON for the rest of that aircraft session. There is no constant fired event, no extra cycles or whatever:

Code:
(L:AntiSkidInit,bool)  !
if{
     (A:ANTISKID BRAKES ACTIVE,bool)  ! 
     if{  (>K:ANTISKID_BRAKES_TOGGLE)  }
     1 (>L:AntiSkidInit,bool)
   }

Tom
 
Yup, I'm sure you're right. If it's switchable or conditional for example, with a failure scheme, then that's different.
Code:
(L:AntiSkidInit, bool) 1 == (A:ANTISKID BRAKES ACTIVE, bool) 0 == and
(L:AntiSkidInit, bool) 0 == (A:ANTISKID BRAKES ACTIVE, bool) 1 == and or
    if{ (>K:ANTISKID_BRAKES_TOGGLE) }
does not constantly fire or consume cycles either.
 
I'm almost sure the intention of dggoofy and/or his friend Simdad is to enable antiskid braking on every aircraft that don't have a switch for this task -ie C172-
Tom

You're right Tom. This is the purpose.
It seems that your last code works as well, and without a continuous CPU cycle good...
 
Thanks folks. Bert (10) and Bill (12) came up with this short code which works fine:
(A:ANTISKID BRAKES ACTIVE,bool) ! if{ (>K:ANTISKID_BRAKES_TOGGLE) }
 
Yes, it will work ok, but in that case you won't be able to turn it off anymore - ie using a key combination (CTL-ALT_nn) -, but probably you also wouldn't want to do so ever...;)

Tom
 
No you would not wish to "turn it off" since the only purpose to begin with is to eliminate the wheel animations from "locking up" whenever any braking pressure is applied. It just looks silly to see the wheels suddenly stop spinning when just 'tapping the brakes lightly' during a landing roll out, or a high-speed taxi... :eek:
 
No you would not wish to "turn it off" since the only purpose to begin with is to eliminate the wheel animations from "locking up" whenever any braking pressure is applied. It just looks silly to see the wheels suddenly stop spinning when just 'tapping the brakes lightly' during a landing roll out, or a high-speed taxi... :eek:

Well, I've noticed that wheel animations -with Antiskid OFF- only "lock up" when parking brake is applied. Normal braking doesn't lock at all, at least in the default C172 and B747. With Antiskid ON animation keeps on with parking brake applied, no locks either. Also Antiskid doesn't seem to affect stopping distance.

Tom
 
Back
Top