Non Linear Gauge Calculations

Questions about deployment and use of Air Manager Instruments

Moderators: russ, Ralph

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

Re: Non Linear Gauge Calculations

#41 Post by alioth »

A two minutes example:

Imagine you want to make and indicator like this one:
Image

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

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

And the equation is:
Image

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 :P

Arturo.

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

Re: Non Linear Gauge Calculations

#42 Post by tsilikas »

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

#43 Post by tsilikas »

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

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

Re: Non Linear Gauge Calculations

#44 Post by Ralph »

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.

User avatar
brodhaq
Posts: 152
Joined: Wed Jun 29, 2016 4:13 pm

Re: Non Linear Gauge Calculations

#45 Post by brodhaq »

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
code.PNG
VSI.png
VSI.png (24.43 KiB) Viewed 14082 times
Pavel Brodský
Prague, Czech Republic

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Non Linear Gauge Calculations

#46 Post by Sling »

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?

User avatar
brodhaq
Posts: 152
Joined: Wed Jun 29, 2016 4:13 pm

Re: Non Linear Gauge Calculations

#47 Post by brodhaq »

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

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Non Linear Gauge Calculations

#48 Post by Sling »

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.

Post Reply