Jump to content

Recommended Posts

Posted

Hey all.

I'm looking at the possibility of making an Imperial units mod for the 109.

The problem is the altimeter.

The fine needle winds one full turn every 1000 meters and indexes the course dial one KM.

The trouble is that 1000 meters is ~3000 feet, which would mean if I just replaced the texture the altimeter would work in base 10.

 

Is there any way in the lua files for the aircraft I can tweak this?

 

I've look at the 109's altimeter.lua and mainpanel_init.lua, but I've not found anything that works for me.

 

What in the lua I have access to looks like this:

 

altimeter.lua:

altitudePointer = {valmin = 0, valmax = 13000, T1 = 0.267, T2 = 0.258, wmax = 0, bias = {{valmin = 0.0, valmax = 13000, bias = 1}}}

I don't know what any of that does :music_whistling:

 

in mainpanel_init.lua:

Altimeter_FinePtr              		= CreateGauge()
Altimeter_FinePtr.arg_number   		= 8
Altimeter_FinePtr.input        		= {0.0, 1000.0}
Altimeter_FinePtr.output       		= {0.0, 1.0}
Altimeter_FinePtr.controller   		= controllers.Altimeter_FinePtr

Altimeter_CoarsePtr                 = CreateGauge()
Altimeter_CoarsePtr.arg_number      = 9
Altimeter_CoarsePtr.input           = {0.0, 13000.0}
Altimeter_CoarsePtr.output          = {0.0, 1.0}
Altimeter_CoarsePtr.controller      = controllers.Altimeter_CoarsePtr

 

This seems to set up the relationship between the simulator and the arguments (animations) but it doesn't seem to control how the two dials relate.

 

Any help appreciated,

Wrench

Posted (edited)

have you tried replacing the "1000" ( meters ? ) in this line with a "333" ( meters ==> 1000 feets ?) :

 

Altimeter_FinePtr.input = {0.0, 1000.0}

Edited by Vilab
Posted

Looks like right now the fine hand does 1.0 revolutions for 1000m input. Then you want 3.2808399 revolutions for 1000m input. That way it should go around once for 1000 feet. Not sure what happens above 1000m though.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...