Hi Keith,
in my current rework of the EDM 700 I use two options: If you have a plane with REP expansion, there are dedicated datarefs for all cylinders, so these will be used. Otherwise I have written a dedicated routine that emulates different CHT and EGT for the different cylinders and stores them so that the instrument code itself doesn't need to distinguish those two cases and could easily be adjusted to newer/different Sim versions that have dedicated values as well. On startup, two random numbers between 0.95 and 1 are generated for each cylinder, which will be multiplied for calculation. One is a fixed offset for that cylinder, the other one is a variable offset that will change in time... this value is changed via a timer by +/- 0.001 every 10s. So there is no fixed hottest cylinder, and the hottest cylinder may (on rare occasions) even change in one flight... a maximum variance of 10 % (although rare) might be a bit high, but again, this would be a delta of 120°F at normal engine temps, which isn't completely improbable. But the values might use more tweaking.
One problem persists though and that is that all cylinders will obviously peak at the same moment, but solving that would probably be a non-trivial task.
Code: Select all
local egt_variable = {1,1,1,1,1,1}
local cht_variable = {1,1,1,1,1,1}
local egt_fixed = {1,1,1,1,1,1}
local cht_fixed = {1,1,1,1,1,1}
function update_offsets()
-- increase or decrease by max +/- 0.001
for i = 1, CYL_COUNT do
egt_variable[i] = var_cap(egt_variable[i] + 0.002 * (math.random() - 0.5), 0.95, 1);
cht_variable[i] = var_cap(cht_variable[i] + 0.002 * (math.random() - 0.5), 0.95, 1);
end
end
if not USE_REP then
math.randomseed(os.time())
for i = 1, CYL_COUNT do
egt_variable[i] = 0.95 + 0.05 * math.random();
cht_variable[i] = 0.95 + 0.05 * math.random();
egt_fixed[i] = 0.95 + 0.05 * math.random();
cht_fixed[i] = 0.95 + 0.05 * math.random();
end
-- update egt/cht offsets evey 10 seconds:
timer_start(0,10000, update_offsets)
end
Regards
Florian