calculateTreeInertia
Definition
-- @/lua/vehicle/powertrain.lua:312
local function calculateTreeInertia()
--iterate starting at the wheels for various calculations throughout the tree(s)
for i = deviceCount, 1, -1 do
orderedDevices[i]:calculateInertia()
--log("D", "powertrain.calculateTreeInertia", string.format("Cumulative downstream inertia for %s: %.3f", orderedDevices[i].name, orderedDevices[i].cumulativeInertia))
end
end
Callers
@/lua/vehicle/powertrain/rangeBox.lua
if not omitInertiaCaculation then
powertrain.calculateTreeInertia()
end
@/lua/vehicle/powertrain/automaticGearbox.lua
device.invMaxExpectedOutputTorque = maxExpectedOutputTorque ~= 0 and 1 / maxExpectedOutputTorque or 0
powertrain.calculateTreeInertia()
device.shiftLossCoef = 1
@/lua/vehicle/powertrain/dctGearbox.lua
powertrain.calculateTreeInertia()
powertrain.calculateTreeInertia()
@/lua/vehicle/powertrain.lua
validatePowertrain()
calculateTreeInertia()
calculateTreeInertia()
sendDeviceTree()
@/lua/vehicle/powertrain/sequentialGearbox.lua
if device.gearRatio ~= 0 then
powertrain.calculateTreeInertia()
end
if device.gearRatio ~= 0 then
powertrain.calculateTreeInertia()
end
@/lua/vehicle/powertrain/manualGearbox.lua
if device.gearRatio ~= 0 then
powertrain.calculateTreeInertia()
end
if device.gearRatio ~= 0 then
powertrain.calculateTreeInertia()
end