Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Triggering an event via Gauge needle position

Featured Replies

Instead of using predetermined variables to trigger an event, I need to use the actual postion of a gauge needle to trigger a warning light.Problem Im having is that I need a warning light to come on when a gauge variable reaches a specific setting ie.TOT of >950. Easy to do, except that, due to the that the needle uses, the warning light appears a second or two before the needle gets to the point where the warning should be on.So, can I use the actual position of the needle to trigger the warning light, or is there a better way of doing this that anyone can think of?Steve

Steve,Just an idea:If you need the "delayetc", you can build a timer in the warninglight and experiment with the amount of seconds.Otherwise scrap the delay?Jan"Beatus Ille Procul Negotiis"

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Is the light really triggered by the needle? I ask since a certain delay in needle movement is natural, and the light might be triggered immediately. One way around is introducing the damping of the needle by yourself, and not by "DegreesPerSecond". A sort of damping is the "exponential averaging". yn1=yn*D+(1.0-D)xn1 yn is the displayed value of the previous frame, yn1 is the displayed value now, xn1 is the value from FS now, D is a "damping constant" (0

  • Commercial Member

>Is the light really triggered by the needle? I ask since a>certain delay in needle movement is natural, and the light>might be triggered immediately. >One way around is introducing the damping of the needle by>yourself, and not by "DegreesPerSecond". A sort of damping is>the "exponential averaging". >yn1=yn*D+(1.0-D)xn1 >yn is the displayed value of the previous frame, yn1 is the>displayed value now, xn1 is the value from FS now, D is a>"damping constant" (0higher the damping (Never wrote that in XML though). You only>need one constant and the value from the previous frame, so to>L: or G:vars for the y.. parts (one for remebering yn, one for>driving the light on/off decision [yn1]).>Arne BartelsGeez Arne... trying to fry our feeble brain cells? ;)

Ed Wilson

Mindstar Aviation
My Playland - I69

Na..Na.. not frying. Maybe a bit of encouraging warmth...Here an example, trying out is simpler then explaining:D is declared as macro, I want to type it just once not twice.It is the Baron airspeed indicator, slightly modified 0.9125...(Needle:)(G:Var1) @D * (A:Airspeed select indicated or true,knots) 1.0 @D - * + d (>G:Var1)....(Lamp: or with , choose to taste)(G:Var1) 200 > ....Arne Bartels

>Na..Na.. not frying. Maybe a bit of encouraging warmth...>>Here an example, trying out is simpler then explaining:>>D is declared as macro, I want to type it just once not>twice.>It is the Baron airspeed indicator, slightly modified>> 0.9125>...(Needle:)>(G:Var1) @D * (A:Airspeed>select indicated or true,knots) 1.0 @D - * + d>(>G:Var1)>....(Lamp: or with , choose to taste)>(G:Var1) 200 > >....>>Arne BartelsOk I am trying to get my head around this one.What is the 0.9125 in the Macro definition? 0.9125Steve

The factor D of my first equation (yn1=D*yn+(1-D)*xn1). It is a constant to describe the strength of damping, it as to be between 0 and 1, more to 1. I could give you the mathematical definition if you insist (some logarithmic stuff). The highr D the higher the damping and vice versa, you'll soon reach a value typically between 0.85 and 0.95, depending on how long the old values should be "remembered".Arne Bartels

COOL!!Works like a charm.0.9125(G:Var1) @D * (L:CorrectedTOT1,enum) 1.0 @D - * + d (>G:Var1) (G:Var1) 927 >= (L:annwarn,bool) || (A:Electrical master battery,bool) && Thanks ArneSteve

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.