for your C172 sample we rather see 12 cyls EGT values, so we have to refer only to the useful ones, related to specs as specified in the ACF file or watching PlaneMaker
Code: Select all
[54.674976,57.87355,56.34716,57.517166,52.376415,53.08211,54.0426,57.883617,53.18491,53.677456,52.88482,54.562237,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
and as we see Air Manager is reporting dataref values properly in this case :
let's take a sample with the Baron 58, handling 2 x Continental IO-520 - 285HP each - 6 flat opposed cylinders by engine, so a total of 12 cylinders
https://en.wikipedia.org/wiki/Continental_O-520

Code: Select all
--====================================================================================
-- CHECK PURPOSE
--====================================================================================
eng_nbr = 2 -- from 1 to 4 only : handling most of available aircrafts in X-Plane
cyl_nbr = 6
function cyl_egt_check(cyl_egt, cyl_cht, eng_egt)
for engnbr = 1,eng_nbr,1
do
cylstart = 1 + (engnbr - 1) * 12
print("CYL START #"..cylstart)
for cylnbr = cylstart,cylstart + cyl_nbr - 1,1
do
print("ENG #"..engnbr.." CYL #"..cylnbr.." CHT : "..math.floor(cyl_cht[cylnbr]).." EGT : "..math.floor(cyl_egt[cylnbr]))
end
end
end
xpl_dataref_subscribe("sim/cockpit2/engine/indicators/EGT_CYL_deg_C", "FLOAT[48]",
"sim/cockpit2/engine/indicators/CHT_CYL_deg_C", "FLOAT[48]",
"sim/cockpit2/engine/indicators/EGT_deg_C", "FLOAT[4]",
cyl_egt_check)