public CarDebugData( VelocityDebugData velocity, EngineDebugData engine, TyreDebugData leftFrontTyre, TyreDebugData rightFrontTyre, TyreDebugData leftRearTyre, TyreDebugData rightRearTyre, AeroDebugData aero) : this() { Velocity = velocity; Engine = engine; LeftFrontTyre = leftFrontTyre; RightFrontTyre = rightFrontTyre; LeftRearTyre = leftRearTyre; RightRearTyre = rightRearTyre; Aero = aero; }
public CarDebugData CollectDebugData() { (TyreDebugData leftFrontTyreDebugData, TyreDebugData rightFrontTyreDebugData) = _frontAxle.CollectDebugData(); (TyreDebugData leftRearTyreDebugData, TyreDebugData rightRearTyreDebugData) = _rearAxle.CollectDebugData(); AeroDebugData aeroDebugData = new AeroDebugData(_frontAxle.CurrentDownforce, _rearAxle.CurrentDownforce, _body.GetAirResistance(CurrentVelocityInMetersPerSecond, _currentDriftAngle)); EngineDebugData engineDebugData = _engine.CollectDebugData(); VelocityDebugData velocityDebugData = new VelocityDebugData(RelativeVelocity, Acceleration, _currentDriftAngle); return(new CarDebugData( velocityDebugData, engineDebugData, leftFrontTyreDebugData, rightFrontTyreDebugData, leftRearTyreDebugData, rightRearTyreDebugData, aeroDebugData )); }
private void SetAeroDataLabels(AeroDebugData aero) { _frontAeroDownforceLabel?.SetText($"Downforce Front: {aero.FrontSplitterDownforce:0.000} N"); _rearAeroDownforceLabel?.SetText($"Downforce Rear: {aero.RearWingDownforce:0.000} N"); _airResistanceLabel?.SetText($"AirResistance: {aero.CurrentAirResistance:0.000}"); }