newTemporalSigmoidSmoothing
Definition
-- @/lua/common/filters.lua:244
function newTemporalSigmoidSmoothing(inRate, startAccel, stopAccel, outRate, startingValue)
local rate = inRate or 1
local startaccel = startAccel or math.huge
local data = {[false] = rate, [true] = outRate or rate, startAccel = startaccel, stopAccel = stopAccel or startaccel, state = startingValue or 0, prevvel = 0}
return setmetatable(data, temporalSigmoidSmoothing)
end
Callers
@/lua/ge/simTimeAuthority.lua
local mrateLimit, mstartAccel, mstopAccel
local simulationSpeed_smooth = newTemporalSigmoidSmoothing(drateLimit, dstartAccel, dstopAccel, drateLimit, M.simulationSpeed) -- start at current timescale
@/lua/vehicle/controller/vehicleController/shiftLogic/electricMotor.lua
brakeHandling.smoother = newTemporalSigmoidSmoothing(regenSmoothingRate * 2, regenSmoothingAccel * 2, regenSmoothingAccel, regenSmoothingRate)
brakeHandling.smoothStopReleaseAmount = jbeamData.onePedalSmoothStopBrakeReleaseAmount or 0.85
regenHandling.smoother = newTemporalSigmoidSmoothing(regenSmoothingRate, regenSmoothingAccel, regenSmoothingAccel, regenSmoothingRate)
regenHandling.onePedalRegenCoef = jbeamData.onePedalRegenCoef or 0.5
@/lua/vehicle/powertrain/hydraulicPump.lua
device.volumeSmoothing = newTemporalSigmoidSmoothing(volumeSmoothingInRate, volumeSmoothingStartAccel, volumeSmoothingStopAccel, volumeSmoothingOutRate)
device.pitchSmoothing = newTemporalSigmoidSmoothing(pitchSmoothingInRate, pitchSmoothingStartAccel, pitchSmoothingStopAccel, pitchSmoothingOutRate)
device.volumeSmoothing = newTemporalSigmoidSmoothing(volumeSmoothingInRate, volumeSmoothingStartAccel, volumeSmoothingStopAccel, volumeSmoothingOutRate)
device.pitchSmoothing = newTemporalSigmoidSmoothing(pitchSmoothingInRate, pitchSmoothingStartAccel, pitchSmoothingStopAccel, pitchSmoothingOutRate)
@/lua/vehicle/controller/tirePressureControl.lua
local activeGroupPressureElectricsName
local activeGroupPressureElectricsSmoother = newTemporalSigmoidSmoothing(300000, 500000, 200000, 300000)
@/lua/ge/extensions/flowgraph/nodes/math/smoothers/spring.lua
C.oldSet = 0
C.smoother = newTemporalSigmoidSmoothing()
end
@/lua/ge/extensions/flowgraph/nodes/math/smoothers/sigmoid.lua
C.oldSet = 0
C.smoother = newTemporalSigmoidSmoothing()
end
@/lua/vehicle/powertrain/hydraulicCylinder.lua
local velocitySmoothingOutRate = cylinderData.movementLoopVelocitySmoothingOutRate or 5
cylinder.movementVelocitySmoothing = newTemporalSigmoidSmoothing(velocitySmoothingInRate, velocitySmoothingStartAccel, velocitySmoothingStopAccel, velocitySmoothingOutRate)
@/lua/ge/extensions/core/cameraModes/autopoint.lua
function C:setSpring(rate, accel)
self.smX = newTemporalSigmoidSmoothing(rate,accel, rate,accel, self.smX and self.smX:value() or nil)
self.smY = newTemporalSigmoidSmoothing(rate,accel, rate,accel, self.smY and self.smY:value() or nil)
self.smX = newTemporalSigmoidSmoothing(rate,accel, rate,accel, self.smX and self.smX:value() or nil)
self.smY = newTemporalSigmoidSmoothing(rate,accel, rate,accel, self.smY and self.smY:value() or nil)
self.smZ = newTemporalSigmoidSmoothing(rate,accel, rate,accel, self.smZ and self.smZ:value() or nil)
self.smY = newTemporalSigmoidSmoothing(rate,accel, rate,accel, self.smY and self.smY:value() or nil)
self.smZ = newTemporalSigmoidSmoothing(rate,accel, rate,accel, self.smZ and self.smZ:value() or nil)
end
@/lua/vehicle/extensions/tech/trailSim.lua
local steeringSmoother = newTemporalSigmoidSmoothing(7, 1, 1, 7)
steeringTarget3 = steering3 or 0.01
steeringSmoother = newTemporalSigmoidSmoothing(steeringSmootherRate or 7, steeringSmootherAcc or 1, steeringSmootherAcc or 1, steeringSmootherRate or 7)
cruiseControl.setSpeed(targetSpeed)
@/lua/vehicle/powertrain/compressor.lua
--device.volumeSmoothing = newTemporalSigmoidSmoothing(5, 2, 2, 5)
device.pitchSmoothing = newTemporalSigmoidSmoothing(2000, 4000, 4000, 2000)
--device.volumeSmoothing = newTemporalSigmoidSmoothing(5, 2, 2, 5)
device.pitchSmoothing = newTemporalSigmoidSmoothing(2000, 4000, 4000, 2000)
end
@/lua/ge/extensions/core/cameraModes/orbit.lua
self.preResetPos = vec3(1e+300, 0, 0)
self.smoothedPitchOffset = newTemporalSigmoidSmoothing(2, 2, 2, 2)
self.dynamicPitchQuat = quat()
@/lua/vehicle/electrics.lua
local rpmSmoother = newTemporalSigmoidSmoothing(50000, 75000, 50000, 75000, 0)