Math and Conditional (Boolean) Calculations for display parameters?

-Bob

New Member
Joined
May 22, 2022
Messages
17
I want to write some conditional math calculations to determine whether a parameter is displayed as green/yellow/red.

For example, in my aircraft, I have a hydraulically actuated landing gear.
If the gear is UP, the HydUp pressure should be ~1000 psi and the HydDown pressure should be ~0-20 psi.
If the gear is DOWN, then HydUp should be ~0-20psi and the HydDown should be ~400 psi.

I want to display the pressures all the time, and mark them Red/Yellow/Green as appropriate for the gear position.
When UP:
HydUp: Green 900-1500 psi, Yellow 500-899psi, Red 0-499, Yellow 1501-2000, Red 2001-5000
HydDown: Green 0-49, Yellow 50-99, Red 100-5000
When DOWN:
HydUp: Green 0-49 psi, Yellow 50-99, Red 100-5000
HydDown: Green 400-799 psi, Yellow 300-399 psi, Red 0-299, Red 800-5000

Is there a way to mathematically combine two inputs to drive a single display widget?
Can boolean expressions be used to modify display of a sensor input?

For the purpose of this discussion, the other inputs could be landing gear position switch (0V or +12V), or the (three) landing gear down position sensors (0V or +12V), along with the hydraulic pressure sensors.
Another use case is to combine the three gear position sensors to give a master GearDown signal (GearDown = LeftDown AND NoseDown AND RightDown).
 
Last edited:

Marc_J._Zeitlin

Active Member
Joined
Sep 24, 2007
Messages
288
Location
Tehachapi, CA 93561
Boy, if there is some way to do this, that would be great, but I don't think so. I've been using Dynon equipment since 2007 and have never seen this capability in any of the monitoring equipment. If nothing else, some built in smarts, such as:
  • Don't alarm on low oil pressure if RPM is zero (still display yellow/red low, just don't yell at me about it)
  • Don't alarm on low voltage if RPM is zero (still display yellow/red low, just don't yell at me about it)
What you're asking for is possible for contact displays, as you can have multiple microswitches/circuits to sense things and create AND/OR gates, but that doesn't address the continuous display widgets. Good question, and good enhancement request.
 

swatson999

Well-Known Member
Joined
Oct 6, 2010
Messages
1,545
I want to write some conditional math calculations to determine whether a parameter is displayed as green/yellow/red.

For example, in my aircraft, I have a hydraulically actuated landing gear.
If the gear is UP, the HydUp pressure should be ~1000 psi and the HydDown pressure should be ~0-20 psi.
If the gear is DOWN, then HydUp should be ~0-20psi and the HydDown should be ~400 psi.

I want to display the pressures all the time, and mark them Red/Yellow/Green as appropriate for the gear position.
When UP:
HydUp: Green 900-1500 psi, Yellow 500-899psi, Red 0-499, Yellow 1501-2000, Red 2001-5000
HydDown: Green 0-49, Yellow 50-99, Red 100-5000
When DOWN:
HydUp: Green 0-49 psi, Yellow 50-99, Red 100-5000
HydDown: Green 400-799 psi, Yellow 300-399 psi, Red 0-299, Red 800-5000

Is there a way to mathematically combine two inputs to drive a single display widget?
Can boolean expressions be used to modify display of a sensor input?

For the purpose of this discussion, the other inputs could be landing gear position switch (0V or +12V), or the (three) landing gear down position sensors (0V or +12V), along with the hydraulic pressure sensors.
Another use case is to combine the three gear position sensors to give a master GearDown signal (GearDown = LeftDown AND NoseDown AND RightDown).

You could do it externally to create a single signal to feed into the Dynon, but I don't see how you could use multiple inputs to drive a *single* display widget. In your first case, you want the widget to show red/yellow/green when, exactly? You have two completely separate range definitions for RYG, so which one does it use? That's aside from alarming under certain combinations. You'd need a new kind of widget, or class of widgets, to display it, and all sorts of logical operators to alarm it.

But as I said, you could create an external circuit board which would do all of that logic and then feed whatever kind of input your want, be it contact, GP or enhanced GP, etc.
 

-Bob

New Member
Joined
May 22, 2022
Messages
17
Yes, I want two complete separate ranges for RYG.
If I could use a conditional in the definition, it would be easy.
Just one line might be something like:
Red: If GearDown, 0-300 psi, Else 1000-5000 psi.
 

swatson999

Well-Known Member
Joined
Oct 6, 2010
Messages
1,545
No, I mean you have two separate pressure sensors that you want to display and ultimately use for defining your ranges and alarms. You have HydUp and HydDwn:

If the gear is UP, the HydUp pressure should be ~1000 psi and the HydDown pressure should be ~0-20 psi.
If the gear is DOWN, then HydUp should be ~0-20psi and the HydDown should be ~400 psi.

Logically

IF UP THEN ((IF (HydUp < 1000 OR HydDown > 20) THEN ALARM ELSE ~ALARM) ELSE (IF (HydUp > 20 OR HydDown < 400) THEN ALARM ELSE ~ALARM))

That's assuming that you have separate inputs (and consequently widgets) assigned to and displaying the two sensor readings, AND something inputting the device that has selected the desired state (a switch or something, for UP and DOWN). You're getting close to requiring a basic parser.
 

-Bob

New Member
Joined
May 22, 2022
Messages
17
No, I mean you have two separate pressure sensors that you want to display and ultimately use for defining your ranges and alarms. You have HydUp and HydDwn:



Logically

IF UP THEN ((IF (HydUp < 1000 OR HydDown > 20) THEN ALARM ELSE ~ALARM) ELSE (IF (HydUp > 20 OR HydDown < 400) THEN ALARM ELSE ~ALARM))

That's assuming that you have separate inputs (and consequently widgets) assigned to and displaying the two sensor readings, AND something inputting the device that has selected the desired state (a switch or something, for UP and DOWN). You're getting close to requiring a basic parser.

Well, yes and no.... The case you described is useful, and I might also sue that if it is available.
But that is not exactly the logic I want to implement first. I want to use the Gear Up/Down switch to set a mode. Then in those two modes, I want the hydraulic pressures to be displayed with limits that are appropriate to the mode.

There are also failure modes that result in both pressures low (no fluid, no pumping), or both pressures high (stuck poppet valve, rising temperatures). Both of those failure modes could have their own widgets or alarm logic.

My feature request would be the superset of all those ideas: i.e. the ability to use multiple inputs and conditional logic to drive an output.
 

swatson999

Well-Known Member
Joined
Oct 6, 2010
Messages
1,545
We call that a programming language.

ETA: BTW
The case you described is useful, and I might also sue that if it is available.

It is not available, else it would have been described in the User's Manual. :)
 
Last edited:

Dynon

Dynon Staff
Staff member
Joined
Jan 14, 2013
Messages
14,232
Location
Woodinville, WA
There isn't a way to do boolean math or otherwise have conditionals on alerts within SkyView.
 

-Bob

New Member
Joined
May 22, 2022
Messages
17
Thanks for the official answer, Dynon Staff.
How about the Advanced Flight Systems screens?
 
Top