GE Lua Documentation

Press F to search!

kmh

Definition


-- @/lua/ge/extensions/ui/vehicleSelector/vehicleSpecifications.lua:154
  kmh = function(value)
    if not type(value) == 'number' then
      return tostring(value)
    end
    return string.format("%0.2f%s", value * CONVERSIONS.MPS_TO_KMH, " km/h")
  end,

Callers

@/lua/vehicle/extensions/test/ffbCalibration.lua
          if logCountdown < 0 then
            log("I", "", string.format("VLUA FFB calibration: gradual turning in progress: %4.0f kmh (%i%%), %5.3f st (%i%%)", airspeed*3.6, math.min(1, airspeed / speedMin)*100, gradualInput, 100*clamp(gradualInput/lastSteeringInput, 0, 1)))
            logCountdown = 0.5
      if logCountdown < 0 then
        log("I", "", string.format("VLUA FFB calibration: cruise control in progress: %4.0f kmh (%i%%, %i%%)", airspeed*3.6, math.min(1, airspeed / speedMin)*100, math.min(1, airspeed / speedTarget)*100))
        logCountdown = 0.5
    if logCountdown < 0 then
      log("I", "", string.format("VLUA FFB calibration: data being logged: %4.0f kmh (%i%%), %5.3f st (%i%%), %7.3f ffb", airspeed*3.6, math.min(1, airspeed / speedMin)*100, lastSteeringInput, 100*lastSteeringInput, hydros.forceAtWheelNorm))
      logCountdown = 0.5
    -- we've lost too much speed
    log("I", "", string.format(" >>> VLUA FFB calibration: cruise control has lost too much speed: %4.0f kmh (%i%%)", airspeed*3.6, math.min(1, airspeed / speedMin)*100))
    logCountdown = 0
  if logCountdown < 0 then
    log("I", "", string.format("VLUA FFB calibration: data being logged: %4.0f kmh (%i%%), %5.3f st (%i%%), %7.3f ffb", airspeed*3.6, math.min(1, airspeed / speedMin)*100, lastSteeringInput, 100*lastSteeringInput, hydros.forceAtWheelNorm))
    logCountdown = 0.5