Nik201 can you confirm your gauge is accurate?
I've just stated playing with the AFL KA350 as well, having problems with a couple of DataRefs including KA350/ianim/gauges/lEngITT
Multiplying the value by a single constant and then feeding it into the logic of the KA300 gauge doesn't give accurate results for me.
I gave Keith's suggestion a try and it seems to work, it feels dirty but it works
Code: Select all
local temp_map = { {.529, 560},
{.540, 575},
{.656, 678},
{.739, 745},
{.753, 758} }
-- Functions
function new_itttemp(itttemp)
temp = interpolate_linear(temp_map, itttemp)
if temp >= 1001 then
rotate(img_needle, 30 / 200 * (temp - 1001) + 270)
elseif temp >= 601 then
rotate(img_needle, 180 / 400 * (temp - 601) + 90)
elseif temp >= 401 then
rotate(img_needle, 60 / 200 * (temp - 401) + 30)
elseif temp >= 200 then
rotate(img_needle, 30 / 200 * (temp - 200) )
end
end
Might need more data points for temp_map but it's quite good already.. I would love to figure out how to properly transform the KA350/ianim/gauges/lEngITT value though.