nodeLength
Definition
-- @/=[C]:-1
function nodeLength(...)
Callers
@/lua/vehicle/controller/advancedCouplerControl.lua
for _, cid2 in ipairs(cnp.availableCid2) do
local d = obj:nodeLength(cnp.cid1, cid2)
if d < distance then
cnp.cid2Key = key
local currentDistance = obj:nodeLength(cnp.cid1, cnp.cid2)
local newDistance = obj:nodeLength(cnp.cid1, nodeToCheck)
local currentDistance = obj:nodeLength(cnp.cid1, cnp.cid2)
local newDistance = obj:nodeLength(cnp.cid1, nodeToCheck)
if newDistance < currentDistance then
--we can assume only a single cid2 here since we do not support multiple cid2 in auto coupling mode
local nodeDistance = obj:nodeLength(cnp.cid1, cnp.cid2)
if nodeDistance > cnp.autoCouplingRadius * 2 then
@/lua/vehicle/controller/drivingDynamics/sensors/vehicleData.lua
local function calculateAxleDistances()
M.vehicleStats.wheelBase = obj:nodeLength(M.wheelAccess.frontRight.node1, M.wheelAccess.rearRight.node1) --calculate wheelbase from the distance of the front and rear wheels
M.vehicleStats.invWheelBase = 1 / M.vehicleStats.wheelBase
@/lua/vehicle/fire.lua
--radiate, conduct heat from hotNodes node to current nodeframe
local dist = obj:nodeLength(currentNodeKey, hotcid) --distance to nearby nodes, for heat radiation
-- conduction
@/lua/vehicle/controller/esc.lua
local function calculateAxleDistances()
wheelBase = obj:nodeLength(wheelCache[frontRightWheelId].node1, wheelCache[rearRightWheelId].node1) --calculate wheelbase from the distance of the front and rear wheels
invWheelBase = 1 / wheelBase