## Non Linear Gauge Calculations

Questions about deployment and use of Air Manager Instruments

Moderators: Ralph, russ

Message
Author
alioth
Posts: 91
Joined: Tue Aug 16, 2016 9:03 pm

### Re: Non Linear Gauge Calculations

A two minutes example:

Imagine you want to make and indicator like this one:

The data table will be like this (Y=degrees, x=knots):

Choose Polynomial -> Cubic Regresion (it depens on the sort of curve you need). You see if the curve goes through the points.

And the equation is:

So, to obtain the degrees you want to rotate (clockwise, 0 in north), you input the knots in x, and get the rotation in y.

The second method would be make three linear equations, from 0 to 90º, from 90 to 180, from 180 to 270.
Depending how the dividers (knots lines) are marked it will be more exactly the first or the second method.

The equation method is more elegant anyway

Arturo.

tsilikas
Posts: 13
Joined: Wed Jul 05, 2017 8:15 pm

### Re: Non Linear Gauge Calculations

This looks great. Thanks Arturo. Should be able to work on this the next couple of days. Will keep you posted.

tsilikas
Posts: 13
Joined: Wed Jul 05, 2017 8:15 pm

### Re: Non Linear Gauge Calculations

Well, that wasn't the fastest response I've ever posted. Apologies everyone. I got engaged and obviously got sidetracked. Programming the gauges wasn't succesful; seems like i was missing a piece of the puzzle. However, I managed to get my airmanager's plain vanilla RPM and airspeed gauges to work with A2A Cherokee. The solution is to use only that aircraft while in the simulator (FSX). As soon as I use another aircraft, then reverting back to A2A Cherokee renders those gauges useless. I am happy right now since that's the aircraft I am flying for my pilot's licence.

I appreciate everyone's help; I hope i didn't let you guys down.

Best

Ralph
Posts: 5070
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

### Re: Non Linear Gauge Calculations

I had that issue as well with the Mindstar GPS. We still have to look into that. I'll put it on the to do list.

brodhaq
Posts: 142
Joined: Wed Jun 29, 2016 4:13 pm

### Re: Non Linear Gauge Calculations

Well... I have done some non-linear stuff here:

Working on my EFIS, I was about to solve the vertical speed indicator. The real one has a non-linear scale which moves against the vertical speed trend, and a needle which rotates to point the correct value and also moves its center of rotation in order to be always perpendicular to the scale.
VSI scale preview is attached. Now, what I have done is dividing the whole range into 5 intervals, and in each interval I did a polynomial regression to get the correct functions for: movement of the scale, rotation of the needle, x movement of the needle and y movement of the needle depending on the vertical speed.
Result is here (bottom right is the VSI): https://www.youtube.com/watch?v=15KHUfk ... e=youtu.be
Preview of the crazy code attached.

Pavel
Attachments
VSI.png (24.43 KiB) Viewed 3017 times
Pavel Brodský
Prague, Czech Republic

Sling
Posts: 4423
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

### Re: Non Linear Gauge Calculations

Good work Pavel. That's not a straight forward VSI to code. Non linear is one thing but the moving needle rotation point is another. Do you know if this is accurate to the real instrument?

brodhaq
Posts: 142
Joined: Wed Jun 29, 2016 4:13 pm

### Re: Non Linear Gauge Calculations

Yes, this is how the real EFIS works... The centre of rotation movement is one thing, but the moving dial is the weirdest VSI I have ever seen (but it looks cool!)

Pavel
Pavel Brodský
Prague, Czech Republic

Sling
Posts: 4423
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

### Re: Non Linear Gauge Calculations

Cool from a being different point of view but personally not my favourite implementation of a VSI. Still when you are making a replica instrument you should stay faithful to the original as you have done. Once again good work.

### Who is online

Users browsing this forum: No registered users and 8 guests